// End payload block: $AdminUI->disp_payload_end(); break; case 'edit': case 'update': // on error // on error case 'update_edit': switch ($display_mode) { case 'js': // js request ob_start(); // Display VIEW: $AdminUI->disp_view('widgets/views/_widget.form.php'); $output = ob_get_clean(); send_javascript_message(array('widgetSettings' => $output)); break; case 'normal': default: // take usual action // Begin payload block: $AdminUI->disp_payload_begin(); // Display VIEW: $AdminUI->disp_view('widgets/views/_widget.form.php'); // End payload block: $AdminUI->disp_payload_end(); break; } break; case 'list': default:
// Redirect so that a reload doesn't write to the DB twice: header_redirect('?ctrl=antispam', 303); // Will EXIT // We have EXITed already at this point!! } if ($Messages->has_errors()) { // Reset js display mode in order to display a correct view after confirmation $display_mode = ''; $mode = ''; } param('request', 'string', ''); if ($display_mode == 'js' && $request != 'checkban') { if ($delcomments && $r) { send_javascript_message(array('refreshAfterBan' => array($deleted_ids), 'closeModalWindow' => array()), true); } else { send_javascript_message(array('closeModalWindow' => array()), true); } } // We'll ask the user later what to do, if no "sub-action" given. break; case 'remove': // Remove a domain from ban list: // Check that this action request is not a CSRF hacked request: $Session->assert_received_crumb('antispam'); // Check permission: $current_User->check_perm('spamblacklist', 'edit', true); param('hit_ID', 'integer', true); // Required! $Messages->add(sprintf(T_('Removing entry #%d from the ban list...'), $hit_ID), 'note'); antispam_delete($hit_ID); break;
// We have EXITed already at this point!! } } else { // TODO: message? } } if ($report) { // Report this keyword as abuse: antispam_report_abuse($keyword); } param('request', 'string', ''); if ($display_mode == 'js' && $request != 'checkban') { if ($delcomments && $r) { send_javascript_message(array('refreshAfterBan' => array($deleted_ids), 'closeAntispamSettings' => array()), true); } else { send_javascript_message(array('closeAntispamSettings' => array()), true); } } // We'll ask the user later what to do, if no "sub-action" given. break; case 'remove': // Remove a domain from ban list: // Check that this action request is not a CSRF hacked request: $Session->assert_received_crumb('antispam'); // Check permission: $current_User->check_perm('spamblacklist', 'edit', true); param('hit_ID', 'integer', true); // Required! $Messages->add(sprintf(T_('Removing entry #%d from the ban list...'), $hit_ID), 'note'); antispam_delete($hit_ID); break;