]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-send_bonus.php
Use 'sub' to identify whether to update an 'action' menu entry or a 'what' menu entry
[mailer.git] / inc / modules / admin / what-send_bonus.php
index 523f00c31bbb83833318e01c83822053b6816ddf..765f304021b046571d392a135ce4db24d29752a0 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -44,25 +44,22 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addYouAreHereLink('admin', __FILE__);
 
 if (!isExtensionActive('order')) {
-       displayMessage(generateExtensionInactiveNotInstalledMessage('order'));
+       displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=order%}');
        return;
 } // END - if
 
-// Set empty mode to "select"
-if (!isGetRequestParameterSet('mode')) setGetRequestParameter('mode', 'select');
+// 'mode' is not set by default
+if (!isGetRequestElementSet('mode')) {
+       // Set empty mode to "select"
+       setGetRequestElement('mode', 'select');
+} // END - if
 
 if (isFormSent()) {
        // Deliver bonus mail
-       addNewBonusMail(postRequestArray(), getRequestParameter('mode'));
+       addNewBonusMail(postRequestArray(), getRequestElement('mode'));
 } else {
-       // Get all available users
-       $content['all'] = getRequestParameter('mode');
-
-       // Prepare option lines
-       $content['options_lines'] = getRequestParameter('mode');
-
        // Store send mode
-       $content['mode'] = getRequestParameter('mode');
+       $content['mode'] = getRequestElement('mode');
 
        $content['html_select'] = '';
        if (isExtensionActive('html_mail')) {
@@ -71,7 +68,7 @@ if (isFormSent()) {
        } // END - if
 
        // Select template
-       switch(getRequestParameter('mode')) {
+       switch(getRequestElement('mode')) {
                case 'html':   // HTML mails
                case 'normal': // Normal mails
                        $template = 'admin_send_bonus_form';