]> git.mxchange.org Git - mailer.git/commitdiff
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 5f68fbc7616f2def3e953545cfcefc5f1bac809e..ae27b8168f4450c241d1426caba25d3333b17ff6 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 25e737196b7b3c451850cb8feb9a2afbd02d3825..cfbbb60f2de45073fbcac36e6ba69e68f39f6283 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 9e73bd618a847d057ae32873d6035a305c9136bd..9efdc9588be4fbfcf49f22d4dd7e0652010767f2 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 869e3da1e507dfc2e1251e50fa8c79ff36bb829d..fb92ccfbd4d42ec769e6123dde6a73eecec8dcbf 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 75e73ca3d7e5338808eefd61780830e8cc5232de..58bf1ab3e2bee4f77dc057e173669f99c25203ce 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 b54e75612325d30c2ddd5b390bcab96da320f642..b3604ccdb48eee5e698bc55ed26fe5dc17a82ff0 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 9cf42e08189f3e813d4585750f6ba03d84fe1672..2c00f4a3ed0ba82e90abdbca1129966fa9188e26 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 6d02c75fae4e5c8b34d35ea98c1c36a8202f7aa9..5ae10591cb0545a76132b600ca26e27695bccdcf 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 3b42449509377dbe267e52c3f89643ec4051fc24..5c0e33ddadb259bf22ecf974d6cd92a3fce2b9e2 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 bb9e45ccad7884cde1feaf4d5a2ad870672cc618..a8e44246d7d7716161d26aecb009901f2dcd6072 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 b571558af65ff655effb64f3f0638cc7ff990e14..b993625337fefd42cab7cf9a464efffa78cb9e18 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 8d392d64730e46c25f20d97fa1ea95ff368e4711..2c899da2eac1d8c89cf729e8f03d0119c6991d61 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 4a0e9d2612c0dd9ed24fba56445bdbc4cca71015..71aeeb7174745e4b87d34562f505c72297e1f5a7 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 8fad3e4797799f764e8e1790be16e7e250870c45..637aef549464d80e9b50777b088597871c89c57c 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 54a3eb205ccd988d1f89ccd742d3884118a827f5..2acd4e73a8e9cf6607eb7c2f3facee53b17d084a 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 1ae1bc7d38bf7633fa0f46990cad399630b6d232..897c3e370ce69272cd8d9d9ef756c4341cb730fb 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 cb4012117377d65e4e8c39c7c6327215e1e863d8..7a3ebb65886b8fcbf8c606d717008d873a6ace33 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 e8c82f76156d5ff8955b47cb169584ab69ce011c..2f17680dc305908192766d2f9c3ed9f1d912f174 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 bdcaca17671a5b04529ff75b5fe720109c97ecde..4ae49173e827a0667417efe51a4a1530201219b6 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 e2e80cdf578dceb0332b19b24e54fe3f5512dfa8..7db775f15fa115439a83685f8ae23ee7a39d6fff 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 51702da9e91c38e60dba0d050d593228d68d92fb..ded3a2ef56da1b76f32d93dd0f61cc0b372c40a9 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 e8990bd30329b7172e407490d819314284d95217..faa8304e430d04f3fabae7e7d135f80ffb88112d 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 23eb6ec06a0d80001ae88122b21916e17d96e69e..f02f71c1c03f07f696d04b6d11fca7722f4b893c 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 69023ee1de00023e38193d07abb53856b467f3d6..17d838c35d6443182fe2ac91143535f0495dc1eb 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 daaf75603e000412609da91979f9b6858d57af72..e71f0362be7cc7613084c3c5554e760a24ef48da 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 01a6f8f03144b281ab2f73dd1d5abf85b2ee6453..15cd71c8f8941ac802cf4b3c4735785a92a8c163 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 1c2104683b7a0ecdf6c0d0cd6d1da3867cc7fe2d..4c5dbbb25fb7aa672bf62b838f64db11587b6d2e 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 b65fe34d1ca448201d242848aec1eeb9aff529bf..2019fc6792478f06a5c9dd57756ff17b26cd6246 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 1201a78662424a848e639644a0db3dbe0050a10a..6112f61c6d59b34372f1fba4e50c7df6cc921f27 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 dc2a09b86563be88a4a3e4f07e1d2e92cc618dd3..398204c3e41a8f954006c53cf540486de238493b 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 fc3e0669649fc8c8ded41c135d4ac6ed537ae06f..f58dd623549d197f6725bb4a13e651d369494cbe 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 430e2e4a44dbb05ee3cf8d6ca95e27120cca19e9..30070d6788f9ab2a93e320ac405e3f6f37f17b6e 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 f563aa4936f1dcf702f353cada99e6b4dbafcb09..a4d6c26d05b0742bd0415a18e3ffee62af2ceb30 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 8edb325efd47970cefd4815a503c112fdd8e493a..53846bbd782d02cfc153ce23a453b9d05c08b9d2 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 622557095a317622e9836f59d36407c89041015b..8f537ccff4328199b8d68c74a0ef5e4524be390f 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 bb6004716ee73358ecae12c72a95f72fd53cf7a6..cd6f4c4a4bce879e756d2db69a3814cf8cc14d14 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 d3afb2ba9a1ead61972f25f3c7d2467d2474c5ab..d3b1a5d0f80b42d3ed89ee259590b70629a45033 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 0ef248cc22506be1bee52cf671284f6c307678bc..89f17b04ec14bfa0e6b09407e4fe19a6f0109e17 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 e4c155e8725efdd281d4346f5e0ebbaad3c1f996..e113c39dc868b24d29e1ebd2e3bfc33d7e646ffe 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 a64088ad082771f135c43c8f51e265e607a2a5de..3cc2446bf531d90328b48a9edc7f839408771e71 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 86309cb85b4a73b54e1d5f77263fd098d4475835..b2965e57bc7b76aa6de0f62d0b8995e3aeb2be6a 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 15610a5b73e49975d54e76a21e69547f9e647d67..14e8a9e721e3e40def3c54e04037a9fb88680d13 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 9acd5d9105ebfc31046b7c865e472aeb81221f99..d989103ca9480875e9a6b62334c9df343b7a2131 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 6b89ad4da8405ebd3e0c8506548fd11c3e349dcd..284ae4130db03219382e1041433839ed6496e631 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 301c92abe894fc230ff20e0a9a364d9fec24856c..8af57804b300c79dd1b6dd136dc31305b30572ec 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 5d3ac30fbcb092e306d6e35874c1d0fd4dcef358..1b9542224255d78db78398d60677762563ef95ca 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 a3a476ca543d5afcbe8069890861785aac2094c4..52323fe8c8dbe9caa09304a566c670689f9d0aee 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 8715aed08f4d3e0af8c05fdf5c4af5f37cc9375b..f479861e71529c60c960fe529a2e7fd4aad5e798 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 9a7bd4b48448560efd80dd2a97184b6fda57fcfd..2b393d7377c98e925234a84eaeb5a4322ac14169 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 f2cc829fee8603a206e886f5eb75c73f7db10aed..c2aa8b041e2be7b80ef040e5031bb156f6197c7b 100644 (file)
@@ -441,7 +441,9 @@ if ((!isBooleanConstantAndTrue('mxchange_installed')) || (!isBooleanConstantAndT
                break;
        }
 } else {
+       // Already installed!
        addFatalMessage(getMessage('ALREADY_INSTALLED'));
 }
+
 //
 ?>
index 86d8cee23b76ffc4d18ddfaba7e31a5f75ef414b..82c16b744fe38782b7a422df7401772056356ef4 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 6833a5764da6be8ebe54703ff60941cebb52955b..b59e0cf75a57bd21ee1683e49dd5360f71256115 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 26fd2fa9353ff935541a2b4176bb1caefd9ea59c..868ff4386286fa8e384b113105375158043706a7 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 3b52f3cc1a3d082ce108bd905f68a4a0279b1b00..bddf3e2b2d51ea56a7d843f70a3ae8b1a033163b 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 9230839a83dfa2444faeb589dd82ffea50ecb381..50174c2379e853b370a5e238ce81f7d0dd13ad00 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 3f32393e1036bb9626339166142d7a854d9d1300..12798e889970eb523980b60d6f0bc647a8e8ec23 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 23849f3a724e80faafad53bf03db475ea6974f99..acc0bb2f8277d1d9669dc4e970d226e62050bd7a 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 87543809d509b95fbb479806fc73e640dc8fcc5a..b20760df3e0651e96f08d4804e032c6b90b85952 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 3a9c3ae627bc7120311c361b30a4ca60a20a590d..9c3ae2cc5b8eee198229baa2a5ccaa1c6a82fdc1 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 68f43072285d503f50b3606ba940d82ce8ec5789..6ae6c9b6a2ac1d39f1518e4e72592d241daf2220 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 8e063e7757b24ef4cb2bd0653bc21814ad6a9623..3bd9a5c284d4375446d907944b84a3908cc63ecb 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 c2d46fab5b9b77eb53844481b7f6bd8fdae05ea1..3f67c4ca9c2612ccf4403e7d662bf9fdf7cb7718 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 c075449cb7f81de4b1eeb1be5a5bc84c1f12c12a..e783f528c3af0b248e700b337aa6d1edfa3ccf13 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 d89f0f45660a338cdd2dadeadeb6b78a4aa98db9..fb80b42047b90a0411285c1d40192394449e2853 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 e17ad5ad9ed9895a0ac54557b56d3dc9bfaab410..803f11bd170fee1843bdcf6715b356a194ab1625 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 0215024dfab911f1b23263eb9f390e69cc1f41f8..5a42fcb2db636eeb7d579c3b8de93ed01b4b59af 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 0e8b32f4049054dda805b4970b13eeed7cf3c816..83c4d9bbbfea61d7133f8a5b4ed129a7f0d42a1f 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 eb04fed853a909b8e7de5172d185b7c086a4e8b1..7da2d0635584a34628171672473ccd76055b99f8 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 4a1528f74153a590a9efd9a33e7cb101ecce9ffa..89989bd8b4979ff7969bc390fa639d4a21a098f4 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 39edeefbffce6d03f83600a11754508a60794226..646805957024b583842b0631e7575edfd9b08e0d 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 d2a0a9c9eb912cb946f93273ef110dc5a79010ae..a6f754c22faecfa659b741a3fd9af01c435e6862 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 50d7d98f42d0fb969d0e2f454b34ea260e106d04..229c0747c6a46c2fcbb86f9fab4884853dd59875 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 a233f5b7ebdf196ec193c83718d59b5f4fdd7ccd..98c45fe686e0b13b182ae9b1981886483f1e7850 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 213a6485eaf7401f7435ad2389d25e90ee8cc821..04f02e86ba7bc47022897983619c0ebc80cd915a 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 73f04b5a02af12f4fc2c0cdb0598cb6d8dfe5e0d..644639ab498ebc1f6fe11aaa9ff77d9836f29b25 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 e6002741710f8754ef42212b11f27a81534d473b..91801e67bc13efe975da48acdcce4a9f51626955 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 b52f9740fda920872fbae5ebea62f413db87765a..f3a5d2a96004772b5cc5815e7195401a9c6f0ecf 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 17271bca4297916cbb590b18c58fdc5f44e176ad..58c36a4e32fd33f2f97bd7c8c55f9b96c79f372b 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 918e2ef68de13d86b8d7c92c00d8cdc4cd8d5d27..c83f596ccb619c1e946708f3b1264d4abf8e0a0b 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 12629fb9d981d3c53565ef6f4ea9aae5544a9f62..a686d061f4bbd4f94e340cce266b02a32fcdb3ed 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 8d0b535ae905b3eb36530c371fab8a50bc2a53f3..7bc65670dfe160d6194949462ec933acc50806fe 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 30617e362965b856000949b0bb285353ba218764..cd35f52e164e2ba1a11f05ca2cbb5de00436366b 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 5adb2f674e61a21edcc48d880a8cb96aaea72631..c45aff14d3c416916ca344929ee2515edd0e5230 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 8c94dae7eac6b2da5ddeab1b7d4d25b10f3a081b..262227e7a52328595574bd7ddd8991da60b2c391 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
 ?>