function update_all_issues() { $op = $_POST['op']; $i = new wfIssues(); if ('deleteIgnored' === $op) { $i->deleteIgnored(); } else { if ('deleteNew' === $op) { $i->deleteNew(); } else { if ('ignoreAllNew' === $op) { $i->ignoreAllNew(); } else { return array('errorMsg' => 'An invalid operation was called.'); } } } return array('ok' => 1); }
public static function ajax_updateAllIssues_callback() { $op = $_POST['op']; $i = new wfIssues(); if ($op == 'deleteIgnored') { $i->deleteIgnored(); } else { if ($op == 'deleteNew') { $i->deleteNew(); } else { if ($op == 'ignoreAllNew') { $i->ignoreAllNew(); } else { return array('errorMsg' => "An invalid operation was called."); } } } return array('ok' => 1); }