Menu moved to extension, index_delay should not have UNSIGNED
authorRoland Häder <roland@mxchange.org>
Sat, 31 Oct 2009 15:51:34 +0000 (15:51 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 31 Oct 2009 15:51:34 +0000 (15:51 +0000)
inc/extensions/ext-bonus.php
inc/extensions/ext-order.php
inc/extensions/ext-sql_patches.php
inc/functions.php
inc/modules/admin/admin-inc.php
inc/wrapper-functions.php
install/menu-de.sql
install/menu-en.sql

index 5c944d5d784c292f206d32ecc8d787581bdff92b..f8650b319d2ab4a1fdcd88f21536534d55fe9215 100644 (file)
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Version of this extension
-setThisExtensionVersion('0.8.8');
+setThisExtensionVersion('0.8.9');
 
 // Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8'));
+setExtensionVersionHistory(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9'));
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
@@ -120,17 +120,15 @@ PRIMARY KEY  (id)
                                break;
 
                        case '0.2.1': // SQL queries for v0.2.1
-                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_bonus' LIMIT 1");
-                               addAdminMenuSql('setup','config_bonus','Bonus-{OPEN_CONFIG}POINTS{CLOSE_CONFIG}','Richten Sie Bonus-{OPEN_CONFIG}POINTS{CLOSE_CONFIG} ein, die beim x&#39;ten Klick auf die Mail verbucht werden sollen. Beispiele: Der 1. Klick sollte mehr {OPEN_CONFIG}POINTS{CLOSE_CONFIG} zus&auml;tzlich bekommen, als der 10. Klick.',8);
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 10.000");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 100.000");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD login_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('ONE_DAY')."");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD turbo_rates VARCHAR(255) NOT NULL DEFAULT '50;20;10'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_ranks TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `login_bonus` FLOAT(20,3) NOT NULL DEFAULT 10.000");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `turbo_bonus` FLOAT(20,3) NOT NULL DEFAULT 100.000");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `login_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('ONE_DAY')."");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `turbo_rates` VARCHAR(255) NOT NULL DEFAULT '50;20;10'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_ranks` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
                                // Use actual month for this update
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD login_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD turbo_bonus FLOAT(20,3) NOT NULL DEFAULT 0.000");
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET ext_has_css='Y' WHERE `ext_name`='bonus' AND ext_has_css='N' LIMIT 1");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `login_bonus` FLOAT(20,3) NOT NULL DEFAULT 0.000");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `turbo_bonus` FLOAT(20,3) NOT NULL DEFAULT 0.000");
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_has_css`='Y' WHERE `ext_name`='bonus' AND `ext_has_css`='N' LIMIT 1");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Login-Bonus und Turbo-Klick-Bonus intergriert.");
@@ -283,13 +281,13 @@ KEY userid (userid)
                                break;
 
                        case '0.4.4': // SQL queries for v0.4.4
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_active ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_order FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_ref FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD bonus_stats FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_order` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_ref` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_stats` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_active` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_order` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ref` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_stats` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Bonus-{?POINTS?} f&uuml;r: Mailbestellung, Referal-Werbung (bei Best. der EMail-Adresse) und wenn 100% Klickrate jeder Mailbuchung erreicht wurde.<br />Template <u>admin_config_bonus_pro.tpl</u> ist &uuml;berfl&uuml;ssig geworden. Bitte l&ouml;schen Sie dies!<br />Eingestellte Bonus-{?POINTS?} f&uuml;r Rank 2 war um eins verschoben.");
@@ -399,8 +397,6 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
                                break;
 
                        case '0.6.4': // SQL queries for v0.6.4
-                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Aktiv-Rallye' WHERE `what`='config_bonus' LIMIT 1");
-
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("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.");
                                break;
@@ -534,6 +530,13 @@ WHERE `last_online` < ".$mark." ORDER BY `userid` ASC");
                        case '0.8.8': // SQL queries for v0.8.8
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` ADD `bonus_stats_active` ENUM('Y','N') NOT NULL DEFAULT 'N'");
 
+                               // Update notes
+                               setExtensionUpdateNotes("Benachrichtigungsmails f&uuml;r z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
+                               break;
+
+                       case '0.8.9': // SQL queries for v0.8.9
+                               addAdminMenuSql('setup','config_bonus','Aktiv-Rallye','Richten Sie eine komplette Aktiv-Rallye hier ein. Legen Sie Verg&uuml;tungen fest, die die Mitglieder f&uuml;r bestimmte Aktionen auf ihr Aktiv-Konto gutgeschrieben bekommen sollen.',8);
+
                                // Update notes
                                setExtensionUpdateNotes("Benachrichtigungsmails f&uuml;r z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.");
                                break;
index 697d9e9e47cbc004bd148cea452220a0ad3e1e53..bb195dd84bc6394db88051d405f3277a40c48094 100644 (file)
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Version number
-setThisExtensionVersion('0.5.0');
+setThisExtensionVersion('0.5.1');
 
 // Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0'));
+setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1'));
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
@@ -55,7 +55,8 @@ switch (getExtensionMode()) {
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_order'");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_order' LIMIT 1");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='order' LIMIT 1");
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -81,9 +82,9 @@ switch (getExtensionMode()) {
                                break;
 
                        case '0.1.1': // SQL queries for v0.1.1
-                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_order' LIMIT 1");
-                               addAdminMenuSql('setup','config_order','Mailbuchungsseite',7,'Einstellungen am Mailbuchungsformular.');
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               // OLD QUERIES: addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_order' LIMIT 1");
+                               // OLD QUERIES: addAdminMenuSql('setup','config_order','Mailbuchungsseite','Einstellungen am Mailbuchungsformular.',7);
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `mail_orders` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Maximale Mailbuchung vervollst&auml;ndigt (Admin-Bereich und im Buchungsformular selber).");
@@ -311,6 +312,13 @@ INDEX (`pool_id`)
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Tabelle f&uuml;r URL-Sperrliste angelegt.");
                                break;
+
+                       case '0.5.1': // SQL queries for v0.5.1
+                               addMemberMenuSql('main','order','Mailbuchung','N','Y',8);
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Weiteren Men&uuml;-Query in Erweiterung verlagert.");
+                               break;
                }
                break;
 
index 04d07edf6f48cceabd1ba08e5e54b1ae7662682a..3a2eae891abe37ad6f9c142c9e2f95221c263426 100644 (file)
@@ -42,10 +42,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version number
-setThisExtensionVersion('0.6.6');
+setThisExtensionVersion('0.6.7');
 
 // Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.4', '0.6.5', '0.6.6'));
+setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.4', '0.6.5', '0.6.6', '0.6.7'));
 
 // Keep this extension always active!
 setExtensionAlwaysActive('Y');
@@ -207,7 +207,7 @@ switch (getExtensionMode()) {
 
                        case '0.1.1': // SQL queries for v0.1.1
                                addExtensionSql("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");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `index_delay` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `index_delay` TINYINT(3) NOT NULL DEFAULT 0");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `index_cookie` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY')*365)."");
 
                                // Update notes (these will be set as task text!)
@@ -712,6 +712,13 @@ PRIMARY KEY (`filter_id`)
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Die Sicherheitseinstellungen, {?POINTS?}-Einstellungen und Email-Archiv funktionieren nur, wenn diese Erweiterung installiert ist.");
                                break;
+
+                       case '0.6.7': // SQL queries for v0.6.7
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` CHANGE `index_delay` `index_delay` TINYINT(3) NOT NULL DEFAULT 0");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Die Weiterleitungseinstellung muss auch Werte kleiner Null akzeptieren.");
+                               break;
                } // END - switch
                break;
 
index 57e2c1036496f8d6305bdaeabc192e9770edb98b..020ceb819a9192daa9c66daae136970f06ec8d3d 100644 (file)
@@ -3013,6 +3013,7 @@ function handleExtraValues ($filterFunction, $value, $extraValue) {
 // Converts timestamp selections into a timestamp
 function convertSelectionsToTimestamp (&$postData, &$DATA, &$id, &$skip) {
        // Init test variable
+       $skip  = false;
        $test2 = '';
 
        // Get last three chars
@@ -3025,21 +3026,20 @@ function convertSelectionsToTimestamp (&$postData, &$DATA, &$id, &$skip) {
                if ((isset($postData[$test.'_ye'])) && (isset($postData[$test.'_mo'])) && (isset($postData[$test.'_we'])) && (isset($postData[$test.'_da'])) && (isset($postData[$test.'_ho'])) && (isset($postData[$test.'_mi'])) && (isset($postData[$test.'_se'])) && ($test != $test2)) {
                        // Generate timestamp
                        $postData[$test] = createTimestampFromSelections($test, $postData);
-                       $DATA[] = sprintf("%s='%s'", $test, $postData[$test]);
+                       $DATA[] = sprintf("`%s`='%s'", $test, $postData[$test]);
+                       $GLOBALS['skip_config'][$test] = true;
 
                        // Remove data from array
                        foreach (array('ye', 'mo', 'we', 'da', 'ho', 'mi', 'se') as $rem) {
-                               unset($postData[$test.'_' . $rem]);
+                               unset($postData[$test . '_' . $rem]);
                        } // END - foreach
 
                        // Skip adding
-                       unset($id); $skip = true; $test2 = $test;
+                       unset($id);
+                       $skip = true;
+                       $test2 = $test;
                } // END - if
-       } else {
-               // Process this entry
-               $skip = false;
-               $test2 = '';
-       }
+       } // END - if
 }
 
 // Reverts the german decimal comma into Computer decimal dot
index a1df0f22779c2760f020bae54e9a341dba6586b4..66a7223bd4abd1192e01dc9b0a51f277f56943e7 100644 (file)
@@ -544,7 +544,7 @@ function adminMenuSelectionBox_DEPRECATED ($mode, $default = '', $defid = '') {
 }
 
 // Wrapper for $_POST and adminSaveSettings
-function adminSaveSettingsFromPostData ($tableName = '_config', $whereStatement = 'config=0', $translateComma = array(), $alwaysAdd = false) {
+function adminSaveSettingsFromPostData ($tableName = '_config', $whereStatement = '`config`=0', $translateComma = array(), $alwaysAdd = false) {
        // Get the array
        $postData = postRequestArray();
 
@@ -553,7 +553,7 @@ function adminSaveSettingsFromPostData ($tableName = '_config', $whereStatement
 }
 
 // Save settings to the database
-function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement = 'config=0', $translateComma = array(), $alwaysAdd = false) {
+function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement = '`config`=0', $translateComma = array(), $alwaysAdd = false) {
        // Prepare all arrays, variables
        $DATA = array();
        $skip = false;
@@ -566,7 +566,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
                        convertSelectionsToTimestamp($postData, $DATA, $id, $skip);
 
                        // Shall we process this ID? It muss not be empty, of course
-                       if (($skip === false) && (!empty($id))) {
+                       if (($skip === false) && (!empty($id)) && (!isset($GLOBALS['skip_config'][$id]))) {
                                // Save this entry
                                $val = compileCode($val);
 
@@ -578,7 +578,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
 
                                // Shall we add numbers or strings?
                                $test = (float)$val;
-                               if ("".$val."" == ''.$test."") {
+                               if ('' . $val . '' == '' . $test . '') {
                                        // Add numbers
                                        $DATA[] = sprintf("`%s`=%s", $id, $test);
                                } else {
@@ -586,6 +586,9 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
                                        $DATA[] = sprintf("`%s`='%s'", $id, trim($val));
                                }
 
+                               // Do not add a config entry twice
+                               $GLOBALS['skip_config'][$id] = true;
+
                                // Update current configuration
                                setConfigEntry($id, $val);
                        } // END - if
@@ -608,9 +611,9 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
 
                // Generate SQL string
                $sql = sprintf("UPDATE `{?_MYSQL_PREFIX?}%s` SET %s WHERE %s LIMIT 1",
-               $tableName,
-               $DATA_UPDATE,
-               $whereStatement
+                       $tableName,
+                       $DATA_UPDATE,
+                       $whereStatement
                );
        } else {
                // Add Line (does only work with auto_increment!
@@ -622,14 +625,14 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement
                } // END - foreach
 
                // Add both in one line
-               $KEYs = implode('', $KEYs);
+               $KEYs = implode('`, `', $KEYs);
                $values = implode(', ', $values);
 
                // Generate SQL string
-               $sql = sprintf("INSERT INTO {?_MYSQL_PREFIX?}%s (%s) VALUES (%s)",
-               $tableName,
-               $KEYs,
-               $values
+               $sql = sprintf("INSERT INTO `{?_MYSQL_PREFIX?}%s` (%s) VALUES (%s)",
+                       $tableName,
+                       $KEYs,
+                       $values
                );
        }
 
index 0f89445a06222c3fcb2a83b573f2a24574efe6f9..c7711857d65a7010d4f249c7e64b5e3320931989 100644 (file)
@@ -566,7 +566,7 @@ function isModuleSet ($abortOnMiss =  false) {
        // Should we abort here?
        if (($abortOnMiss === true) && ($isset === false)) {
                // Output backtrace
-               print '<pre>';
+               print 'Module not set!<pre>';
                debug_print_backtrace();
                die('</pre');
                debug_report_bug('module is empty.');
index cf41b23256722f1cfcaeb6b3fc2722911454590c..87d4245294cf3c58e3841e57c6291bc75452f4db 100644 (file)
@@ -68,7 +68,6 @@ INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`vis
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','points','{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Guthaben',4,'Y','N');
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','categories','Kategorien ausw&auml;hlen',3,'Y','N');
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N');
-INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','order','Mailbuchung',8,'Y','N');
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbest&auml;tigte Emails',5,'Y','N');
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9);
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10);
index cf41b23256722f1cfcaeb6b3fc2722911454590c..87d4245294cf3c58e3841e57c6291bc75452f4db 100644 (file)
@@ -68,7 +68,6 @@ INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`vis
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','points','{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Guthaben',4,'Y','N');
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','categories','Kategorien ausw&auml;hlen',3,'Y','N');
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N');
-INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','order','Mailbuchung',8,'Y','N');
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbest&auml;tigte Emails',5,'Y','N');
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9);
 INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10);