More queries and language constants rewritten
authorRoland Häder <roland@mxchange.org>
Sun, 22 Feb 2009 23:39:06 +0000 (23:39 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 22 Feb 2009 23:39:06 +0000 (23:39 +0000)
84 files changed:
beg.php
birthday_confirm.php
css.php
doubler.php
inc/doubler_send.php
inc/extensions.php
inc/extensions/ext-active.php
inc/extensions/ext-admins.php
inc/extensions/ext-admintheme1.php
inc/extensions/ext-admintheme_default.php
inc/extensions/ext-bank.php
inc/extensions/ext-beg.php
inc/extensions/ext-birthday.php
inc/extensions/ext-bonus.php
inc/extensions/ext-booking.php
inc/extensions/ext-cache.php
inc/extensions/ext-country.php
inc/extensions/ext-doubler.php
inc/extensions/ext-holiday.php
inc/extensions/ext-html_mail.php
inc/extensions/ext-logs.php
inc/extensions/ext-maintenance.php
inc/extensions/ext-mediadata.php
inc/extensions/ext-mods.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-nickname.php
inc/extensions/ext-online.php
inc/extensions/ext-optimize.php
inc/extensions/ext-order.php
inc/extensions/ext-other.php
inc/extensions/ext-payout.php
inc/extensions/ext-primera.php
inc/extensions/ext-rallye.php
inc/extensions/ext-refback.php
inc/extensions/ext-register.php
inc/extensions/ext-removeip.php
inc/extensions/ext-repair.php
inc/extensions/ext-rewrite.php
inc/extensions/ext-sponsor.php
inc/extensions/ext-sql_patches.php
inc/extensions/ext-task.php
inc/extensions/ext-theme.php
inc/extensions/ext-top10.php
inc/extensions/ext-transfer.php
inc/extensions/ext-usage.php
inc/extensions/ext-wernis.php
inc/fatal_errors.php
inc/filters.php
inc/functions.php
inc/install-inc.php
inc/language/de.php
inc/language/en.php
inc/libs/sponsor_functions.php
inc/libs/surfbar_functions.php
inc/modules/admin/admin-inc.php
inc/modules/admin/what-add_rallye.php
inc/modules/admin/what-admin_add.php
inc/modules/admin/what-adminedit.php
inc/modules/admin/what-config_home.php
inc/modules/admin/what-config_mods.php
inc/modules/admin/what-guest_add.php
inc/modules/admin/what-guestedit.php
inc/modules/admin/what-mem_add.php
inc/modules/admin/what-memedit.php
inc/modules/admin/what-repair_amenu.php
inc/modules/admin/what-repair_gmenu.php
inc/modules/admin/what-repair_mmenu.php
inc/modules/guest/action-admin.php
inc/modules/guest/action-main.php
inc/modules/guest/action-members.php
inc/modules/guest/action-sponsor.php
inc/modules/login.php
inc/mysql-manager.php
install.php
js.php
mailid.php
mailid_top.php
modules.php
ref.php
show_bonus.php
sponsor_confirm.php
sponsor_ref.php
surfbar.php
view.php

diff --git a/beg.php b/beg.php
index 5f68fbc..ae27b81 100644 (file)
--- a/beg.php
+++ b/beg.php
@@ -49,10 +49,7 @@ $msg = null;
 require("inc/config.php");
 
 // Is the "beg" extension active?
-if (!EXT_IS_ACTIVE("beg")) {
-       // Redirect to index
-       LOAD_URL("modules.php?module=index&amp;msg=".constant('CODE_EXTENSION_PROBLEM')."&amp;ext=beg");
-} // END - if
+REDIRCT_ON_UNINSTALLED_EXTENSION("beg");
 
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
index 25e7371..cfbbb60 100644 (file)
@@ -45,10 +45,7 @@ $GLOBALS['module'] = "birthday_confirm"; $CSS = -1;
 require("inc/config.php");
 
 // Is the "birthday" extension active?
-if (!EXT_IS_ACTIVE("birthday")) {
-       // Redirect to index
-       LOAD_URL("modules.php?module=index&amp;msg=".constant('CODE_EXTENSION_PROBLEM')."&amp;ext=birthday");
-} // END - if
+REDIRECT_ON_UNINSTALLED_EXTENSION("birthday");
 
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
@@ -82,21 +79,21 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
                        unset($GLOBALS['ref_level']);
                        ADD_POINTS_REFSYSTEM("birthday_confirm", $uid, $data['points'], false, "0", $locked, strtolower(getConfig('birthday_mode')));
 
-                       // Remove entry from table
-                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_birthday` WHERE userid=%s AND chk_value='%s' LIMIT 1",
-                               array($uid, $chk), __FILE__, __LINE__);
-
                        // Update mediadata if version is 0.0.4 or newer
                        if (GET_EXT_VERSION("mediadata") >= "0.0.4") {
                                // Update database
                                MEDIA_UPDATE_ENTRY(array("total_points"), "add", $data['points']);
                        }
 
+                       // Remove entry from table
+                       SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_user_birthday` WHERE userid=%s AND chk_value='%s' LIMIT 1",
+                               array($uid, $chk), __FILE__, __LINE__);
+
                        // Transfer data to constants for the template
                        define('__GENDER', TRANSLATE_GENDER($data['gender']));
-                       define('__SNAME', $data['surname']);
-                       define('__FNAME', $data['family']);
-                       define('__GIFT' , $data['points']);
+                       define('__SNAME' , $data['surname']);
+                       define('__FNAME' , $data['family']);
+                       define('__GIFT'  , TRANSLATE_COMMA($data['points']));
 
                        // Load message from template
                        define('__MSG', LOAD_TEMPLATE("birthday_msg", true));
@@ -106,7 +103,7 @@ WHERE b.userid=%s AND b.chk_value='%s' LIMIT 1",
                }
        } else {
                // Cannot load data!
-               define('__MSG', BIRTHDAY_CANNOT_LOAD_DATA);
+               define('__MSG', getMessage('BIRTHDAY_CANNOT_LOAD_DATA'));
        }
 
        // Free memory
diff --git a/css.php b/css.php
index 9e73bd6..9efdc95 100644 (file)
--- a/css.php
+++ b/css.php
@@ -58,13 +58,13 @@ header("Content-type: text/css");
 require("inc/config.php");
 
 // Load header
-LOAD_INC_ONCE("inc/header.php");
+LOAD_INC("inc/header.php");
 
 // Load CSS code
-LOAD_INC_ONCE("inc/stylesheet.php");
+LOAD_INC("inc/stylesheet.php");
 
 // Load footer
-LOAD_INC_ONCE("inc/footer.php");
+LOAD_INC("inc/footer.php");
 
 //
 ?>
index 869e3da..fb92ccf 100644 (file)
@@ -49,10 +49,7 @@ $CSS = 0;
 require("inc/config.php");
 
 // Is the "doubler" extension active?
-if (!EXT_IS_ACTIVE("doubler")) {
-       // Redirect to index
-       LOAD_URL("modules.php?module=index&amp;msg={!CODE_EXTENSION_PROBLEM!}&amp;ext=doubler");
-} // END - if
+REDIRECT_ON_UNINSTALLED_EXTENSION("doubler");
 
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
@@ -161,7 +158,6 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
 
                                        // Update usage counter
                                        UPDATE_CONFIG("doubler_counter", 1, "+");
-                                       incrementCondigEntry('doubler_counter');
 
                                        // Set constant
                                        define('__DOUBLER_MSG', LOAD_TEMPLATE("doubler_reflink", true, $_POST['userid']));
index 75e73ca..58bf1ab 100644 (file)
@@ -150,7 +150,7 @@ if (((SQL_NUMROWS($result_total) > 0) && (getConfig('doubler_sent_all') == "Y"))
 
                        // Load mail template and send mail away...
                        $msg = LOAD_EMAIL_TEMPLATE("member_doubler", $content, $uid);
-                       SEND_EMAIL($uid, DOUBLER_MEMBER_SUBJECT, $msg);
+                       SEND_EMAIL($uid, getMessage('DOUBLER_MEMBER_SUBJECT'), $msg);
                } // END - if
        } // END - while
 } // END - if
index b54e756..b3604cc 100644 (file)
@@ -631,7 +631,11 @@ function DEACTIVATE_EXTENSION($ext_name) {
                CREATE_EXTENSION_DEACTIVATION_TASK($ext_name);
 
                // Notify the admin
-               SEND_ADMIN_NOTIFICATION(ADMIN_SUBJECT_EXTENSION_DEACTIVATED, "admin_ext_deactivated", array('ext_name' => $ext_name));
+               SEND_ADMIN_NOTIFICATION(
+                       getMessage('ADMIN_SUBJECT_EXTENSION_DEACTIVATED'),
+                       "admin_ext_deactivated",
+                       array('ext_name' => $ext_name)
+               );
        } // END - if
 }
 
@@ -699,7 +703,7 @@ VALUES (%s,0,'NEW','EXTENSION','%s','%s',UNIX_TIMESTAMP())",
 // Creates a task for automatically deactivated (deprecated) extension
 function CREATE_EXTENSION_DEACTIVATION_TASK ($ext) {
        // Create subject line
-       $subject = sprintf("[%s:] %s", $ext, TASK_SUBJ_EXTENSION_DEACTIVATED);
+       $subject = sprintf("[%s:] %s", $ext, getMessage('TASK_SUBJ_EXTENSION_DEACTIVATED'));
 
        // Not installed and do we have created a task for the admin?
        if ((DETERMINE_TASK_ID_BY_SUBJECT($subject) == 0) && (GET_EXT_VERSION($ext) != "")) {
@@ -828,13 +832,13 @@ function ADD_EXTENSION_NOTES ($ver, &$UPDATE_NOTES) {
                        // Initial release
                        $content = array(
                                'ver'   => $ver,
-                               'notes' => INITIAL_RELEASE
+                               'notes' => getMessage('INITIAL_RELEASE')
                        );
                } else {
                        // No update notes found!
                        $content = array(
                                'ver'   => $ver,
-                               'notes' => NO_UPDATE_NOTES
+                               'notes' => getMessage('NO_UPDATE_NOTES')
                        );
                }
 
index 9cf42e0..2c00f4a 100644 (file)
@@ -58,8 +58,8 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='active' LIMIT 1";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_active' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='active' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_active' LIMIT 1";
 
        // Unregister filter
        UNREGISTER_FILTER('online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, $dry_run);
@@ -67,12 +67,12 @@ case "remove": // Do stuff when removing extension
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE what='active' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='N' WHERE `what`='active' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='active' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='active' LIMIT 1";
        break;
 
 case "update": // Update an extension
index 6d02c75..5ae1059 100644 (file)
@@ -57,7 +57,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='admins' LIMIT 6";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='admins' LIMIT 6";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_acls`";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_admins_mails`";
        $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_admins` DROP default_acl";
@@ -199,7 +199,7 @@ PRIMARY KEY (id)
                break;
 
        case "0.5.6": // SQL queries for v0.5.6
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.";
@@ -211,7 +211,7 @@ PRIMARY KEY (id)
                break;
 
        case "0.5.8": // SQL queries for v0.5.8
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Ein Punkt in der Versionsnummernliste verhinderte das 0.5.6-Update.";
@@ -253,7 +253,7 @@ PRIMARY KEY (id)
                break;
 
        case "0.6.6": // SQL queries for v0.5.6
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET what='admins_contct' WHERE what='admins_contact' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='admins_contct' WHERE `what`='admins_contact' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Namenskonflikt zwischen den Erweiterungen <strong>admins</strong> und (kommender) <strong>contact</strong>.";
index 3b42449..5c0e33d 100644 (file)
@@ -51,9 +51,9 @@ switch ($EXT_LOAD_MODE)
 case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
        // Remove all other themes
        $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='stats' WHERE what='usr_online' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='stats' WHERE what='email_stats' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='misc' WHERE what='maintenance' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='usr_online' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email_stats' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='maintenance' LIMIT 1";
        break;
 
 case "remove": // Do stuff when removing extension
index bb9e45c..a8e4424 100644 (file)
@@ -51,9 +51,9 @@ switch ($EXT_LOAD_MODE)
 case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
        // Remove all other menu themes
        $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_extensions` WHERE ext_name LIKE 'admintheme%'";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='misc' WHERE what='usr_online' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='stats' WHERE what='email' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='setup' WHERE what='maintenance' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='misc' WHERE `what`='usr_online' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='stats' WHERE `what`='email' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='setup' WHERE `what`='maintenance' LIMIT 1";
        break;
 
 case "remove": // Do stuff when removing extension
index b571558..b993625 100644 (file)
@@ -158,18 +158,18 @@ case "remove": // Do stuff when removing extension
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_transfers`";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_packages`";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bank_tanlist`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='bank' LIMIT 14";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='bank' LIMIT 8";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='bank' LIMIT 14";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='bank' LIMIT 8";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE action='bank' LIMIT 8";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bank' LIMIT 8";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE action='bank' LIMIT 8";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bank' LIMIT 8";
        break;
 
 case "update": // Update an extension
index 8d392d6..2c899da 100644 (file)
@@ -73,22 +73,22 @@ PRIMARY KEY(id)
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_beg' OR what='list_beg' LIMIT 2";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='beg' LIMIT 1";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='beg' OR what='beg2' LIMIT 2";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg' LIMIT 2";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='beg' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='beg' OR `what`='beg2' LIMIT 2";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_beg_ips`";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE what='beg' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='beg' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='beg' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='beg' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='beg' LIMIT 1";
        break;
@@ -179,7 +179,7 @@ case "update": // Update an extension
                break;
 
        case "0.1.5": // SQL queries for v0.1.5
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Verg&uuml;tung und auch die Bettel-Rallye k&ouml;nnen Sie hier einstellen.' WHERE what='config_beg' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Bettellink/-rallye', descr='IP-Sperre, {!POINTS!}-Verg&uuml;tung und auch die Bettel-Rallye k&ouml;nnen Sie hier einstellen.' WHERE `what`='config_beg' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Fehlendes Template im Admin-Bereich hinzugef&uuml;gt. Im Admin-Bereich Hinweis hinzugef&uuml;gt, wenn Bettel-Rallye inaktiv ist. Bitte Script inc/monthly_beg.php l&ouml;schen!";
@@ -237,8 +237,8 @@ case "update": // Update an extension
                break;
 
        case "0.2.4": // SQL queries for v0.2.4
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='1' WHERE what='beg' LIMIT 1";
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='rals', sort='3', title='Bettel-Rallye' WHERE what='beg2' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='1' WHERE `what`='beg' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='3', `title`='Bettel-Rallye' WHERE `what`='beg2' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Mitgliedsmen&uuml; komplett umgebaut.";
index 4a0e9d2..71aeeb7 100644 (file)
@@ -57,7 +57,7 @@ case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP birthday_sent";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_birthday' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index 8fad3e4..637aef5 100644 (file)
@@ -81,8 +81,8 @@ PRIMARY KEY  (id)
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications') LIMIT 5";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='bonus' LIMIT 1";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='bonus' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='bonus' LIMIT 1";
        $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'";
        $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_links` DROP bonus_id";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_bonus`";
@@ -93,15 +93,15 @@ case "remove": // Do stuff when removing extension
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='bonus' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE action='bonus' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='bonus' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='bonus' LIMIT 1";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='show_bonus' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='bonus' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE action='bonus' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='bonus' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='bonus' LIMIT 1";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='show_bonus' LIMIT 1";
        break;
 
@@ -121,7 +121,7 @@ case "update": // Update an extension
                break;
 
        case "0.2.1": // SQL queries for v0.2.1
-               $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_bonus' LIMIT 1";
+               $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_bonus' LIMIT 1";
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_bonus','Bonus-{!POINTS!}',8,'Richten Sie Bonus-{!POINTS!} ein, die beim x&#39;ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {!POINTS!} zus&auml;tzlich bekommen, als der 10. Klick.')";
                $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000";
                $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000";
@@ -158,7 +158,7 @@ KEY userid (userid)
                break;
 
        case "0.2.3": // SQL queries for v0.2.3
-               $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='bonus' LIMIT 1";
+               $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='bonus' LIMIT 1";
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`, `what`, `title`, `sort`, `visible`, `locked`, `counter`) VALUES ('main','bonus','Aktiv-Rallye',7,'Y','Y', 0)";
 
                // Update notes (these will be set as task text!)
@@ -401,7 +401,7 @@ WHERE last_online < ".$mark." ORDER BY userid";
                break;
 
        case "0.6.4": // SQL queries for v0.6.4
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='Aktiv-Rallye' WHERE what='config_bonus' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Der Men&uuml;punkt &quot;Bonus-{!POINTS!}&quot; unter Einstellungen wird nach &quot;Aktiv-Rallye umbenannt. Und die Aktiv-Rallye konnte aufgrund eines Template-Fehlers nicht gespeichert werden.";
@@ -508,7 +508,7 @@ WHERE last_online < ".$mark." ORDER BY userid";
                break;
 
        case "0.8.3": // SQL queries for v0.8.3
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='rals', sort='2', title='Aktiv-Rallye' WHERE what='bonus' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='2', `title`='Aktiv-Rallye' WHERE `what`='bonus' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Mitgliedsmen&uuml; komplett umgebaut.";
index 54a3eb2..2acd4e7 100644 (file)
@@ -81,12 +81,12 @@ case "remove": // Do stuff when removing extension
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='booking' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='booking' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='booking' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='booking' LIMIT 1";
        break;
 
 case "update": // Update an extension
index 1ae1bc7..897c3e3 100644 (file)
@@ -59,7 +59,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_cache' OR what='cache_stats' LIMIT 2";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_cache' OR `what`='cache_stats' LIMIT 2";
 
        // Unregister all filters
        UNREGISTER_FILTER('extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, $dry_run);
index cb40121..7a3ebb6 100644 (file)
@@ -72,7 +72,7 @@ PRIMARY KEY(id)
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_countries`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='country' LIMIT 2";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='country' LIMIT 2";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index e8c82f7..2f17680 100644 (file)
@@ -118,22 +118,22 @@ PRIMARY KEY(id)
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_doubler`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='doubler' LIMIT 3";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='doubler' LIMIT 1";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='doubler' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='doubler' LIMIT 3";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='doubler' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='doubler' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='doubler' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE what='doubler' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='doubler' LIMIT 1";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='N' WHERE module='doubler' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='doubler' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='doubler' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='doubler' LIMIT 1";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='Y' WHERE module='doubler' LIMIT 1";
        break;
 
@@ -216,7 +216,7 @@ case "update": // Update an extension
                break;
 
        case "0.1.4": // SQL queries for v0.1.4
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='4' WHERE what='doubler' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='4' WHERE `what`='doubler' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Mitgliedsmen&uuml; komplett umgebaut.";
index bdcaca1..4ae4917 100644 (file)
@@ -80,20 +80,20 @@ PRIMARY KEY(id)
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_holidays`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='holiday' LIMIT 1";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='holiday' LIMIT 4";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='holiday' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='holiday' LIMIT 4";
        $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value='0' LIMIT 1";
        $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_max_receive` (value, comment) VALUES ('0','Urlaub')";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='holiday' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='holiday' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='holiday' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='holiday' LIMIT 1";
        break;
 
 case "update": // Update an extension
@@ -202,7 +202,7 @@ case "update": // Update an extension
                break;
 
        case "0.1.9": // SQL queries for v0.1.9
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='account', sort='2', title='In Urlaub' WHERE what='holiday' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='2', `title`='In Urlaub' WHERE `what`='holiday' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Mitgliedsmen&uuml; komplett umgebaut.";
index e2e80cd..7db775f 100644 (file)
@@ -61,17 +61,17 @@ case "remove": // Do stuff when removing extension
        $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP html";
        $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_bonus` DROP html_msg";
        $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_pool` DROP html_msg";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='html_mail' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='html_mail' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='html_mail' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='html_mail' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='html_mail' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='html_mail' LIMIT 1";
        break;
 
 case "update": // Update an extension
index 51702da..ded3a2e 100644 (file)
@@ -56,7 +56,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='logs' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='logs' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index e8990bd..faa8304 100644 (file)
@@ -56,7 +56,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='maintenance' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='maintenance' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index 23eb6ec..f02f71c 100644 (file)
@@ -56,8 +56,8 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_mediadata' LIMIT 1";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='mediadata' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_mediadata' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='mediadata' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index 69023ee..17d838c 100644 (file)
@@ -57,7 +57,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='mods' LIMIT 3";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='mods' LIMIT 3";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index daaf756..e71f036 100644 (file)
@@ -55,18 +55,18 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='newsletter' AND what != 'send_newsletter' LIMIT 3";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='newsletter' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='newsletter' AND what != 'send_newsletter' LIMIT 3";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='newsletter' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE what='newsletter' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='N', `visible`='Y' WHERE `what`='newsletter' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE what='newsletter' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `locked`='Y', `visible`='N' WHERE `what`='newsletter' LIMIT 1";
        break;
 
 case "update": // Update an extension
@@ -76,7 +76,7 @@ case "update": // Update an extension
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter', NULL, 'Newsletter','Einstellungen am Newsletter, Newsletter versenden, Abbestellungen auflisten usw.', 3)";
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','list_newsletter','Abbestellungen','Alle Abbestellungen auflisten und bearbeiten.', 2)";
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('newsletter','config_newsletter','Einstellungen','Geb&uuml;hr zum Abbestellen des Newsletters usw. sind hier einstellbar.', 3)";
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='newsletter', what='send_newsletter', title='Versenden', sort='1' WHERE what='newsletter' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='newsletter', `what`='send_newsletter', `title`='Versenden', `sort`='1' WHERE `what`='newsletter' LIMIT 1";
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','newsletter','Newsletter-Empfang','N','Y', 10)";
                $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD nl_charge FLOAT(10,2) UNSIGNED NOT NULL DEFAULT '5.00'";
                $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD nl_receive ENUM('Y','N') NOT NULL DEFAULT 'Y'";
index 01a6f8f..15cd71c 100644 (file)
@@ -60,19 +60,19 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='nickname' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='nickname' LIMIT 1";
        $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN ('config_nickname','list_nickname') LIMIT 2";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_nickname_history`";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='nickname' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='nickname' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='nickname' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='nickname' LIMIT 1";
        break;
 
 case "update": // Update an extension
@@ -161,7 +161,7 @@ case "update": // Update an extension
                break;
 
        case "0.1.6": // SQL queries for v0.1.6
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='2' WHERE what='nickname' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='2' WHERE `what`='nickname' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Mitgliedsmen&uuml; komplett umgebaut.";
index 1c21046..4c5dbbb 100644 (file)
@@ -73,8 +73,8 @@ KEY(refid)
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_online`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='usr_online' LIMIT 1";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='online' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usr_online' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='online' LIMIT 1";
 
        // Unregister filter
        UNREGISTER_FILTER('init', 'UPDATE_ONLINE_LIST', true, $dry_run);
@@ -82,12 +82,12 @@ case "remove": // Do stuff when removing extension
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE action='online' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='online' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE action='online' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='online' LIMIT 1";
        break;
 
 case "update": // Update an extension
index b65fe34..2019fc6 100644 (file)
@@ -61,7 +61,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_optimize_gain`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='optimize' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='optimize' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index 1201a78..6112f61 100644 (file)
@@ -55,18 +55,18 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_order' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='order' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', admin_only='N', mem_only='Y' WHERE module='order' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='order' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `visible`='N', `locked`='Y' WHERE module='order' LIMIT 1";
        break;
 
@@ -82,7 +82,7 @@ case "update": // Update an extension
                break;
 
        case "0.1.1": // SQL queries for v0.1.1
-               $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_order' LIMIT 1";
+               $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1";
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`, `what`, `title`, `sort`, `descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')";
                $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
 
@@ -273,7 +273,7 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
        case "0.4.6": // SQL queries for v0.4.6
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')";
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')";
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='order', sort='1', title='Klick-Mails' WHERE what='order' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='order', `sort`='1', `title`='Klick-Mails' WHERE `what`='order' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Mitgliedsmen&uuml; komplett umgebaut.";
@@ -285,7 +285,7 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
                break;
 
        case "0.4.8": // SQL queries for v0.4.8
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='Mailbuchung' WHERE what='config_order' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Men&uuml;punkt &quot;Mailbuchungsseite&quot; nach &quot;Mailbuchung&quot; umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben.";
index dc2a09b..398204c 100644 (file)
@@ -55,7 +55,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_other' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_other' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index fc3e066..f58dd62 100644 (file)
@@ -81,18 +81,18 @@ case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='payouts'";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='payout' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='payout' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='payout' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1";
        break;
 
 case "update": // Update an extension
@@ -100,7 +100,7 @@ case "update": // Update an extension
        {
        case "0.1.2": // SQL queries for v0.1.2
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')";
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET action='payouts', title='Einstellungen' WHERE action='setup' AND what='config_payouts' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1";
                break;
 
        case "0.1.3": // SQL queries for v0.1.3
index 430e2e4..30070d6 100644 (file)
@@ -86,18 +86,18 @@ PRIMARY KEY(id)
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_primera`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='primera'";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='primera' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='primera'";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='primera' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='primera' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='primera' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='primera' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='primera' LIMIT 1";
        break;
 
 case "update": // Update an extension
index f563aa4..a4d6c26 100644 (file)
@@ -107,9 +107,9 @@ case "remove": // Do stuff when removing extension
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_rallye_users`";
 
        // Remove menus
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='rallye' LIMIT 4";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='rallyes' LIMIT 1";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='rallyes' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='rallye' LIMIT 4";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='rallyes' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='rallyes' LIMIT 1";
 
        // Unregister filter
        UNREGISTER_FILTER('extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, $dry_run);
@@ -117,14 +117,14 @@ case "remove": // Do stuff when removing extension
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE what='rallyes' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='rallyes' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='rallyes' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='rallyes' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='rallyes' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='rallyes' LIMIT 1";
        break;
 
 case "update": // Update an extension
@@ -290,7 +290,7 @@ Zudem sollten Sie mindestens folgende Templates (in <strong>templates/".GET_LANG
                break;
 
        case "0.3.2": // SQL queries for v0.3.2
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='rals', sort='1', title='Referal-Rallye' WHERE what='rallyes' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='rals', `sort`='1', `title`='Referal-Rallye' WHERE `what`='rallyes' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Mitgliedsmen&uuml; komplett umgebaut.";
index 8edb325..53846bb 100644 (file)
@@ -69,19 +69,19 @@ KEY (`refid`)
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_refs`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='refback' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='refback' LIMIT 1";
        $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what IN('config_refback','list_refback') LIMIT 2";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_refsystem` SET level=level-1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='refback' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='refback' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='refback' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='refback' LIMIT 1";
        break;
 
 case "update": // Update an extension
index 6225570..8f537cc 100644 (file)
@@ -58,7 +58,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_register' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_register' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
@@ -263,7 +263,7 @@ PRIMARY KEY(id)
 
        case "0.4.2": // SQL queries for v0.4.2
                $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'";
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET what='config_register2' WHERE what='config_reg' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `what`='config_register2' WHERE `what`='config_reg' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Bei der Anmeldung kann die Standart-Auswahl zwischen Ja/Nein umgeschaltet werden. Das &Auml;ndern des Templates <strong>templates/".GET_LANGUAGE()."/html/guest/guest_register.tpl</strong> ist nicht mehr n&ouml;tig.";
index bb60047..cd6f4c4 100644 (file)
@@ -64,7 +64,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_removeip' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_removeip' LIMIT 1";
 
        // Remove filters
        UNREGISTER_FILTER('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, $dry_run);
index d3afb2b..d3b1a5d 100644 (file)
@@ -56,7 +56,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='repair' LIMIT 5";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='repair' LIMIT 5";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index 0ef248c..89f17b0 100644 (file)
@@ -61,7 +61,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_rewrite' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_rewrite' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index e4c155e..e113c39 100644 (file)
@@ -384,23 +384,23 @@ case "remove": // Do stuff when removing extension
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_campaign_assigns`";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_admin_data`";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_sponsor_display_data`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd') LIMIT 20";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='sponsor' LIMIT 5";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='sponsor' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='sponsor' OR what IN('repr_sponsor','sponsor_medit','sponsor_madd') LIMIT 20";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='sponsor' LIMIT 5";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='sponsor' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE action='sponsor' LIMIT 4";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='sponsor' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='sponsor' LIMIT 4";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='sponsor' LIMIT 1";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='Y' WHERE active='N'";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='Y' WHERE is_active='N'";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE action='sponsor' LIMIT 4";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='sponsor' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='sponsor' LIMIT 4";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='sponsor' LIMIT 1";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_menu` SET active='N' WHERE active='Y'";
        $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_sponsor_registry` SET is_active='N' WHERE is_active='Y'";
        break;
index a64088a..3cc2446 100644 (file)
@@ -84,7 +84,7 @@ LIMIT 10";
 (action='extras' AND (`what`='' OR `what` IS NULL)) OR
 (action='rals' AND (`what`='' OR `what` IS NULL)) OR
 (action='account' AND (`what`='' OR `what` IS NULL))";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='main' WHERE
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='main' WHERE
 action='stats' OR
 action='extras' OR
 action='rals' OR
@@ -210,7 +210,7 @@ case "update": // Update an extension
                break;
 
        case "0.1.1": // SQL queries for v0.1.1
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Men&uuml;punkt (what-welcome ist Standart) als Einstiegspunkt in das Men&uuml;system genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Men&uuml;punkt (what-welcome ist Standart) als Einstiegspunkt in das Men&uuml;system genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1";
                $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT '-1'";
                $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365)."";
 
@@ -363,8 +363,8 @@ case "update": // Update an extension
                break;
 
        case "0.3.0": // SQL queries for v0.3.0
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1";
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='Mailverg&uuml;tungen...' WHERE `what`='payments' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailverg&uuml;tungen...' WHERE `what`='payments' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Zwei Men&uuml;punkte umbenannt.";
@@ -474,8 +474,8 @@ PRIMARY KEY (id)
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')";
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')";
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')";
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='stats', sort='1', title='Klick-Mails' WHERE `what`='stats' LIMIT 1";
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='3' WHERE `what`='reflinks' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Mitgliedsmen&uuml; komplett umgebaut.";
@@ -672,7 +672,7 @@ INDEX (`stats_type`)
                break;
 
        case "0.5.7": // SQL queries for v0.5.7
-               $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='list_norefs' LIMIT 1";
+               $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='list_norefs' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Auflistung der Mitglieder ohne Werber nach what=list_user&amp;mode=norefs verschoben.";
index 86309cb..b2965e5 100644 (file)
@@ -60,7 +60,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='task' LIMIT 2";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='task' LIMIT 2";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index 15610a5..14e8a9e 100644 (file)
@@ -60,10 +60,10 @@ case "remove": // Do stuff when removing extension
        $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='theme' LIMIT 4";
 
        // Delete guest menu entries
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='themes' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='themes' LIMIT 1";
 
        // Delete member menu entries
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='themes' OR `what`='themes' LIMIT 2";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='themes' OR `what`='themes' LIMIT 2";
        break;
 
 case "activate": // Do stuff when admin activates this extension
@@ -140,8 +140,8 @@ INDEX (`theme_active`)
                // Memember menu
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')";
                $SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','themes','Designs', 6,'Y','N')";
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='8' WHERE action='themes' LIMIT 1";
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='account', sort='1', title='Designs' WHERE `what`='themes' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='8' WHERE `action`='themes' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='account', `sort`='1', `title`='Designs' WHERE `what`='themes' LIMIT 1";
 
                // User data
                $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'";
index 9acd5d9..d989103 100644 (file)
@@ -60,18 +60,18 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='top10' LIMIT 1";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='config_top10' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='top10' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_top10' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE what='top10' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='top10' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='top10' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='top10' LIMIT 1";
        break;
 
 case "update": // Update an extension
index 6b89ad4..284ae41 100644 (file)
@@ -105,19 +105,19 @@ case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`";
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='transfer' LIMIT 4";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='transfer' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer' LIMIT 4";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer' LIMIT 1";
        $SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP opt_in";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='transfer' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='transfer' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1";
        break;
 
 case "update": // Update an extension
@@ -248,7 +248,7 @@ case "update": // Update an extension
                break;
 
        case "0.2.5": // SQL queries for v0.2.5
-               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='5' WHERE what='transfer' LIMIT 1";
+               $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Mitgliedsmen&uuml; komplett ge&auml;ndert.";
index 301c92a..8af5780 100644 (file)
@@ -56,7 +56,7 @@ case "register": // Do stuff when installation is running (modules.php?module=ad
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='usage' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='usage' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
index 5d3ac30..1b95422 100644 (file)
@@ -89,21 +89,21 @@ PRIMARY KEY(id)
 case "remove": // Do stuff when removing extension
        // SQL commands to run
        $SQLs[] = "DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='wernis'";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE what='wernis' LIMIT 1";
-       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE what='wernis_portal' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='wernis'";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='wernis' LIMIT 1";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal' LIMIT 1";
        break;
 
 case "activate": // Do stuff when admin activates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE what='wernis_portal' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='wernis' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis' LIMIT 1";
        break;
 
 case "deactivate": // Do stuff when admin deactivates this extension
        // SQL commands to run
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE what='wernis_portal' LIMIT 1";
-       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE what='wernis' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1";
+       $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1";
        break;
 
 case "update": // Update an extension
index a3a476c..52323fe 100644 (file)
@@ -78,11 +78,11 @@ if (getTotalFatalErrors() > 0) {
        }
 
        // Message to regular users (non-admin)
-       $CORR = FATAL_REPORT_ERRORS;
+       $CORR = getMessage('FATAL_REPORT_ERRORS');
 
        // PHP warnings fixed
        if ($check == "done") {
-               if (IS_ADMIN()) $CORR = FATAL_CORRECT_ERRORS;
+               if (IS_ADMIN()) $CORR = getMessage('FATAL_CORRECT_ERRORS');
        } // END - if
 
        // Load footer template
index 8715aed..f479861 100644 (file)
@@ -44,7 +44,7 @@ function INIT_FILTER_SYSTEM () {
        // Is the filter already initialized?
        if ((isset($filters)) && (is_array($filters))) {
                // Then abort here
-               addFatalMessage(FILTER_FAILED_ALREADY_INIT);
+               addFatalMessage(getMessage('FILTER_FAILED_ALREADY_INIT'));
                return false;
        } // END - if
 
@@ -144,7 +144,7 @@ function REGISTER_FILTER ($filterName, $filterFunction, $silentAbort = true, $fo
        if ((isset($filters[$filterName][$filterFunction])) && (!$force)) {
                // Then abort here
                if (!$silentAbort) {
-                       addFatalMessage(sprintf(FILTER_FAILED_ALREADY_ADDED, $filterFunction, $filterName));
+                       addFatalMessage(sprintf(getMessage('FILTER_FAILED_ALREADY_ADDED'), $filterFunction, $filterName));
                } // END - if
 
                // Abort here
@@ -154,7 +154,7 @@ function REGISTER_FILTER ($filterName, $filterFunction, $silentAbort = true, $fo
        // Is the function there?
        if (!function_exists($filterFunction)) {
                // Then abort here
-               addFatalMessage(sprintf(FILTER_FAILED_NOT_FOUND, $filterFunction, $filterName));
+               addFatalMessage(sprintf(getMessage('FILTER_FAILED_NOT_FOUND'), $filterFunction, $filterName));
                return false;
        } // END - if
 
@@ -178,7 +178,7 @@ function UNREGISTER_FILTER ($filterName, $filterFunction, $force = false, $dry_r
        // Is that filter there?
        if ((!isset($filters[$filterName][$filterFunction])) && (!$force)) {
                // Not found, so abort here
-               addFatalMessage(sprintf(FILTER_FAILED_NOT_REMOVED, $filterFunction, $filterName));
+               addFatalMessage(sprintf(getMessage('FILTER_FAILED_NOT_REMOVED'), $filterFunction, $filterName));
                return false;
        } // END - if
 
@@ -199,7 +199,7 @@ function RUN_FILTER ($filterName, $data = null, $silentAbort = true) {
                // Then abort here (quick'N'dirty hack)
                if ((!$silentAbort) && (defined('FILTER_FAILED_NO_FILTER_FOUND'))) {
                        // Add fatal message
-                       addFatalMessage(sprintf(FILTER_FAILED_NO_FILTER_FOUND, $filterName));
+                       addFatalMessage(sprintf(getMessage('FILTER_FAILED_NO_FILTER_FOUND'), $filterName));
                } // END - if
 
                // Abort here
@@ -251,7 +251,7 @@ function FILTER_FLUSH_FILTERS () {
        // Is a database link here and not in installation mode?
        if ((!is_resource($link)) && (!isBooleanConstantAndTrue('mxchange_installing'))) {
                // Abort here
-               addFatalMessage(sprintf(FILTER_FLUSH_FAILED_NO_DATABASE, $filterFunction, $filterName));
+               addFatalMessage(sprintf(getMessage('FILTER_FLUSH_FAILED_NO_DATABASE'), $filterFunction, $filterName));
                return false;
        } // END - if
 
@@ -347,7 +347,7 @@ function FILTER_REDIRECT_TO_LOGOUT_SQL_PATCHES () {
        // Is the element set?
        if (isset($GLOBALS['ext_load_mode'])) {
                // Redirect here
-               LOAD_URL("modules.php?module=admin&logout=1&".$GLOBALS['ext_load_mode']."=sql_patches");
+               LOAD_URL("modules.php?module=admin&amp;logout=1&amp;".$GLOBALS['ext_load_mode']."=sql_patches");
        } // END - if
 
        // This should not happen!
@@ -512,7 +512,7 @@ function FILTER_CHECK_ADMIN_ACL () {
 // Filter for initializing randomizer
 function FILTER_INIT_RANDOMIZER () {
        // Simply init the randomizer with seed and _ADD value
-       mt_srand(make_seed() + constant('_ADD'));
+       mt_srand(generateSeed() + constant('_ADD'));
 }
 
 //
index 9a7bd4b..2b393d7 100644 (file)
@@ -3184,7 +3184,7 @@ function debug_report_bug ($message = "") {
 }
 
 // Generates a ***weak*** seed (taken from de.php.net/mt_srand)
-function make_seed () {
+function generateSeed () {
        list($usec, $sec) = explode(" ", microtime());
        return ((float)$sec + (float)$usec);
 }
@@ -3228,6 +3228,16 @@ function convertCodeToMessage ($code) {
        return $msg;
 }
 
+// Checks wether the given extension is currently not installed
+// and redirects if so.
+function REDIRCT_ON_UNINSTALLED_EXTENSION ($ext_name) {
+       // Is the extension uninstalled/inactive?
+       if (!EXT_IS_ACTIVE($ext_name)) {
+               // Redirect to index
+               LOAD_URL("modules.php?module=index&amp;msg=".constant('CODE_EXTENSION_PROBLEM')."&amp;ext=".$ext_name);
+       } // END - if
+}
+
 //////////////////////////////////////////////////
 // AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS //
 //////////////////////////////////////////////////
index f2cc829..c2aa8b0 100644 (file)
@@ -441,7 +441,9 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
                break;
        }
 } else {
+       // Already installed!
        addFatalMessage(getMessage('ALREADY_INSTALLED'));
 }
+
 //
 ?>
index 86d8cee..82c16b7 100644 (file)
@@ -92,10 +92,10 @@ define('FATAL_INC_WRITABLE', "Das Verzeichnis inc ist beschreibbar! Bitte setzen
 define('LANG_WRITE_FOOTER', "Scriptname, -version und -author anzeigen?");
 define('LANG_FRAMESET_ACTIVE', "Soll das Frameset aktiviert werden? (Wenn nein wird ein Table-Set aktiviert)");
 define('MYSQL_ERRORS', "Es sind MySQL-Fehler aufgetreten! Bitte korregieren Sie diese!");
-define('LANG_MOD_UNKNOWN_1', "Der Return-Code <u>");
-define('LANG_MOD_UNKNOWN_2', "</u> ist unbekannt!");
-define('LANG_MOD_LOCKED_1', "Das Modul <u>");
-define('LANG_MOD_LOCKED_2', "</u> wurde gesperrt!");
+define('LANG_MOD_REG_UNKNOWN_1', "Der Return-Code <u>");
+define('LANG_MOD_REG_UNKNOWN_2', "</u> ist unbekannt!");
+define('LANG_MOD_REG_LOCKED_1', "Das Modul <u>");
+define('LANG_MOD_REG_LOCKED_2', "</u> wurde gesperrt!");
 define('ADMIN_UNKNOWN_ACTION_1', "Unbekannte Admin-Aktion <u>");
 define('ADMIN_UNKNOWN_ACTION_2', "</u> erkannt! Bitte das Modul richtig aufrufen!");
 define('ADMIN_ACTION_404_1', "Admin-Modul f&uuml;r Aktion <u>");
index 6833a57..b59e0cf 100644 (file)
@@ -97,10 +97,10 @@ define('FATAL_INC_WRITABLE', "Directory inc is writeable! Please set the access
 define('LANG_WRITE_FOOTER', "Display name, version and author of this script?");
 define('LANG_FRAMESET_ACTIVE', "Enable frameset? If not a table-set will be used instead.");
 define('MYSQL_ERRORS', "MySQL errors detected. Please correct first to continue.");
-define('LANG_MOD_UNKNOWN_1', "Unknown return-code <u>");
-define('LANG_MOD_UNKNOWN_2', "</u> detected!");
-define('LANG_MOD_LOCKED_1', "Selected module <u>");
-define('LANG_MOD_LOCKED_2', "</u> is locked!");
+define('LANG_MOD_REG_UNKNOWN_1', "Unknown return-code <u>");
+define('LANG_MOD_REG_UNKNOWN_2', "</u> detected!");
+define('LANG_MOD_REG_LOCKED_1', "Selected module <u>");
+define('LANG_MOD_REG_LOCKED_2', "</u> is locked!");
 define('ADMIN_UNKNOWN_ACTION_1', "Unknown administrator-action <u>");
 define('ADMIN_UNKNOWN_ACTION_2', "</u> detected. Please call this module correctly!");
 define('ADMIN_ACTION_404_1', "Administrator module for action <u>");
index 26fd2fa..868ff43 100644 (file)
@@ -297,7 +297,7 @@ ORDER BY `sort`", __FILE__, __LINE__);
                {
                        // Load sub menus
                        $result_sub = SQL_QUERY_ESC("SELECT what, title FROM `{!_MYSQL_PREFIX!}_sponsor_menu`
-WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ".$WHERE."
+WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$WHERE."
 ORDER BY `sort`", array($action), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result_sub) > 0)
                        {
index 3b52f3c..bddf3e2 100644 (file)
@@ -264,7 +264,7 @@ function SURFBAR_VALIDATE_MEMBER_ACTION_STATUS ($action, $status) {
        global $SURFBAR_CACHE;
 
        // Search for the requested action/status combination in database
-       $result = SQL_QUERY_ESC("SELECT new_status FROM `{!_MYSQL_PREFIX!}_surfbar_actions` WHERE action='%s' AND `status`='%s' LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT new_status FROM `{!_MYSQL_PREFIX!}_surfbar_actions` WHERE `action`='%s' AND `status`='%s' LIMIT 1",
                array($action, $status), __FILE__, __LINE__);
 
        // Is the entry there?
index 9230839..50174c2 100644 (file)
@@ -344,7 +344,7 @@ function ADMIN_DO_ACTION($wht) {
 
        // Check if action/what pair is valid
        $result_action = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu`
-WHERE action='%s' AND ((what='%s' AND what != 'overview') OR ((what='' OR `what` IS NULL) AND '%s'='overview'))
+WHERE `action`='%s' AND ((what='%s' AND what != 'overview') OR ((what='' OR `what` IS NULL) AND '%s'='overview'))
 LIMIT 1", array($act, $wht, $wht), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_action) == 1) {
 
@@ -457,7 +457,7 @@ function ADD_ADMIN_MENU($act, $wht, $return=false) {
                                }
                                $OUT .= "</NOBR></td>
 </tr>\n";
-                               $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
+                               $result_what = SQL_QUERY_ESC("SELECT what, title, descr FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`, id DESC",
                                        array($menu), __FILE__, __LINE__);
                                if ((SQL_NUMROWS($result_what) > 0) && ($act == $menu))
                                {
index 3f32393..12798e8 100644 (file)
@@ -68,7 +68,7 @@ VALUES ('%s','%s','%s','%s','%s','%s','%s','%s','%s')",
 ), __FILE__, __LINE__);
 
                // Load ID
-               $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE start_time='%s' AND end_time='%s' AND title='%s' LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_rallye_data` WHERE start_time='%s' AND end_time='%s' AND `title`='%s' LIMIT 1",
                 array($START, $END, $_POST['title']), __FILE__, __LINE__);
                list($id) = SQL_FETCHROW($result);
                SQL_FREERESULT($result);
index 23849f3..acc0bb2 100644 (file)
@@ -89,7 +89,7 @@ if (!isset($_POST['ok']))
                // Load sub menus :)
                foreach ($menus as $key_main => $value_main)
                {
-                       $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+                       $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
                         array($value_main), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) > 0)
                        {
index 8754380..b20760d 100644 (file)
@@ -200,21 +200,21 @@ WHERE ".$AND." AND id=%s LIMIT 1",
                // Get IDs
                if (!empty($_GET['w'])) {
                        // Sub menus selected
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
                                array($_GET['act'], bigintval($_GET['tid'])), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
-                       $result = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
                                array($_GET['act'], bigintval($_GET['fid'])), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                } else {
                        // Main menu selected
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
                                array(bigintval($_GET['tid'])), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
                                array(bigintval($_GET['fid'])), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
@@ -222,9 +222,9 @@ WHERE ".$AND." AND id=%s LIMIT 1",
 
                if ((!empty($tid)) && (!empty($fid))) {
                        // Sort menu
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
                        CACHE_PURGE_ADMIN_MENU(0, "", "", $AND);
                }
@@ -233,7 +233,7 @@ WHERE ".$AND." AND id=%s LIMIT 1",
        // By default list menus
        if (!empty($SUB)) {
                // Sub menus of a main menu
-               $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
+               $result = SQL_QUERY_ESC("SELECT id, action, what, title, sort FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort` ASC",
                 array($SUB), __FILE__, __LINE__);
        } else {
                // Main menus
index 3a9c3ae..9c3ae2c 100644 (file)
@@ -73,7 +73,7 @@ case "target": // Set which what-file will be placed in home-page (only modules.
        // Load all what menu points
        $result = SQL_QUERY("SELECT id, what, title
 FROM `{!_MYSQL_PREFIX!}_guest_menu`
-WHERE action='main' AND `what` != '' AND `what` IS NOT NULL AND `locked`='N'
+WHERE `action`='main' AND `what` != '' AND `what` IS NOT NULL AND `locked`='N'
 ORDER BY `sort` ASC", __FILE__, __LINE__);
 
        $SW = 2; $OUT = ""; $atitle = "";
index 68f4307..6ae6c9b 100644 (file)
@@ -90,7 +90,7 @@ if (isset($_POST['edit'])) {
                $id = bigintval($id);
 
                // Update module
-               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET title='%s', `locked`='%s', hidden='%s', admin_only='%s', mem_only='%s' WHERE id=%s LIMIT 1",
+               SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `title`='%s', `locked`='%s', hidden='%s', admin_only='%s', mem_only='%s' WHERE id=%s LIMIT 1",
                        array($_POST['title'][$id], $_POST['locked'][$id], $_POST['hidden'][$id], $_POST['admin'][$id], $_POST['member'][$id], $id),  __FILE__, __LINE__);
        }
 
index 8e063e7..3bd9a5c 100644 (file)
@@ -89,7 +89,7 @@ if (!isset($_POST['ok'])) {
                foreach ($menus as $key_main => $value_main) {
                        $result = SQL_QUERY_ESC("SELECT what, title, sort
 FROM `{!_MYSQL_PREFIX!}_guest_menu`
-WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
  array($value_main), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) > 0)
                        {
index c2d46fa..3f67c4c 100644 (file)
@@ -157,7 +157,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
                        $sel = bigintval($sel);
 
                        // Update entry
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array($menu, $_POST['sel_action'][$sel], $_POST['sel_what'][$sel], $sel),__FILE__, __LINE__);
                }
                LOAD_TEMPLATE("admin_settings_saved", false, getMessage('SETTINGS_SAVED'));
@@ -247,21 +247,21 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
                // Get IDs
                if (!empty($_GET['w'])) {
                        // Sub menus selected
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
                         array($_GET['act'], bigintval($_GET['tid'])), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
                         array($_GET['act'], bigintval($_GET['fid'])), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                } else {
                        // Main menu selected
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
                         array(bigintval($_GET['tid'])), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
                         array(bigintval($_GET['fid'])), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
@@ -269,9 +269,9 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO()))
 
                if ((!empty($tid)) && (!empty($fid))) {
                        // Sort menu
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
                } // END - if
        } // END - if
index c075449..e783f52 100644 (file)
@@ -86,7 +86,7 @@ if (!isset($_POST['ok'])) {
 
                // Load sub menus :)
                foreach ($menus as $key_main => $value_main) {
-                       $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND `what` != '' ORDER BY `sort`",
+                       $result = SQL_QUERY_ESC("SELECT what, title, sort FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `what` != '' ORDER BY `sort`",
                                array($value_main), __FILE__, __LINE__);
                        if (SQL_NUMROWS($result) > 0) {
                                // Initialize arrays
index d89f0f4..fb80b42 100644 (file)
@@ -182,7 +182,7 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) {
                switch ($_POST['ok'])
                {
                case "edit": // Edit menu
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET title='%s', action='%s', what='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `title`='%s', `action`='%s', `what`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array($menu, $_POST['sel_act'][$sel], $_POST['sel_what'][$sel], $sel), __FILE__, __LINE__);
                        break;
 
@@ -209,29 +209,29 @@ if ((isset($_POST['edit'])) && ($chk > 0) && (!IS_DEMO())) {
                // Get IDs
                if (!empty($_GET['w'])) {
                        // Sub menus selected
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
                         array(bigintval($_GET['act']), bigintval($_GET['tid'])), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `sort`='%s' LIMIT 1",
                         array(bigintval($_GET['act']), bigintval($_GET['fid'])), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                        SQL_FREERESULT($result);
                } else {
                        // Main menu selected
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
                         array(bigintval($_GET['tid'])), __FILE__, __LINE__);
                        list($tid) = SQL_FETCHROW($result);
-                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (what='' OR `what` IS NULL) AND sort='%s' LIMIT 1",
+                       $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE (what='' OR `what` IS NULL) AND `sort`='%s' LIMIT 1",
                         array(bigintval($_GET['fid'])), __FILE__, __LINE__);
                        list($fid) = SQL_FETCHROW($result);
                }
 
                if ((!empty($tid)) && (!empty($fid))) {
                        // Sort menu
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array(bigintval($_GET['tid']), bigintval($fid)), __FILE__, __LINE__);
-                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='%s' WHERE ".$AND." AND id=%s LIMIT 1",
+                       SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `sort`='%s' WHERE ".$AND." AND id=%s LIMIT 1",
                                array(bigintval($_GET['fid']), bigintval($tid)), __FILE__, __LINE__);
                } // END - -fi
        }
index e17ad5a..803f11b 100644 (file)
@@ -58,11 +58,11 @@ while (list($id, $act) = SQL_FETCHROW($result_fix)) {
 }
 
 // Set logout weight to 999
-SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET sort='999' WHERE action='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
+SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `sort`='999' WHERE `action`='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
 
 // Now sort every each menu
 foreach ($ACTIONS as $act) {
-       $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+       $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
                array($act), __FILE__, __LINE__);
        $cnt = 1;
        while (list($id) = SQL_FETCHROW($result_fix)) {
index 0215024..5a42fcb 100644 (file)
@@ -57,11 +57,11 @@ while (list($id, $act) = SQL_FETCHROW($result_fix))
        $cnt++;
 }
 // Set logout weight to 999
-$result_sort = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort='999' WHERE action='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
+$result_sort = SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET sort='999' WHERE `action`='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
 
 // Now sort every each menu
 foreach ($ACTIONS as $act) {
-       $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+       $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
                array($act), __FILE__, __LINE__);
        $cnt = 1;
        while (list($id) = SQL_FETCHROW($result_fix)) {
index 0e8b32f..83c4d9b 100644 (file)
@@ -57,11 +57,11 @@ while (list($id, $act) = SQL_FETCHROW($result_fix)) {
        $cnt++;
 }
 // Set logout weight to 999
-SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='999' WHERE action='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
+SQL_QUERY("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET sort='999' WHERE `action`='logout' AND (what='' OR `what` IS NULL) LIMIT 1", __FILE__, __LINE__);
 
 // Now sort every each menu
 foreach ($ACTIONS as $act) {
-       $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
+       $result_fix = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ORDER BY `sort`",
                array($act), __FILE__, __LINE__);
        $cnt = 1;
        while (list($id) = SQL_FETCHROW($result_fix)) {
index eb04fed..7da2d06 100644 (file)
@@ -45,10 +45,8 @@ $INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
        LOAD_INC($INC);
-} elseif ($IS_VALID) {
-       addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
-       addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+       addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 }
 
 //
index 4a1528f..89989bd 100644 (file)
@@ -45,15 +45,11 @@ ADD_DESCR("guest", __FILE__);
 
 // Load the include file
 $INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
-$IS_VALID = WHAT_IS_VALID($GLOBALS['action'], $GLOBALS['what'], "guest");
-
-if ((FILE_READABLE($INC)) && ($IS_VALID)) {
+if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
        LOAD_INC($INC);
-} elseif ($IS_VALID) {
-       addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
-       addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+       addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 }
 
 //
index 39edeef..6468059 100644 (file)
@@ -48,10 +48,8 @@ $INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
        LOAD_INC($INC);
-} elseif ($IS_VALID) {
-       addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
-       addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+       addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 }
 
 //
index d2a0a9c..a6f754c 100644 (file)
@@ -50,10 +50,8 @@ $INC = sprintf("inc/modules/guest/what-%s.php", SQL_ESCAPE($GLOBALS['what']));
 if (FILE_READABLE($INC)) {
        // Ok, we finally load the guest action module
        LOAD_INC($INC);
-} elseif ($IS_VALID) {
-       addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 } else {
-       addFatalMessage(sprintf(getMessage('GUEST_LOCKED_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
+       addFatalMessage(sprintf(getMessage('GUEST_404_ACTION'), SQL_ESCAPE($GLOBALS['what'])));
 }
 
 //
index 50d7d98..229c074 100644 (file)
@@ -79,7 +79,7 @@ OUTPUT_HTML("   </td>
   <td valign=\"top\" align=\"center\" rowspan=\"3\" class=\"member_content\">");
 
 $INC_ACTION = sprintf("inc/modules/member/action-%s.php", $act);
-if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("member", GET_ACTION("member", $GLOBALS['what']), $GLOBALS['what']))) {
+if ((FILE_READABLE($INC_ACTION)) && (VALIDATE_MENU_ACTION("member", $GLOBALS['action'], $GLOBALS['what']))) {
        // Requested module is available so we load it
        LOAD_INC($INC_ACTION);
 } else {
index a233f5b..98c45fe 100644 (file)
@@ -252,7 +252,7 @@ function ADD_DESCR ($ACC_LVL, $file, $return = false, $output = true) {
                        break;
                }
                $dummy = substr($search, 0, -4);
-               $AND .= " AND action='".GET_ACTION($ACC_LVL, $dummy)."'";
+               $AND .= " AND `action`='".GET_ACTION($ACC_LVL, $dummy)."'";
        } elseif (($ACC_LVL == "sponsor") || ($ACC_LVL == "engine")) {
                // Sponsor / engine menu
                $type = "what";
@@ -335,7 +335,10 @@ function ADD_MENU ($MODE, $act, $wht) {
        $main_action = "";
        $sub_what = "";
 
-       if (!VALIDATE_MENU_ACTION($MODE, $act, $wht, true)) return getMessage('CODE_MENU_NOT_VALID');
+       // is the menu action valid?
+       if (!VALIDATE_MENU_ACTION($MODE, $act, $wht, true)) {
+               return getMessage('CODE_MENU_NOT_VALID');
+       } // END - if
 
        // Non-admin shall not see all menus
        if (!IS_ADMIN()) {
@@ -363,7 +366,7 @@ function ADD_MENU ($MODE, $act, $wht) {
                        // Load menu header template
                        LOAD_TEMPLATE($MODE."_menu_title", false, $content);
 
-                       $result_sub = SQL_QUERY_ESC("SELECT title, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE action='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
+                       $result_sub = SQL_QUERY_ESC("SELECT title, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
                         array($MODE, $main_action), __FILE__, __LINE__);
                        $ctl = SQL_NUMROWS($result_sub);
                        if ($ctl > 0) {
@@ -518,7 +521,7 @@ function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
                        while (list($value, $comment) = SQL_FETCHROW($result)) {
                                $OUT .= "      <option value=\"".$value."\"";
                                if ($_POST['max_mails'] == $value) $OUT .= " selected=\"selected\"";
-                               $OUT .= ">".$value." ".PER_DAY;
+                               $OUT .= ">".$value." {--PER_DAY--}";
                                if (!empty($comment)) $OUT .= " (".$comment.")";
                                $OUT .= "</option>\n";
                        }
@@ -541,7 +544,7 @@ function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
                        while (list($value, $comment) = SQL_FETCHROW($result)) {
                                $OUT .= "      <option value=\"".$value."\"";
                                if ($default == $value) $OUT .= " selected=\"selected\"";
-                               $OUT .= ">".$value." ".PER_DAY;
+                               $OUT .= ">".$value." {--PER_DAY--}";
                                if (!empty($comment)) $OUT .= " (".$comment.")";
                                $OUT .= "</option>\n";
                        }
@@ -550,7 +553,7 @@ function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
                        $OUT = LOAD_TEMPLATE("member_receive_table", true);
                } else {
                        // Maybe the admin has to setup some maximum values?
-                       $OUT = LOAD_TEMPLATE("admin_settings_saved", true, NO_MAX_VALUES);
+                       $OUT = LOAD_TEMPLATE("admin_settings_saved", true, getMessage('NO_MAX_VALUES'));
                }
                break;
        }
@@ -580,42 +583,6 @@ function SEARCH_EMAIL_USERTAB ($email) {
        return $ret;
 }
 
-// Checks wether 'what' is valid
-// @TODO This cache can be flushed to hard drive
-function WHAT_IS_VALID ($act, $wht, $type="guest") {
-       global $cacheArray;
-
-       // Is admin or cache entry is there?
-       if (IS_ADMIN()) {
-               // Everything is valid to the admin :-)
-               $ret = true;
-       } elseif (isset($cacheArray['what_valid'][$type][$act][$what])) {
-               // Use the cache
-               $ret = $cacheArray['what_valid'][$type][$act][$what];
-
-               // Count the cache hit
-               incrementConfigEntry('cache_hits');
-       } else {
-               // By default is nothing valid
-               $ret = false;
-
-               // Look in database
-               $result = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE action='%s' AND what='%s' AND `locked`='N' LIMIT 1", array($type, $act, $wht), __FILE__, __LINE__);
-
-               // Is "what" valid?
-               $ret = (SQL_NUMROWS($result) == 1);
-
-               // Free the result
-               SQL_FREERESULT($result);
-       }
-
-       // Cache the entry
-       $cacheArray['what_valid'][$type][$act][$what] = $ret;
-
-       // Return the result
-       return $ret;
-}
-
 // Checks wether the current user is a member
 function IS_MEMBER () {
        global $status, $LAST, $cacheArray;
@@ -682,6 +649,17 @@ function IS_MEMBER () {
 
 // Validate the given menu action
 function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
+       global $cacheArray;
+
+       // Is the cache entry there and we shall not update?
+       if ((isset($cacheArray['action_valid'][$MODE][$act][$wht])) && ($UPDATE === false)) {
+               // Count cache hit
+               incrementConfigEntry('cache_hits');
+
+               // Then use this cache
+               return $cacheArray['action_valid'][$MODE][$act][$wht];
+       } // END - if
+
        // By default nothing is valid
        $ret = false;
 
@@ -690,23 +668,23 @@ function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
        if ((!IS_ADMIN()) && ($MODE != "admin")) $ADD = " AND `locked`='N'";
 
        //* DEBUG: */ echo __LINE__.":".$MODE."/".$act."/".$wht."*<br />\n";
-       if (($MODE != "admin") && ($UPDATE)) {
+       if (($MODE != "admin") && ($UPDATE === true)) {
                // Update guest or member menu
-               $SQL = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE action='%s' AND what='%s'".$ADD." LIMIT 1",
+               $SQL = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$ADD." LIMIT 1",
                        array($MODE, $act, $wht), __FILE__, __LINE__, false);
-       } elseif ($wht != "overview") {
+       } elseif (($wht != "overview") && (!empty($wht))) {
                // Other actions
-               $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE action='%s'".$ADD." ORDER BY action DESC LIMIT 1",
-                       array($MODE, $act), __FILE__, __LINE__, false);
+               $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$ADD." ORDER BY action DESC LIMIT 1",
+                       array($MODE, $act, $wht), __FILE__, __LINE__, false);
        } else {
                // Admin login overview
-               $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE action='%s' AND (what='' OR `what` IS NULL)".$ADD." ORDER BY action DESC LIMIT 1",
+               $SQL = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND (what='' OR `what` IS NULL)".$ADD." ORDER BY action DESC LIMIT 1",
                        array($MODE, $act), __FILE__, __LINE__, false);
        }
 
        // Run SQL command
        $result = SQL_QUERY($SQL, __FILE__, __LINE__);
-       if ($UPDATE) {
+       if ($UPDATE === true) {
                // Check updated/affected rows
                $ret = (SQL_AFFECTEDROWS() == 1);
        } else {
@@ -717,6 +695,9 @@ function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
        // Free memory
        SQL_FREERESULT($result);
 
+       // Set cache entry
+       $cacheArray['action_valid'][$MODE][$act][$wht] = $ret;
+
        // Return result
        return $ret;
 }
@@ -917,7 +898,7 @@ function GET_ACTION ($MODE, &$wht) {
                if (empty($ret)) $ret = "main";
 
                // Load from database
-               $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE what='%s' LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what`='%s' LIMIT 1",
                        array($MODE, $wht), __FILE__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load action value and pray that this one is the right you want... ;-)
@@ -1521,7 +1502,7 @@ function activateExchange() {
                // Activate System
                $SQLs = array(
                        "UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', hidden='N', mem_only='Y' WHERE module='order' LIMIT 1",
-                       "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE what='order' OR what='unconfirmed' LIMIT 2",
+                       "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' OR `what`='unconfirmed' LIMIT 2",
                        "UPDATE `{!_MYSQL_PREFIX!}_config` SET activate_xchange='0' WHERE config=0 LIMIT 1"
                );
 
index 213a648..04f02e8 100644 (file)
@@ -72,7 +72,7 @@ if (!isset($_GET['page'])) {
 // Already installed?
 if ((isBooleanConstantAndTrue('mxchange_installed')) && (isBooleanConstantAndTrue('admin_registered'))) {
        // Add fatal message
-       addFatalMessage(ALREADY_INSTALLED);
+       addFatalMessage(getMessage('ALREADY_INSTALLED'));
 } // END - if
 
 // Does something goes wrong?
diff --git a/js.php b/js.php
index 73f04b5..644639a 100644 (file)
--- a/js.php
+++ b/js.php
@@ -39,7 +39,8 @@ require("inc/libs/security_functions.php");
 
 // Init "action" and "what"
 global $what, $action;
-$GLOBALS['what'] = ""; $GLOBALS['action'] = "";
+$GLOBALS['what']   = "";
+$GLOBALS['action'] = "";
 
 // This is a fake-CSS file loader, more a JavaScript loader...
 // This is in one way good and in one not. The whole reset part will be
@@ -56,7 +57,7 @@ require("inc/config.php");
 // Is this script installed and a JavaScript tag is provied?
 if ((isBooleanConstantAndTrue('mxchange_installed')) && (isset($_GET['tag']))) {
        // Set header
-       @header("Content-type: text/javascript");
+       header("Content-type: text/javascript");
 
        // Load header
        LOAD_INC_ONCE("inc/header.php");
index e600274..91801e6 100644 (file)
@@ -45,11 +45,8 @@ $GLOBALS['module'] = "mailid"; $CSS = -1;
 require("inc/config.php");
 
 if (isBooleanConstantAndTrue('mxchange_installed')) {
-       // Is the extension active
-       if (!EXT_IS_ACTIVE("mailid", true)) {
-               // Is not activated/installed yet!
-               LOAD_URL("modules.php?module=index&amp;msg=".constant('CODE_EXTENSION_PROBLEM')."&amp;ext=mailid");
-       } // END - if
+       // Is the extension active?
+       REDIRECT_ON_UNINSTALLED_EXTENSION("mailid");
 
        // Init
        $url_uid = 0; $url_bid = 0; $url_mid = 0;
@@ -94,10 +91,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
 
                        case "BONUS":
                                // Is the bonus extension active?
-                               if (!EXT_IS_ACTIVE("bonus")) {
-                                       // Abort here
-                                       LOAD_URL("modules.php?module=index&amp;msg=".constant('CODE_EXTENSION_PROBLEM')."&amp;ext=mailid");
-                               } // END - if
+                               REDIRECT_ON_UNINSTALLED_EXTENSION("bonus");
 
                                // Bonus-Mails
                                $result = SQL_QUERY_ESC("SELECT id, url, subject FROM `{!_MYSQL_PREFIX!}_bonus` WHERE id=%s LIMIT 1",
index b52f974..f3a5d2a 100644 (file)
@@ -202,6 +202,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                        define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
 
                                                                        // Only when user extension = v0.1.2: Update mails-confirmed counter
+                                                                       // @TODO Rewrite these blocks to filter
                                                                        if (GET_EXT_VERSION("user") >= "0.1.2") {
                                                                                // Update counter
                                                                                SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1",
@@ -285,22 +286,18 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                        break;
 
                                                                case "confirm":
-                                                                       if ($code > 0)
-                                                                       {
+                                                                       if ($code > 0) {
                                                                                // Export data into constants for the template
                                                                                define('_CODE_VALUE', $code);
                                                                                define('_UID_VALUE' , $url_uid );
                                                                                define('_TYPE_VALUE', $type);
                                                                                define('_DATA_VALUE', $DATA);
                                                                                define('_TEMPLATE_BANNER', LOAD_TEMPLATE("mailid_banner", true));
-                                                                               if (getConfig('code_length') > 0)
-                                                                               {
+                                                                               if (getConfig('code_length') > 0) {
                                                                                        // Generate Code
                                                                                        define('_IMAGE_CODE', IMG_CODE($code, $type, $DATA, $url_uid));
                                                                                        $templ = "mailid_enter_code";
-                                                                               }
-                                                                                else
-                                                                               {
+                                                                               } else {
                                                                                        // Disabled code
                                                                                        define('__GFX_CODE', $img_code);
                                                                                        $templ = "mailid_confirm_buttom";
@@ -325,24 +322,24 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
                                                                        // Load template
                                                                        LOAD_TEMPLATE("mailid_timer");
                                                                        break;
-                                                               }
+                                                               } // END - switch
                                                        }
-                                                        else LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (6)</div>");
+                                                        else LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (6)</div>");
                                                }
-                                                else LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (5)</div>");
+                                                else LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (5)</div>");
                                        }
-                                        else LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (4)</div>");
+                                        else LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (4)</div>");
                                } else {
                                        SQL_FREERESULT($result);
-                                       LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (3)</div>");
+                                       LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (3)</div>");
                                }
                        } else {
                                SQL_FREERESULT($result);
-                               LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (2)</div>");
+                               LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (2)</div>");
                        }
                } else {
                        SQL_FREERESULT($result);
-                       LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">".MAIL_ALREADY_CONFIRMED." (1)</div>");
+                       LOAD_TEMPLATE("admin_settings_saved", false, "<div class=\"member_failed\">{--MAIL_ALREADY_CONFIRMED--} (1)</div>");
                }
 
                // Insert footer if no image
index 17271bc..58c36a4 100644 (file)
@@ -113,7 +113,7 @@ if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] !=
        case "mem_only":
        case "done":
                // Does the module exists on local file system?
-               if ((FILE_READABLE(__MODULE)) && (getTotalFatalErrors() == 0)) {
+               if ((FILE_READABLE(constant('__MODULE'))) && (getTotalFatalErrors() == 0)) {
                        // Module is valid, active and located on the local disc...
                        $MOD_VALID = true;
                } elseif (!empty($URL)) {
@@ -129,18 +129,18 @@ if ((getConfig('maintenance') == "Y") && (!IS_ADMIN()) && ($GLOBALS['module'] !=
                break;
 
        case "locked":
-               if (!FILE_READABLE(__MODULE)) {
+               if (!FILE_READABLE(constant('__MODULE'))) {
                        // Module does addionally not exists
                        addFatalMessage(LANG_MOD_REG_404_1.$GLOBALS['module'].LANG_MOD_REG_404_2);
                } // END - if
 
                // Add fatal message
-               addFatalMessage(LANG_MOD_LOCKED_1.$GLOBALS['module'].LANG_MOD_LOCKED_2);
+               addFatalMessage(LANG_MOD_REG_LOCKED_1.$GLOBALS['module'].LANG_MOD_REG_LOCKED_2);
                break;
 
        default:
                DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown status %s return from module check. Module=%s", $check, $GLOBALS['module']));
-               addFatalMessage(LANG_MOD_UNKNOWN_1.$check.LANG_MOD_UNKNOWN_2);
+               addFatalMessage(LANG_MOD_REG_UNKNOWN_1.$check.LANG_MOD_REG_UNKNOWN_2);
                break;
        }
 } elseif (getTotalFatalErrors() == 0) {
@@ -154,7 +154,7 @@ if (($MOD_VALID) && (defined('__MODULE'))) {
        /////////////////////////////////////////////
        //
        // Everything is okay so we can load the module
-       LOAD_INC_ONCE(__MODULE);
+       LOAD_INC_ONCE(constant('__MODULE'));
 } // END - if
 
 // Next-to-end add the footer
diff --git a/ref.php b/ref.php
index 918e2ef..c83f596 100644 (file)
--- a/ref.php
+++ b/ref.php
@@ -50,7 +50,7 @@ if (isBooleanConstantAndTrue('mxchange_installed')) {
        switch (getConfig('refid_target'))
        {
        case "register":
-               $URL = "modules.php?module=index&amp;what=register&refid=";
+               $URL = "modules.php?module=index&amp;what=register&amp;refid=";
                break;
 
        case "index":
index 12629fb..a686d06 100644 (file)
@@ -47,10 +47,7 @@ $GLOBALS['module'] = "show_bonus"; $CSS = 0;
 require("inc/config.php");
 
 // Is the "bonus" extension active?
-if (!EXT_IS_ACTIVE("bonus")) {
-       // Redirect to index
-       LOAD_URL("modules.php?module=index&amp;msg=".constant('CODE_EXTENSION_PROBLEM')."&amp;ext=bonus");
-} // END - if
+REDIRECT_ON_UNINSTALLED_EXTENSION("bonus");
 
 // List only rankings when script is installed
 if (isBooleanConstantAndTrue('mxchange_installed')) {
@@ -106,18 +103,18 @@ LIMIT 1",
                                define('__BONUS_MSG', LOAD_TEMPLATE("show_bonus_msg", true));
                        } else {
                                // No data found
-                               define('__BONUS_MSG', "<span class=\"guest_failed\">".BONUS_SHOW_NO_DATA."</span>");
+                               define('__BONUS_MSG', "<span class=\"guest_failed\">{--BONUS_SHOW_NO_DATA--}</span>");
                        }
 
                        // Free memory
                        SQL_FREERESULT($result);
                } else {
                        // Wrong type entered
-                       define('__BONUS_MSG', "<span class=\"guest_failed\">".BONUS_SHOW_WRONG_TYPE."</span>");
+                       define('__BONUS_MSG', "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_TYPE--}</span>");
                }
        } else {
                // Wrong call!
-               define('__BONUS_MSG', "<span class=\"guest_failed\">".BONUS_SHOW_WRONG_CALL."</span>");
+               define('__BONUS_MSG', "<span class=\"guest_failed\">{--BONUS_SHOW_WRONG_CALL--}</span>");
        }
 
        // Load send_bonus header template (for your banners, e.g.?)
index 8d0b535..7bc6567 100644 (file)
@@ -39,7 +39,7 @@ require("inc/config.php");
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Base URL for redirection
-       $URL = "modules.php?module=index&amp;what=sponsor_login&hash=";
+       $URL = "modules.php?module=index&amp;what=sponsor_login&amp;hash=";
        if (empty($_GET['hash'])) {
                // No refid and we add our refid (don't forget to set $def_refid!)
                $URL = "modules.php?module=index";
index 30617e3..cd35f52 100644 (file)
@@ -37,9 +37,9 @@ require("inc/libs/security_functions.php");
 require("inc/config.php");
 
 // Redirect only to registration page when this script is installed
-if (defined('mxchange_installed') && (isBooleanConstantAndTrue(mxchange_installed))) {
+if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Base URL for redirection
-       $URL = "modules.php?module=index&amp;what=sponsor_reg&refid=";
+       $URL = "modules.php?module=index&amp;what=sponsor_reg&amp;refid=";
 
        // Get referal ID from ref or refid variable
        $ref = 0;
index 5adb2f6..c45aff1 100644 (file)
@@ -52,13 +52,14 @@ require("inc/config.php");
 // Is the script installed?
 if (isBooleanConstantAndTrue('mxchange_installed')) {
        // Only logged in users may use this surfbar!
-       if (!EXT_IS_ACTIVE("surfbar")) {
-               // Surfbar deactivated
-               LOAD_URL("modules.php?module=login&amp;msg=".constant('CODE_EXTENSION_PROBLEM')."&amp;ext=surfbar");
-       } elseif (!IS_MEMBER()) {
+       REDIRECT_ON_UNINSTALLED_EXTENSION("surfbar");
+
+       // No member?
+       if (!IS_MEMBER()) {
                // Redirect
+               // @TODO Display quick login form here or redirect as configured
                LOAD_URL("modules.php?module=index");
-       }
+       } // END - if
 
        // Handle tasks on self-maintenance
        SURFBAR_HANDLE_SELF_MAINTENANCE();
index 8c94dae..262227e 100644 (file)
--- a/view.php
+++ b/view.php
@@ -58,7 +58,7 @@ if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['b
                        array(bigintval($_GET['banner'])), __FILE__, __LINE__);
 
                $type = substr($url, -3);
-               @header ("Content-Type: image/".$type);
+               header ("Content-Type: image/".$type);
                LOAD_URL($url, false);
        } else {
                // Free memory
@@ -69,5 +69,5 @@ if (((!empty($_GET['user'])) || (!empty($_GET['reseller']))) && (!empty($_GET['b
        LOAD_URL (URL."/index.php");
 }
 
-// // END - if
+// END - if
 ?>