Fixes for stripped HTML tags, and false warnings in debug log
[mailer.git] / inc / modules / admin / what-send_bonus.php
index 6dccfbf0886f0ee285eb8f12e2f11f1b07750288..2c496ee23971d83dc0517280982c2516ab2bd5ba 100644 (file)
@@ -44,20 +44,20 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 ADD_DESCR("admin", __FILE__);
 
 // Set empty mode to "select"
-if (empty($_GET['mode'])) $_GET['mode'] = "select";
+if (!REQUEST_ISSET_GET('mode')) REQUEST_SET_GET('mode', "select");
 
-if (isset($_POST['ok'])) {
+if (IS_FORM_SENT()) {
        // Deliver bonus mail
-       ADD_NEW_BONUS_MAIL($_POST, $_GET['mode']);
+       ADD_NEW_BONUS_MAIL(REQUEST_POST_ARRAY(), REQUEST_GET('mode'));
 } else {
        // Get all available users
-       define('__ALL_VALUE', TRANSLATE_COMMA(GET_TOTAL_RECEIVERS($_GET['mode'])));
+       define('__ALL_VALUE', TRANSLATE_COMMA(GET_TOTAL_RECEIVERS(REQUEST_GET('mode'))));
 
        // Prepare option lines
-       define('__OPTION_LINES', ADD_CATEGORY_OPTIONS($_GET['mode']));
+       define('__OPTION_LINES', ADD_CATEGORY_OPTIONS(REQUEST_GET('mode')));
 
        // Store send mode
-       define('__MODE', SQL_ESCAPE($_GET['mode']));
+       define('__MODE', REQUEST_GET(('mode')));
 
        if (EXT_IS_ACTIVE("html_mail")) {
                // If HTML extension is active
@@ -68,7 +68,7 @@ if (isset($_POST['ok'])) {
        }
 
        // Select template
-       switch($_GET['mode']) {
+       switch(REQUEST_GET('mode')) {
                case "html":   // HTML mails
                case "normal": // Normal mails
                        $template = "admin_send_bonus_form";