| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function execute() |
||
| 20 | { |
||
| 21 | if (!$this->_config->get('delete_older')) { |
||
| 22 | return; |
||
| 23 | } |
||
| 24 | |||
| 25 | if (!midcom::get()->auth->request_sudo($this->_component)) { |
||
| 26 | $this->print_error("Could not get sudo, aborting operation, see error log for details"); |
||
| 27 | return; |
||
| 28 | } |
||
| 29 | |||
| 30 | $cleanup = new org_openpsa_directmarketing_cleanup(); |
||
| 31 | $cleanup->delete(); |
||
| 32 | |||
| 33 | midcom::get()->auth->drop_sudo(); |
||
| 34 | } |
||
| 36 |