]> git.mxchange.org Git - mailer.git/commitdiff
Rewrites/fixes for handling config entries in SQLs
authorRoland Häder <roland@mxchange.org>
Sun, 20 Jun 2010 01:16:45 +0000 (01:16 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 20 Jun 2010 01:16:45 +0000 (01:16 +0000)
55 files changed:
.gitattributes
inc/autopurge/purge-inact.php
inc/cache/_compiled/emails/.htaccess [new file with mode: 0644]
inc/db/lib-mysql3.php
inc/expression-functions.php
inc/extensions/ext-admins.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-country.php
inc/extensions/ext-debug.php
inc/extensions/ext-doubler.php
inc/extensions/ext-holiday.php
inc/extensions/ext-imprint.php
inc/extensions/ext-logs.php
inc/extensions/ext-mediadata.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-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-sponsor.php
inc/extensions/ext-surfbar.php
inc/extensions/ext-theme.php
inc/extensions/ext-transfer.php
inc/extensions/ext-user.php
inc/extensions/ext-wernis.php
inc/extensions/ext-yoomedia.php
inc/filters.php
inc/functions.php
inc/libs/task_functions.php
inc/libs/user_functions.php
inc/mails/bonus_mails.php
inc/modules/admin/what-config_bonus.php
inc/modules/admin/what-list_autopurge.php
inc/modules/admin/what-unlock_emails.php
inc/modules/guest/what-confirm.php
inc/modules/guest/what-stats.php
inc/modules/member/what-order.php
inc/modules/member/what-transfer.php
inc/modules/member/what-wernis.php
inc/mysql-manager.php
inc/wrapper-functions.php
templates/de/emails/admin/admin_wernis_request.tpl
templates/de/emails/confirm-member.tpl
templates/de/emails/member/member_wernis_request.tpl
templates/de/html/member/member_wernis_mode_list_row.tpl

index 69ada070cd2b2cd9b83c678543ad584330d30ec8..efdaa45424e69ff2248ad71b6018c6c9d2193412 100644 (file)
@@ -99,6 +99,7 @@ inc/autopurge/purge-tsks.php -text
 inc/autopurge/purge-unconfirmed.php -text
 inc/cache/.htaccess -text
 inc/cache/_compiled/.htaccess -text
+inc/cache/_compiled/emails/.htaccess -text
 inc/cache/_compiled/html/.htaccess -text
 inc/classes/.htaccess -text
 inc/classes/cachesystem.class.php -text
index ae1d8907b5bcc9bc898b9959f12e79cf6fb9c4b3..1e725110c52fee1d8392e74fefc8aa23d87cba24 100644 (file)
@@ -57,13 +57,13 @@ if (getConfig('autopurge_inactive') == 'Y') {
        // @TODO Rewrite these if() blocks to a filter
        $EXCLUDE_LIST = '';
        if (getConfig('def_refid') > 0) {
-               $EXCLUDE_LIST = " AND d.userid != ".getConfig('def_refid');
+               $EXCLUDE_LIST = ' AND d.`userid` != {?def_refid?}';
        } // END - if
 
        // Check for more extensions
-       if (isExtensionActive('beg'))     $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_userid')."";
-       if (isExtensionActive('bonus'))   $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_userid')."";
-       if (isExtensionActive('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_userid')."";
+       if (isExtensionActive('beg'))     $EXCLUDE_LIST .= ' AND d.`userid` != {?beg_userid?}';
+       if (isExtensionActive('bonus'))   $EXCLUDE_LIST .= ' AND d.`userid` != {?bonus_userid?}';
+       if (isExtensionActive('doubler')) $EXCLUDE_LIST .= ' AND d.`userid` != {?doubler_userid?}';
 
        // Check for new holiday extension
        if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
@@ -127,11 +127,18 @@ ORDER BY
 
        // Now let's have a look for inactive accounts we want to delete we newly use the same exclude list
        // here for e.g. excluding holiday users
-       $result_inactive = SQL_QUERY_ESC("SELECT d.userid, d.email, d.last_online
-FROM `{?_MYSQL_PREFIX?}_user_data` AS d
-WHERE `status`='CONFIRMED' AND `joined` < (UNIX_TIMESTAMP() - %s) AND `last_online` < (UNIX_TIMESTAMP() - %s) AND `ap_notified` < (UNIX_TIMESTAMP() - %s)
+       $result_inactive = SQL_QUERY_ESC("SELECT
+       d.userid, d.email, d.last_online
+FROM
+       `{?_MYSQL_PREFIX?}_user_data` AS d
+WHERE
+       `status`='CONFIRMED' AND
+       `joined` < (UNIX_TIMESTAMP() - %s) AND
+       `last_online` < (UNIX_TIMESTAMP() - %s) AND
+       `ap_notified` < (UNIX_TIMESTAMP() - %s)
 ".$EXCLUDE_LIST."
-ORDER BY `userid` ASC",
+ORDER BY
+       `userid` ASC",
                array(
                        getConfig('ap_inactive_since'),
                        getConfig('ap_inactive_since'),
diff --git a/inc/cache/_compiled/emails/.htaccess b/inc/cache/_compiled/emails/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
index a851367cb6ff00ea9fc7b306cf076c50202b2233..30df3b4f1e953f797bfd46cfd90ffe42b32133ee 100644 (file)
@@ -72,30 +72,27 @@ function SQL_QUERY ($sqlString, $F, $L) {
        // Remove \t, \n and \r from queries they may confuse some MySQL version I have heard
        $sqlString = str_replace("\t", ' ', str_replace("\n", ' ', str_replace("\r", ' ', $sqlString)));
 
-       // Replace {PER}
-       $sqlString = str_replace('{PER}', '%', $sqlString);
-
        // Compile config entries out
-       $sqlString = SQL_PREPARE_SQL_STRING($sqlString);
+       $GLOBALS['last_sql'] = SQL_PREPARE_SQL_STRING($sqlString);
 
        // Starting time
        $querytimeBefore = microtime(true);
 
        // Run SQL command
-       //* DEBUG: */ print('F=' . basename($F) . ',L=' . $L . 'sql=' . htmlentities($sqlString) . '<br />');
-       $result = mysql_query($sqlString, SQL_GET_LINK())
-               or debug_report_bug(__FUNCTION__, __LINE__, 'file='. $F . ',line=' . $L . ':mysql_error()=' . mysql_error() . "\n".
-'Query string:' . $sqlString);
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sql=' . $sqlString . ',numRows=' . SQL_NUMROWS($result) . ',affected=' . SQL_AFFECTEDROWS());
+       //* DEBUG: */ print('F=' . basename($F) . ',L=' . $L . 'sql=' . htmlentities($GLOBALS['last_sql']) . '<br />');
+       $result = mysql_query($GLOBALS['last_sql'], SQL_GET_LINK())
+               or debug_report_bug($F, $L, 'file='. $F . ',line=' . $L . ':mysql_error()=' . mysql_error() . "\n".
+'Query string:' . $GLOBALS['last_sql']);
+       /* DEBUG: */ logDebugMessage($F, $L, 'sql=' . $GLOBALS['last_sql'] . ',affected=' . SQL_AFFECTEDROWS());
 
        // Calculate query time
        $queryTime = microtime(true) - $querytimeBefore;
 
        // Add this query to array including timing
-       addSqlToDebug($result, $sqlString, $queryTime, $F, $L);
+       addSqlToDebug($result, $GLOBALS['last_sql'], $queryTime, $F, $L);
 
        // Save last successfull query
-       setConfigEntry('db_last_query', $sqlString);
+       setConfigEntry('db_last_query', $GLOBALS['last_sql']);
 
        // Count all query times
        incrementConfigEntry('sql_time', $queryTime);
@@ -114,7 +111,7 @@ function SQL_QUERY ($sqlString, $F, $L) {
                        fwrite($fp, 'Module=' . getModule() . "\n");
                        $GLOBALS['sql_first_entry'] = true;
                } // END - if
-               fwrite($fp, $F . '(LINE=' . $L . '|NUM=' . SQL_NUMROWS($result) . '|AFFECTED=' . SQL_AFFECTEDROWS() . '|QUERYTIME:' . $queryTime . '): ' . str_replace("\r", '', str_replace("\n", ' ', $sqlString)) . "\n");
+               fwrite($fp, $F . '(LINE=' . $L . '|NUM=' . SQL_NUMROWS($result) . '|AFFECTED=' . SQL_AFFECTEDROWS() . '|QUERYTIME:' . $queryTime . '): ' . str_replace("\r", '', str_replace("\n", ' ', $GLOBALS['last_sql'])) . "\n");
                fclose($fp);
        } // END - if
 
@@ -145,7 +142,7 @@ function SQL_NUMROWS ($resource) {
                $lines = mysql_num_rows($resource);
        } else {
                // No resource given, please fix this
-               trigger_error('No resource given! result[]=' . gettype($resource));
+               debug_report_bug(__FUNCTION__, __LINE__, 'No resource given! result[]=' . gettype($resource) . ',last_sql=' .  $GLOBALS['last_sql']);
        }
 
        // Return lines
@@ -545,8 +542,11 @@ function SQL_HASZERONUMS ($result) {
 function SQL_PREPARE_SQL_STRING ($sqlString) {
        // Is it already cached?
        if (!isset($GLOBALS['sql_strings'][$sqlString])) {
-               // No, so compile and set it
-               $GLOBALS['sql_strings'][$sqlString] = FILTER_COMPILE_EXPRESSION_CODE(compileSqlConfig($sqlString));
+               // Compile config+expression code
+               $sqlString2 = FILTER_COMPILE_EXPRESSION_CODE(FILTER_COMPILE_CONFIG($sqlString));
+
+               // Do final compilation
+               $GLOBALS['sql_strings'][$sqlString] = doFinalCompilation($sqlString2, false);
        } // END - if
 
        // Return it
index dffef73d05b47791423549eb9052e1ef2a1e721c..c114e317731b521ac5c6ceb5e6f9294273e775a2 100644 (file)
@@ -152,13 +152,7 @@ function doExpressionExt ($data) {
 // @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again
 function doExpressionConfig ($data) {
        // Default replacer is the config value itself
-       $replacer = '{DQUOTE} . getConfig(' . "'" . $data['matches'][4][$data['key']] . "'" . ') . {DQUOTE}';
-
-       // Is there a call-back function provided?
-       if (!empty($data['callback'])) {
-               // Construct a new expression
-               $replacer = '{%pipe,' . $data['callback'] . ',' . $configValue . '%}';
-       } // END - if
+       $replacer = '{DQUOTE}  . ' . $data['callback'] . '(getConfig(' . "'" . $data['matches'][4][$data['key']] . "'" . ')) . {DQUOTE}';
 
        // Replace the config entry
        $code = replaceExpressionCode($data, $replacer);
index 75d861ddd7764d4866b6dd9cb711b2a094d67561..30c49c32489fa77646ad26a4e6d5156921af00e6 100644 (file)
@@ -62,8 +62,8 @@ switch (getExtensionMode()) {
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='admins'");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_acls`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_acls`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`');
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP `default_acl`");
 
                // Remove filters
@@ -104,7 +104,7 @@ switch (getExtensionMode()) {
 
                                // But allow current admin everything (THIS SHALL BE YOU!)
                                addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admins` SET `default_acl`='allow' WHERE `login`='".getSession('admin_login')."' LIMIT 1");
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_acls`");
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_acls`');
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_admins_acls` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -124,7 +124,7 @@ PRIMARY KEY (`id`)
                                break;
 
                        case '0.4.0': // SQL queries for v0.4.0
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`");
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`');
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_admins_mails` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
index 852120e5da66066754e5302ead93c0a45593a981..0d3677a0a7dbf007264b7d3f1367063b57aa2799 100644 (file)
@@ -54,7 +54,7 @@ enableExtensionProductive(false);
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_accounts`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_accounts`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bank_accounts` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -81,7 +81,7 @@ INDEX (account_created),
 INDEX (account_locked),
 INDEX (last_tan_stamp)
 ) TYPE={?_TABLE_TYPE?}");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_transfers`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_transfers`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bank_transfers` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 to_account_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -94,7 +94,7 @@ PRIMARY KEY (id),
 INDEX (to_account_id, from_account_id),
 INDEX (day_bookkeeping, day_available)
 ) TYPE={?_TABLE_TYPE?}");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_packages`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_packages`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bank_packages` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 title VARCHAR(255) NOT NULL DEFAULT '',
@@ -118,7 +118,7 @@ PRIMARY KEY (id)
                // what the member shall get for the specified income. output_system_mode
                // must be extended with the mode you get for free: output_system_mode:LOGIN
                // should be fine. More than one entry and not DISABLED ;) are not supported.
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_tanlist`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_tanlist`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bank_tanlist` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 idx TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
@@ -158,10 +158,10 @@ UNIQUE (account_id, tan)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_accounts`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_transfers`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_packages`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_tanlist`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_accounts`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_transfers`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_packages`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bank_tanlist`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='bank'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='bank'");
                break;
index 8ec17a7a54abf32df50fea70a856677bdc608edc..db9a335c8e3926f89a2d7a0d79fc039bdcd61e3a 100644 (file)
@@ -58,7 +58,7 @@ switch (getExtensionMode()) {
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_userid_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD beg_points FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD beg_clicks BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_beg_ips`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_beg_ips`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_beg_ips` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -71,10 +71,10 @@ PRIMARY KEY (id)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_beg_ips`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_beg' OR `what`='list_beg'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='beg'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='beg' OR `what`='beg2'");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_beg_ips`");
                break;
 
        case 'activate': // Do stuff when admin activates this extension
index 09d75959fdfdbaf2ceb84817fc414792fca2602b..3b951d4557cc9c8afa4dc3caa2ad8c0259704f20 100644 (file)
@@ -57,7 +57,7 @@ switch (getExtensionMode()) {
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP birthday_sent");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_birthday`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_birthday`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_birthday'");
                break;
 
@@ -79,8 +79,8 @@ switch (getExtensionMode()) {
                                break;
 
                        case '0.2.0': // SQL queries for v0.2
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD birthday_points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_birthday`");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `birthday_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_birthday`');
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_birthday` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
index 1227a605624ec35251f09433647693d369083252..a78c448c9577e6b2c7c67a44da14c82de13bbea5 100644 (file)
@@ -53,7 +53,7 @@ switch (getExtensionMode()) {
                // SQL commands to run
                addAdminMenuSql('email','send_bonus','Bonusmail senden','Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie k&ouml;nnen hier immer senden.', 5);
                addMemberMenuSql('main','bonus','Bonuspunkte','N','Y',7);
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bonus` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -84,10 +84,10 @@ PRIMARY KEY  (`id`)
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications')");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='bonus' LIMIT 1");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='bonus'");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_urls`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_customer`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_turbo`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_urls`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_customer`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_turbo`');
 
                // Unregister filter
                unregisterFilter('member_login_check', 'ADD_LOGIN_BONUS', true, getExtensionDryRun());
@@ -124,7 +124,7 @@ PRIMARY KEY  (`id`)
                        case '0.2.1': // SQL queries for v0.2.1
                                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 `login_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT {?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
@@ -137,7 +137,7 @@ PRIMARY KEY  (`id`)
                                break;
 
                        case '0.2.2': // SQL queries for v0.2.2
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_turbo`");
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_turbo`');
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_bonus_turbo` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -170,8 +170,8 @@ INDEX `userid` (`userid`)
                                break;
 
                        case '0.2.5': // SQL queries for v0.2.5
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_urls`");
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_customer`");
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_urls`');
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_bonus_customer`');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Tabellen <u>{?_MYSQL_PREFIX?}_bonus_urls</u> und <u>{?_MYSQL_PREFIX?}_bonus_customer</u> entfernt, da dies bald von der Erweiterung <u>sponsor</u> erledigt wird.");
index e04a8b8931cd4ef73f8dd8f9e6c85510003c8150..5de72946166215fcef9197c2ced39acb9b348095 100644 (file)
@@ -58,7 +58,7 @@ switch (getExtensionMode()) {
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `booking_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 3)."");
 
                // Drop/create table for user bookings
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_book`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_book`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_book`(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -82,7 +82,7 @@ PRIMARY KEY (`id`)
                break;
 
        case 'remove': // Do stuff when removing extension
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_book`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_book`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('config_booking','list_booking')");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='booking'");
 
index ef88cfb3b20a301403d596bdb551c6236c850747..8a81b8ec74e75770feacac3d772a7c4db81f01fc 100644 (file)
@@ -54,7 +54,7 @@ setExtensionAlwaysActive('Y');
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_countries`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_countries`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_countries` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 code CHAR(2) NOT NULL DEFAULT 'DE',
@@ -66,7 +66,7 @@ PRIMARY KEY (id)
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_countries` (code, descr, is_active) VALUES ('DE','Deutschland','Y')");
 
                // Admin menu
-               addAdminMenuSql('country', NULL, 'L&auml;ndercodes verwalten','Stellen Sie hier L&auml;ndercodes ein, damit auch internationale Mitglieder sich zu Ihrem {?mt_word?} anmelden k&ouml;nnen.', 8);
+               addAdminMenuSql('country', NULL, 'L&auml;ndercodes verwalten','Stellen Sie hier L&auml;ndercodes ein, damit auch internationale Mitglieder sich zu Ihrem {OPEN_CONFIG}mt_word{CLOSE_CONFIG} anmelden k&ouml;nnen.', 8);
                addAdminMenuSql('country','list_country','Verwalten','Hinzuf&uuml;gen, &Auml;ndern und L&ouml;schen von L&auml;ndercodes.', 1);
 
                // Add entry to user table
@@ -75,7 +75,7 @@ PRIMARY KEY (id)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_countries`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_countries`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='country'");
                break;
 
index d18b6d28fff0e7c2c8ac5c5ee95a07c4c7129c55..cd044dd81daba64a6c9718b516d19b2443694b63 100644 (file)
@@ -57,7 +57,7 @@ enableExtensionProductive(false);
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // Table for debug log entries
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_debug_log` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `sender_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -73,7 +73,7 @@ PRIMARY KEY (`id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Debug log data'");
 
                // Table against debug log abuse
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log_abuse`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log_abuse`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_debug_log_abuse` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -85,7 +85,7 @@ PRIMARY KEY (`id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Debug log abuse'");
 
                // Table on relay/server for client exchanges
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_debug_client` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `key` VARCHAR(255) NOT NULL DEFAULT 'SELF',
@@ -105,7 +105,7 @@ PRIMARY KEY (`id`)
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{?URL?}','{?MAIN_TITLE?}','{?WEBMASTER?}','ACTIVE')");
 
                // Table for debug log <-> client connection
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client_log`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client_log`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_debug_client_log` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1,
@@ -142,10 +142,10 @@ PRIMARY KEY (`id`)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client_log`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log_abuse`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client_log`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_client`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_debug_log_abuse`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='debug'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='debug'");
                break;
@@ -183,7 +183,7 @@ PRIMARY KEY (`id`)
        default: // Unknown extension mode
                logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
                break;
-}
+} // END - switch
 
 // [EOF]
 ?>
index 9d784494aab90fd522ac579b66fcd532ecdf8797..3b43bb01d35fa6e4decba42a01c594f80d703a97 100644 (file)
@@ -51,7 +51,7 @@ setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // Doubler table
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_doubler`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_doubler`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_doubler` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -118,7 +118,7 @@ PRIMARY KEY (`id`)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_doubler`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_doubler`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='doubler'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='doubler'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='doubler'");
index 71e8626cbc35c0455c7cfd6e800c9ffd182d124e..07876b382aa1b1c354d8584a69d48cbd05dfa147 100644 (file)
@@ -51,7 +51,7 @@ setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // Create database
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_holidays` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -80,11 +80,11 @@ PRIMARY KEY (id)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='holiday' LIMIT 1");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='holiday' LIMIT 4");
-               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value=0 LIMIT 1");
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES (0,'Urlaub')");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `value`=0 LIMIT 1");
+               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (`value`, `comment`) VALUES (0,'Urlaub')");
                break;
 
        case 'activate': // Do stuff when admin activates this extension
index 315bc89117b767efd16dea4745a8b929b83650aa..2d7c16617f2caa313ae47aeeeff4c3fcc25529a5 100644 (file)
@@ -64,7 +64,7 @@ switch (getExtensionMode()) {
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `imprint_image_script` VARCHAR(255) NOT NULL DEFAULT ''");
 
                // Create imprint data table
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_imprint_data`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_imprint_data`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_imprint_data` (
 `imprint_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `imprint_key` VARCHAR(255) NOT NULL DEFAULT '',
@@ -79,14 +79,14 @@ PRIMARY KEY (`imprint_id`)
                break;
 
        case 'remove': // Do stuff when removing extension
+               // Imprint data
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_imprint_data`');
+
                // Guest menu
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='imprint' LIMIT 1");
 
                // Admin menu
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_imprint' LIMIT 1");
-
-               // Imprint data
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_imprint_data`");
                break;
 
        case 'activate': // Do stuff when admin activates this extension
index 48e44ec7da9894209607ba1507ebe757ba714c48..417a49662aa8d65a0918154e614f044488b52f57 100644 (file)
@@ -51,7 +51,7 @@ setExtensionVersionHistory(array('0.0'));
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addAdminMenuSql('stats','logs','Aufruflogb&uuml;cher','Verwalten Sie Ihre Aufruflogb&uuml;cher mit diesem Admin-Bereich! (Derzeit nur Download!)',8);
+               addAdminMenuSql('stats', 'logs', 'Aufruflogb&uuml;cher', 'Verwalten Sie Ihre Aufruflogb&uuml;cher mit diesem Admin-Bereich! (Derzeit nur Download!)', 8);
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'");
                break;
 
index 8d8d28750ba6dc2aa120a7fd39f5c1364c294b48..b5a33d9c8841d53f712e1c28ddb4fe9920e3c47b 100644 (file)
@@ -63,7 +63,7 @@ switch (getExtensionMode()) {
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mediadata`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mediadata`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_mediadata'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='mediadata'");
 
@@ -101,7 +101,7 @@ switch (getExtensionMode()) {
 
                        case '0.0.4': // SQL queries for v0.0.4
                                // SQL commands to run
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mediadata`");
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_mediadata`');
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_mediadata` (
 `media_key` VARCHAR(255) NOT NULL DEFAULT '',
 `media_value` VARCHAR(255) NOT NULL DEFAULT '',
index 8fa7451587cf3264dc2a0dfa70ca70ee073236d6..4ee023fb83edc323eb0410d6f50894b2b45db905 100644 (file)
@@ -194,10 +194,10 @@ PRIMARY KEY (`nl_order_id`)
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_archive` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
 
                                // Admin menu
-                               addAdminMenuSql('newsletter', 'list_newsletter','Newsletter Verwalten','Legen Sie hier einen neuen Newsletter mit Betreff und Verfallsdatum an und listen Sie bestehende auf. Die Grunddaten lassen sich hier ebenfalls &auml;ndern.', 1);
-                               addAdminMenuSql('newsletter', 'list_newsletter_topic','Thema verwalten','Legen Sie hier ein weiteres Thema an oder editieren bzw. l&ouml;schen Sie bestehende.', 2);
-                               addAdminMenuSql('newsletter', 'list_newsletter_ordrs','Buchungen verwalten','Verwalten Sie hier die Buchungen im Newsletter von Ihren Sponsoren.', 3);
-                               addAdminMenuSql('newsletter', 'config_newsletter','Einstellungen','Einstellungen am Newsletter vornehmen.', 4);
+                               addAdminMenuSql('newsletter', 'list_newsletter', 'Newsletter Verwalten', 'Legen Sie hier einen neuen Newsletter mit Betreff und Verfallsdatum an und listen Sie bestehende auf. Die Grunddaten lassen sich hier ebenfalls &auml;ndern.', 1);
+                               addAdminMenuSql('newsletter', 'list_newsletter_topic', 'Thema verwalten', 'Legen Sie hier ein weiteres Thema an oder editieren bzw. l&ouml;schen Sie bestehende.', 2);
+                               addAdminMenuSql('newsletter', 'list_newsletter_ordrs', 'Buchungen verwalten', 'Verwalten Sie hier die Buchungen im Newsletter von Ihren Sponsoren.', 3);
+                               addAdminMenuSql('newsletter', 'config_newsletter', 'Einstellungen', 'Einstellungen am Newsletter vornehmen.', 4);
 
                                // Remove member menu
                                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='newsletter' LIMIT 1");
index 6475398f35d321f4a5a9ffd179ed3021dd214124..618d44b9f92184a1cf8706357b5d18a6e94bf864 100644 (file)
@@ -60,7 +60,7 @@ switch (getExtensionMode()) {
                // SQL commands to run
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='nickname'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('config_nickname','list_nickname')");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_nickname_history`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_nickname_history`');
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -176,16 +176,16 @@ switch (getExtensionMode()) {
 
                        case '0.1.9': // SQL queries for v0.1.9
                                addAdminMenuSql('user','list_nickname','Nickname-Historie','Listet alle verwendeten Nicknames der Mitglieder auf.', 12);
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_nickname_history`");
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_nickname_history`');
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_nickname_history` (
-id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-nickname VARCHAR(255) NOT NULL DEFAULT '',
-added TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-last_used TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
-INDEX userid (userid),
-INDEX (last_used DESC),
-PRIMARY KEY (id)
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`nickname` VARCHAR(255) NOT NULL DEFAULT '',
+`added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
+`last_used` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00',
+INDEX `userid` (`userid`),
+INDEX (`last_used` DESC),
+PRIMARY KEY (`id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='History of used nicknames'");
 
                                // Update notes (these will be set as task text!)
@@ -206,7 +206,7 @@ PRIMARY KEY (id)
        default: // Unknown extension mode
                logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
                break;
-}
+} // END - switch
 
-//
+// [EOF]
 ?>
index 1f6772bf35e885f56e554456a3fa657dc840c5d3..fd513fe0cc7ef2c884489a6a497a1784cf8f020e 100644 (file)
@@ -51,7 +51,7 @@ setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_online`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_online`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_online` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `sid` VARCHAR(32) NOT NULL DEFAULT '',
@@ -74,7 +74,7 @@ KEY `admin_member` (`is_admin`,`is_member`)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_online`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_online`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='usr_online'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='online'");
 
index 0820b56fe77f5bc2814afe38b14a4e73fc2e2d66..f05ea7e65dd04a6611272fe5f1643342029a2d4b 100644 (file)
@@ -54,18 +54,18 @@ setExtensionAlwaysActive('Y');
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_optimize_gain`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_optimize_gain`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_optimize_gain` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `gain` decimal(10,3) NOT NULL DEFAULT '0.000',
 PRIMARY KEY (`id`)
 ) TYPE={?_TABLE_TYPE?}");
-               addAdminMenuSql('misc','optimize','DB optimieren','F&uuml;hren Sie dies ab und an aus, damit &uuml;berfl&uuml;ssige Bin&auml;rdaten aus der Datenbank entfernt werden.',5);
+               addAdminMenuSql('misc', 'optimize', 'DB optimieren', 'F&uuml;hren Sie dies ab und an aus, damit &uuml;berfl&uuml;ssige Bin&auml;rdaten aus der Datenbank entfernt werden.', 5);
                break;
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_optimize_gain`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_optimize_gain`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='optimize' LIMIT 1");
                break;
 
index 4e15c55d796be9742d5185939f223c1f50f6fb28..2dfbf609441ae94c2accaa4cccb9d4d6bfb4436d 100644 (file)
@@ -300,7 +300,7 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us
                                break;
 
                        case '0.5.0': // SQL queries for v0.5.0
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_url_blacklist`");
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_url_blacklist`');
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_url_blacklist` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `url` VARCHAR(255) NOT NULL DEFAULT '',
@@ -330,7 +330,7 @@ INDEX (`pool_id`)
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Inkonsistenz in Konfigurationsnamen korregiert.");
                                break;
-               }
+               } // END - switch
                break;
 
        case 'modify': // When the extension got modified
@@ -341,9 +341,10 @@ INDEX (`pool_id`)
 
        case 'init': // Do stuff when extension is initialized
                // Do daily reset only when installed and extension version is at least 0.1.1
+               // @TODO This should be moved out to inc/reset/
                if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (isExtensionInstalledAndNewer('order', '0.1.1'))) {
                        // Reset mail order values
-                       $result_ext = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__);
+                       $result_ext = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `mail_orders`=0 WHERE `mail_orders` > 0", __FILE__, __LINE__);
                } // END - if
                break;
 
@@ -353,7 +354,7 @@ INDEX (`pool_id`)
        default: // Unknown extension mode
                logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
                break;
-}
+} // END - switch
 
 // [EOF]
 ?>
index 604dcac05e6c07e6b45a6791a20d8a06cb700bcc..0e81799228be517675780b597df44395de04f1fb 100644 (file)
@@ -51,7 +51,7 @@ setExtensionVersionHistory(array('0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_payouts`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_payouts`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_payouts` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -65,7 +65,7 @@ KEY (userid),
 KEY (payout_id),
 PRIMARY KEY (id)
 ) TYPE={?_TABLE_TYPE?}");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_payout_types`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_payout_types`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_payout_types` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 type VARCHAR(255) NOT NULL DEFAULT '',
@@ -80,8 +80,8 @@ PRIMARY KEY (id)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_payouts`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_payout_types`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_payouts`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_payout_types`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='payouts'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='payout'");
                break;
@@ -251,7 +251,7 @@ PRIMARY KEY (id)
        default: // Unknown extension mode
                logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
                break;
-}
+} // END - switch
 
 // [EOF]
 ?>
index 4f89da3ff7310082b56e5487a7e24505790d3ea5..82ff0abefa569950afdf10b2caa1a53e0f760977 100644 (file)
@@ -56,7 +56,7 @@ enableExtensionProductive(false);
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_primera`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_primera`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_primera` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -91,7 +91,7 @@ PRIMARY KEY (`id`)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_primera`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_primera`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='primera'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='primera'");
                break;
index a8c4d3d9c9c222ff9e78a29482a40b6696dd2eac..c6a84c8db393590a824b1f3ad43643813a834507 100644 (file)
@@ -51,9 +51,9 @@ setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_data`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_data`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_rallye_data` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 admin_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -104,9 +104,9 @@ PRIMARY KEY (id)
 
        case 'remove': // Do stuff when removing extension
                // Drop tables
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_data`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_data`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_prices`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_rallye_users`');
 
                // Remove menus
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='rallye'");
index 4930c2a2ac24918754652ef7fed0c1fd491f11cd..f067d642af0efff85c2223e7174f66a56e8b0d04 100644 (file)
@@ -51,7 +51,7 @@ setExtensionVersionHistory(array('0.0','0.0.1'));
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_refs`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_refs`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_refs` (
 `id` BIGINT(20) UNSIGNED NOT NULL auto_increment,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -72,7 +72,7 @@ KEY (`refid`)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_refs`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_refs`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='refback'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_refback','list_refback')");
                addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET level=level-1");
index 8e373c8fcc583df71446ab57d10c5de956ae2494..e9232b64628d03d3e68c85c01fdbf209ce9daf78 100644 (file)
@@ -57,7 +57,7 @@ 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_register'");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`');
 
                // Unregister a filter
                unregisterFilter('register_must_fillout', 'REGISTER_MUST_FILLOUT', true, getExtensionDryRun());
@@ -74,10 +74,9 @@ switch (getExtensionMode()) {
                break;
 
        case 'update': // Update an extension
-               switch (getCurrentExtensionVersion())
-               {
+               switch (getCurrentExtensionVersion()) {
                        case '0.1.0': // SQL queries for v0.1
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`");
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_must_register`');
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_must_register` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 field_name VARCHAR(255) NOT NULL DEFAULT '',
index 1e44e01e678408a75b2b6a51a15d566de9c4d437..cb4a2419890c6bfd476025ca5ec3eb405ac1b81e 100644 (file)
@@ -66,7 +66,7 @@ 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_removeip'");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_removeip' LIMIT 1");
 
                // Remove filters
                unregisterFilter('post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, getExtensionDryRun());
index 7a6e5292569b0f2e9fc4d1a67173676f48d5662d..bdb4d60333de582e887e09800509e0e521c9aa4c 100644 (file)
@@ -62,7 +62,7 @@ switch (getExtensionMode()) {
                //
                // Sponsor data
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_data`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_data`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_data` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `company` VARCHAR(255) NOT NULL DEFAULT '',
@@ -104,7 +104,7 @@ PRIMARY KEY (`id`)
                //
                // Sponsor orders
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_orders`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_orders`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_orders` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `sponsorid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -124,7 +124,7 @@ PRIMARY KEY (`id`)
                //
                // Pay-types
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_paytypes`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_paytypes`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_paytypes` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `pay_name` VARCHAR(255) NOT NULL DEFAULT '',
@@ -136,7 +136,7 @@ PRIMARY KEY (`id`)
                //
                // Points-to-action converting
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_action_convert`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_action_convert`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_action_convert` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `ext_name` VARCHAR(255) NOT NULL DEFAULT 'sponsor',
@@ -148,7 +148,7 @@ PRIMARY KEY (`id`)
                //
                // Sponsor menu system (default)
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_menu`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_menu`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_menu` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `action` VARCHAR(255) NOT NULL DEFAULT '',
@@ -164,7 +164,7 @@ PRIMARY KEY (`id`)
                //
                // Registry for performable actions by your sponsors
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_registry`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_registry`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_registry` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `admin_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -178,7 +178,7 @@ PRIMARY KEY (`id`)
                //
                // URLs from the sponsors
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_urls`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_urls`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_urls` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `sponsorid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -192,7 +192,7 @@ PRIMARY KEY (`id`)
                //
                // Banners of any size from the sponsors
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_banner`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_banner`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_banner` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `sponsorid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -208,7 +208,7 @@ PRIMARY KEY (`id`)
                //
                // Campaigns
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaigns`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaigns`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_campaigns` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `sponsorid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -230,7 +230,7 @@ PRIMARY KEY (`id`)
                //
                // Campaigns + URLs + Banner
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaign_assigns`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaign_assigns`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_campaign_assigns` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `campaignid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -246,7 +246,7 @@ PRIMARY KEY (`id`)
                //
                // Allowed data to display (administrative)
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_admin_data`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_admin_data`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_admin_data` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `data_row` VARCHAR(255) NOT NULL DEFAULT '',
@@ -256,7 +256,7 @@ PRIMARY KEY (`id`)
                //
                // Allowed data to display (sponsor-side)
                //
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_display_data`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_display_data`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_sponsor_display_data` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `sponsorid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -377,18 +377,18 @@ PRIMARY KEY (`id`)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_data`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_orders`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_action_convert`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_paytypes`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_menu`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_registry`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_urls`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_banner`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaigns`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaign_assigns`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_admin_data`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_display_data`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_data`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_orders`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_action_convert`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_paytypes`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_menu`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_registry`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_urls`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_banner`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaigns`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_campaign_assigns`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_admin_data`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_sponsor_display_data`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='sponsor' OR `what` IN('repr_sponsor','sponsor_medit','sponsor_madd')");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='sponsor'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='sponsor'");
index 8b2fb94ffb28d661fb83143424b05dae3fd82678..b9ac1fc7b6791fd204ca7bd95fac40672c9d581a 100644 (file)
@@ -54,7 +54,7 @@ enableExtensionProductive(false);
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run (surfbar URLs)
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_urls`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_urls`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_urls` (
 `url_id` BIGINT(20) UNSIGNED  NOT NULL AUTO_INCREMENT,
 `url_userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
@@ -75,7 +75,7 @@ INDEX `status_userid` (`url_status`,`url_userid`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar URLs'");
 
                // Reload locks
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_locks`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_locks`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_locks` (
 `locks_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `locks_userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
@@ -87,7 +87,7 @@ INDEX (`locks_url_id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar reload locks'");
 
                // Surfbar salts
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_salts`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_salts`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_salts` (
 `salts_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `salts_userid` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
@@ -99,7 +99,7 @@ INDEX (`salts_url_id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar last used salts'");
 
                // Statistics
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_stats`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_stats`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_stats` (
 `stats_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `stats_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -112,7 +112,7 @@ INDEX (`stats_url_id`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Surfbar Statistics'");
 
                // Member actions pending on status
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_actions`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_actions`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_surfbar_actions` (
 `actions_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `actions_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
@@ -171,7 +171,7 @@ UNIQUE KEY `status_action` (`actions_status`,`actions_action`)
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".getConfig('ONE_DAY')."");
+               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_guest_login_form` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
@@ -198,11 +198,11 @@ UNIQUE KEY `status_action` (`actions_status`,`actions_action`)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_actions`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_locks`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_salts`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_stats`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_urls`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_actions`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_locks`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_salts`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_stats`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_surfbar_urls`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='surfbar'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='surfbar'");
                break;
index fbdd16955c0cf15375520b67ee4db87813f94500..8545512f331f182751dd4abe7c069d6aad92e3bc 100644 (file)
@@ -55,7 +55,7 @@ switch (getExtensionMode()) {
 
        case 'remove': // Do stuff when removing extension
                // Drop theme table
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_themes`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_themes`');
 
                // Delete admin menu
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='theme'");
@@ -120,7 +120,7 @@ switch (getExtensionMode()) {
 
                        case '0.0.8': // SQL queries for v0.0.8
                                // Theme table
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_themes`");
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_themes`');
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_themes` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `theme_path` VARCHAR(255) NOT NULL DEFAULT '',
@@ -133,7 +133,7 @@ INDEX (`theme_active`)
 ) TYPE={?_TABLE_TYPE?} COMMENT='Themes'");
 
                                // Admin menu
-                               addAdminMenuSql('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres {?mt_word2?}.', 8);
+                               addAdminMenuSql('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres {OPEN_CONFIG}mt_word2{CLOSE_CONFIG}.', 8);
                                addAdminMenuSql('theme','theme_import','Importieren','Es wird das Verzeichnis &quot;theme&quot; nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1);
                                addAdminMenuSql('theme','theme_edit','Modifizieren','&Auml;ndern Sie Titel, Freigaben usw. an den Themes. Sie k&ouml;nnen bis auf das Standart-Theme &quot;default&quot; auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server l&ouml;schen, damit es niht erneut importiert werden kann.', 2);
                                addAdminMenuSql('theme','theme_check','Pr&uuml;fen','Nach neuen Themes suchen bzw. nach Updates zu den Themes suchen.', 3);
index 8cc661e434cb2a14477d484146f23bcfc1e42d43..8bdb7b3ac1e26cbe1a115811067e0123b76c143c 100644 (file)
@@ -51,8 +51,8 @@ setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_in`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_out`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_in`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_out`');
 
                // Transfer from a member
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_transfers_in` (
@@ -92,11 +92,11 @@ PRIMARY KEY (id)
                addMemberMenuSql('main','transfer','{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transfer','N','Y', 5);
 
                // Add config values
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'");
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('ONE_DAY')*28)."'");
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('ONE_DAY')."'");
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5");
+               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_max` BIGINT(20) UNSIGNED NOT NULL DEFAULT 50");
+               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_age` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY')*28));
+               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}");
+               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_balance` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100");
+               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_code` BIGINT(20) UNSIGNED NOT NULL DEFAULT 5");
 
                // Add row(s) to user's data
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'");
@@ -104,8 +104,8 @@ PRIMARY KEY (id)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_in`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_out`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_in`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_out`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='transfer'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='transfer'");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP `opt_in`");
index 60f2c91e7da828eec587e81f389011e9cdd94192..d2cb8d16bb40ec5f03d7b7748881e34a3ad696d8 100644 (file)
@@ -53,7 +53,7 @@ setExtensionAlwaysActive('Y');
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_cats`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_cats`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_cats` (
   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
   `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -63,7 +63,7 @@ INDEX (`userid`),
 INDEX (`cat_id`)
 ) TYPE={?_TABLE_TYPE?}");
 
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_data`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_data`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_data` (
   `userid` BIGINT(22) NOT NULL AUTO_INCREMENT,
   `surname` VARCHAR(255) NOT NULL DEFAULT '',
@@ -104,7 +104,7 @@ INDEX (`refid`),
 INDEX `status_mails` (`status`,`max_mails`)
 ) TYPE={?_TABLE_TYPE?}");
 
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_points`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_points`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_points` (
   `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
   `userid` BIGINT(22) NOT NULL DEFAULT 0,
@@ -115,7 +115,7 @@ PRIMARY KEY  (`id`),
 INDEX (`userid`)
 ) TYPE={?_TABLE_TYPE?}");
 
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_links`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_links`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_links` (
   `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
   `stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -126,7 +126,7 @@ INDEX (`userid`),
 INDEX (`stats_id`)
 ) TYPE={?_TABLE_TYPE?}");
 
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_stats` (
   `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
   `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -148,7 +148,7 @@ INDEX (`payment_id`),
 INDEX (`pool_id`)
 ) TYPE={?_TABLE_TYPE?}");
 
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats_data`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats_data`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_stats_data` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -175,14 +175,14 @@ INDEX (`stats_type`)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_del`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_cats`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_data`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_points`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_links`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats`');
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats_data`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_del`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_cats`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_data`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_points`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_links`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats`");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_stats_data`");
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -349,8 +349,8 @@ INDEX (`stats_type`)
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_reason` TINYTEXT");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('ONE_DAY') * 30)."");
-                               addAdminMenuSql('user','list_user_del','L&ouml;schungen auflisten','Listet die L&ouml;schungen von Usern auf.', 9);
-                               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_del`");
+                               addAdminMenuSql('user', 'list_user_del', 'L&ouml;schungen auflisten', 'Listet die L&ouml;schungen von Usern auf.', 9);
+                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_del`');
                                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_del` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
index b71f35004e4f886435b7c5839e42719718302975..4b466f3564df982c67d88219b99d449e3aea5570 100644 (file)
@@ -51,7 +51,7 @@ setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3'));
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_wernis`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_wernis`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_wernis` (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -89,7 +89,7 @@ PRIMARY KEY (id)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_wernis`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_wernis`');
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='wernis'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='wernis'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='wernis_portal'");
index f406c3522d48e31283067067148ec6cd5888c28c..bafb7d03cfa75f7cf222f0e071065c6b54bea6d5 100644 (file)
@@ -74,7 +74,7 @@ switch (getExtensionMode()) {
                addAdminMenuSql('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen &uuml;ber das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. <strong>Vorsicht:</strong> Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10);
 
                // Reload lock table
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_yoomedia_reload`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_yoomedia_reload`');
                addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_yoomedia_reload` (
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `type` VARCHAR(255) NOT NULL DEFAULT 'general',
@@ -89,7 +89,7 @@ UNIQUE `y_type` (`type`,`y_id`)
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_yoomedia','list_yoomedia_tm')");
-               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_yoomedia_reload`");
+               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_yoomedia_reload`');
                break;
 
        case 'activate': // Do stuff when admin activates this extension
index 1570488b12a1cc72cd6dd68a52421149052e3cb0..6b33ba7f8a117af4cc7d0815ccb818c4f1e3d7d7 100644 (file)
@@ -436,7 +436,7 @@ function FILTER_COMPILE_CONFIG ($code, $compiled = false) {
        if ($compiled === true) {
                // Run the code
                $eval = "\$GLOBALS['compiled_config'][\$uncompiled] = \"" . $GLOBALS['compiled_config'][$uncompiled] . "\";";
-               /* DEBUG: */ print(__FUNCTION__.'['.__LINE__.']:<pre>' . str_replace('$', '&#36;', htmlentities($eval)) . '</pre>');
+               //* DEBUG: */ print(__FUNCTION__.'['.__LINE__.']:<pre>' . str_replace('$', '&#36;', htmlentities($eval)) . '</pre>');
                eval($eval);
        } // END - if
 
index bac7b16a82c2a885ece8cd0f7738929d43bf0ecf..1d7c71f5d230274e05c92a05351c2c551fb2fa97 100644 (file)
@@ -178,7 +178,7 @@ function doFinalCompilation ($code, $insertComments = true) {
        $cnt = 0;
 
        // Compile all out
-       while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{!') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($cnt < 3)) {
+       while (((strpos($code, '{--') !== false) || (strpos($code, '{DQUOTE}') !== false) || (strpos($code, '{?') !== false) || (strpos($code, '{%') !== false)) && ($cnt < 3)) {
                // Init common variables
                $content = array();
                $newContent = '';
@@ -306,7 +306,7 @@ function loadTemplate ($template, $return = false, $content = array()) {
 
                        // Do we have to compile the code?
                        $ret = '';
-                       if ((strpos($GLOBALS['tpl_content'], '$') !== false) || (strpos($GLOBALS['tpl_content'], '{--') !== false) || (strpos($GLOBALS['tpl_content'], '{!') !== false) || (strpos($GLOBALS['tpl_content'], '{?') !== false) || (strpos($GLOBALS['tpl_content'], '{%') !== false)) {
+                       if ((strpos($GLOBALS['tpl_content'], '$') !== false) || (strpos($GLOBALS['tpl_content'], '{--') !== false) || (strpos($GLOBALS['tpl_content'], '{?') !== false) || (strpos($GLOBALS['tpl_content'], '{%') !== false)) {
                                // Normal HTML output?
                                if (getOutputMode() == '0') {
                                        // Add surrounding HTML comments to help finding bugs faster
@@ -607,7 +607,7 @@ Message : ' . htmlentities(utf8_decode($message)) . '
        }
 
        // Why did we end up here? This should not happen
-       debug_report_bug('Ending up: template=' . $template);
+       debug_report_bug(__FUNCTION__, __LINE__, 'Ending up: template=' . $template);
 }
 
 // Check to use wether legacy mail() command or PHPMailer class
@@ -880,7 +880,7 @@ function translateMenuVisibleLocked ($content, $prefix = '') {
                case 'N': $content[$prefix . 'visible_css'] = $prefix . 'menu_invisible'; break;
                default:
                        // Please report this
-                       debug_report_bug('Unsupported visible value detected. content=<pre>'.print_r($content, true).'</pre>');
+                       debug_report_bug(__FUNCTION__, __LINE__, 'Unsupported visible value detected. content=<pre>'.print_r($content, true).'</pre>');
                        break;
        } // END - switch
 
@@ -891,7 +891,7 @@ function translateMenuVisibleLocked ($content, $prefix = '') {
                case 'N': $content[$prefix . 'locked_css'] = $prefix . 'menu_unlocked'; break;
                default:
                        // Please report this
-                       debug_report_bug('Unsupported locked value detected. content=<pre>'.print_r($content, true).'</pre>');
+                       debug_report_bug(__FUNCTION__, __LINE__, 'Unsupported locked value detected. content=<pre>'.print_r($content, true).'</pre>');
                        break;
        } // END - switch
 
@@ -1049,7 +1049,7 @@ function compileCode ($code, $simple = false, $constants = true, $full = true) {
 }
 
 // Compiles the code (use compileCode() only for HTML because of the comments)
-// @TODO $simple is deprecated
+// @TODO $simple/$constants are deprecated
 function compileRawCode ($code, $simple = false, $constants = true, $full = true) {
        // Is the code a string?
        if (!is_string($code)) {
@@ -1066,16 +1066,8 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true
        // Compile more through a filter
        $code = runFilterChain('compile_code', $code);
 
-       // Compile constants
-       if ($constants === true) {
-               // BEFORE 0.2.1 : Language and data constants
-               // WITH 0.2.1+  : Only language constants
-               $code = str_replace('{--', "{DQUOTE} . getMessage('", str_replace('--}', "') . {DQUOTE}", $code));
-
-               // BEFORE 0.2.1 : Not used
-               // WITH 0.2.1+  : Data constants
-               $code = str_replace('{!', "{DQUOTE} . constant('", str_replace('!}', "') . {DQUOTE}", $code));
-       } // END - if
+       // Compile message strings
+       $code = str_replace('{--', '{%message,', str_replace('--}', '%}', $code));
 
        // Compile QUOT and other non-HTML codes
        foreach ($secChars['to'] as $k => $to) {
@@ -3487,7 +3479,7 @@ function initCacheInstance () {
        $GLOBALS['cache_instance'] = new CacheSystem();
        if ($GLOBALS['cache_instance']->getStatus() != 'done') {
                // Failed to initialize cache sustem
-               addFatalMessage(__FUNCTION__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMessage('CACHE_CANNOT_INITIALIZE'));
+               addFatalMessage(__FUNCTION__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): {--CACHE_CANNOT_INITIALIZE--}');
        } // END - if
 }
 
index 16ea671c73367af7d995b6d4efd08013d7734784..d4eee50672d8a5709b685595f14f028f48176716 100644 (file)
@@ -238,14 +238,14 @@ function outputAdvancedOverview (&$result_main) {
                $since = getConfig('ap_inactive_since');
                $EXCLUDE_LIST = '';
                if (getConfig('def_refid') > 0) {
-                       $EXCLUDE_LIST = " AND d.userid != ".getConfig('def_refid')."";
+                       $EXCLUDE_LIST = ' AND d.userid != {?def_refid?}';
                } // END - if
 
                // Check for more extensions
                // @TODO These can be rewritten to filter
-               if (isExtensionActive('beg'))                  $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_userid')."";
-               if (isExtensionActive('bonus'))                $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_userid')."";
-               if (isExtensionActive('doubler'))              $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_userid')."";
+               if (isExtensionActive('beg'))                  $EXCLUDE_LIST .= ' AND d.userid != {?beg_userid?}';
+               if (isExtensionActive('bonus'))                $EXCLUDE_LIST .= ' AND d.userid != {?bonus_userid?}';
+               if (isExtensionActive('doubler'))              $EXCLUDE_LIST .= ' AND d.userid != {?doubler_userid?}';
                if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
                        // Recent ext-holiday found
                        $EXCLUDE_LIST .= " AND d.`holiday_active`='N'";
index cc9c5fcc660c78acea43ab93ac2221561b3d8c44..549340dd24c98f67d265ce918a9abbd731bdad4a 100644 (file)
@@ -230,7 +230,7 @@ function determineRandomReferalId () {
        // Is the extension version fine?
        if (isExtensionInstalledAndNewer('user', '0.3.4')) {
                // Get all user ids
-               $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true, " AND `rand_confirmed` >= ".getConfig('user_min_confirmed')."");
+               $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true, " AND `rand_confirmed` >= {?user_min_confirmed?}");
 
                // Do we have at least one?
                if ($totalUsers > 0) {
index a2d715f7ead7a94bba2b33e88c61b83f20ac4c8d..a74c21a33792ab8484e2874c356f114bc2ab5b90 100644 (file)
@@ -98,7 +98,8 @@ if (!empty($sql)) {
                // Okay lets notify all users!
                while ($content = SQL_FETCHARRAY($result_main)) {
                        // Update account
-                       SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data`
+                       SQL_QUERY_ESC("UPDATE
+       `{?_MYSQL_PREFIX?}_user_data`
 SET
        `bonus_ral_notify`=UNIX_TIMESTAMP(),
        `bonus_ral_%s_notify`=UNIX_TIMESTAMP()
index c05283cd952ec2061af75231c7c8c29b052411a4..c623e19b98d37abe1f154be02474dd658d55cb3e 100644 (file)
@@ -86,7 +86,6 @@ if (isFormSent()) {
        $content['member_selection'] = addMemberSelectionBox(getConfig('bonus_userid'), false, true, true, 'bonus_userid');
 
        // Initialize array for the points list
-       //die("*".getConfig('turbo_rates')."*");
        $RANKS = explode(';', getConfig('turbo_rates'));
 
        // Automatically calculate bonus points for ranks 2 and 3 when not set
index e7d72d4dfe8ea263f64a7d32d88d8c0be3ad374b..5cbd50969325dab6d9203d9c5439ed339e2d989e 100644 (file)
@@ -46,16 +46,16 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('admin', __FILE__);
 
 // Exclude default referal id if set
+// @TODO Rewrite those lines to filter
 $EXCLUDE_LIST = '';
 if (getConfig('def_refid') > 0) {
-       $EXCLUDE_LIST = " AND d.userid != ".getConfig('def_refid')."";
+       $EXCLUDE_LIST = ' AND d.userid != {?def_refid?}';
 } // END - if
 
 // Check for more extensions
-// @TODO Rewrite those lines to filter
-if (isExtensionActive('beg'))                  $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_userid')."";
-if (isExtensionActive('bonus'))                $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_userid')."";
-if (isExtensionActive('doubler'))              $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_userid')."";
+if (isExtensionActive('beg'))                  $EXCLUDE_LIST .= ' AND d.userid != {?beg_userid?}';
+if (isExtensionActive('bonus'))                $EXCLUDE_LIST .= ' AND d.userid != {?bonus_userid?}';
+if (isExtensionActive('doubler'))              $EXCLUDE_LIST .= ' AND d.userid != {?doubler_userid?}';
 if (isExtensionInstalledAndNewer('holiday', '0.1.3')) $EXCLUDE_LIST .= " AND d.holiday_active='N'";
 
 // Check for all accounts
index 1ce67bbb3ab4b97681719ff08fe9104f375303ab..5fb789f51cb2cac5cb977318eb18e8d12cbaf9c8 100644 (file)
@@ -95,7 +95,7 @@ LIMIT 1",
                                        // Check for bonus extension version >= 0.4.4 for the order bonus
                                        if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (getConfig('bonus_active') == 'Y')) {
                                                // Add points directly
-                                               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_order`=`bonus_order`+".getConfig('bonus_order')." WHERE `userid`=%s LIMIT 1",
+                                               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_order`=`bonus_order`+{?bonus_order?} WHERE `userid`=%s LIMIT 1",
                                                        array(bigintval($content['sender'])), __FILE__, __LINE__);
 
                                                // Subtract bonus points from system
index 166f2b8a5bc842b2d81abcb1bcf807d942a9e118..1121248be5ada1699a9be064fc6274e4e84de9cd 100644 (file)
@@ -56,11 +56,11 @@ if (isGetRequestParameterSet('hash')) {
        $userid = '0';
 
        // Search for an unconfirmed or confirmed account
-       $result = SQL_QUERY_ESC("SELECT `userid`, `email`, `refid`,`gender` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `user_hash`='%s' AND (`status`='UNCONFIRMED' OR `status`='CONFIRMED') LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `userid`, `email`, `refid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `user_hash`='%s' AND (`status`='UNCONFIRMED' OR `status`='CONFIRMED') LIMIT 1",
                array(getRequestParameter('hash')), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) == 1) {
                // Ok, he want's to confirm now so we load some data
-               list($userid, $email, $rid, $gender) = SQL_FETCHROW($result);
+               list($userid, $email, $refid) = SQL_FETCHROW($result);
 
                // Fetch user data
                if (!fetchUserData($userid)) {
@@ -70,11 +70,18 @@ if (isGetRequestParameterSet('hash')) {
 
                // Load all data and add points
                $content = getUserDataArray();
-               $content['gender'] = translateGender($content['gender']);
-               $content['points'] = getConfig('points_register');
 
                // Unlock his account (but only when it is on UNCONFIRMED!)
-               SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `status`='CONFIRMED', ref_payout={?ref_payout?}, `user_hash`=NULL WHERE `user_hash`='%s' AND `status`='UNCONFIRMED' LIMIT 1",
+               SQL_QUERY_ESC("UPDATE
+       `{?_MYSQL_PREFIX?}_user_data`
+SET
+       `status`='CONFIRMED',
+       `ref_payout`={?ref_payout?},
+       `user_hash`=NULL
+WHERE
+       `user_hash`='%s' AND
+       `status`='UNCONFIRMED'
+LIMIT 1",
                        array(getRequestParameter('hash')), __FILE__, __LINE__);
                if (SQL_AFFECTEDROWS() == 1) {
                        // Send email if updated
@@ -84,11 +91,11 @@ if (isGetRequestParameterSet('hash')) {
                        sendEmail($email, getMessage('GUEST_THANX_CONFIRM'), $message);
 
                        // Maybe he got "referaled"?
-                       if (($rid > 0) && ($rid != $userid)) {
+                       if (($refid > 0) && ($refid != $userid)) {
                                // Select the referal userid
-                               if (fetchUserData($rid)) {
+                               if (fetchUserData($refid)) {
                                        // Update ref counter...
-                                       updateReferalCounter($rid);
+                                       updateReferalCounter($refid);
 
                                        // Shall I 'pay' the referal points imidiately?
                                        if (getConfig('ref_payout') == '0') {
@@ -103,7 +110,7 @@ if (isGetRequestParameterSet('hash')) {
                                        if ((isExtensionInstalledAndNewer('bonus', '0.4.4')) && (getConfig('bonus_active') == 'Y')) {
                                                // Add points (directly only!)
                                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `bonus_ref`=`bonus_ref`+{?bonus_ref?} WHERE `userid`=%s LIMIT 1",
-                                                       array(bigintval($rid)), __FILE__, __LINE__);
+                                                       array(bigintval($refid)), __FILE__, __LINE__);
 
                                                // Subtract points from system
                                                handleBonusPoints(getConfig('bonus_ref'));
@@ -112,7 +119,7 @@ if (isGetRequestParameterSet('hash')) {
                                        // Add one-time referal bonus over referal system or directly
                                        // @TODO Try to rewrite the following unset()
                                        unset($GLOBALS['ref_level']);
-                                       addPointsThroughReferalSystem('referal_bonus', $rid, getConfig('points_ref'), true, bigintval($userid), $locked, getConfig('reg_points_mode'));
+                                       addPointsThroughReferalSystem('referal_bonus', $refid, getConfig('points_ref'), true, bigintval($userid), $locked, getConfig('reg_points_mode'));
                                } // END - if
                        } // END - if
 
index aadc78d97698350bbaf8002123db0b4910a68fc3..a5165082ba5b18a4dda7a4c5fc724c1500e276e7 100644 (file)
@@ -77,12 +77,12 @@ $ltitle = getMessage('GUEST_STATS_' . strtoupper($lmode));
 switch (getConfig('guest_stats')) {
        case 'MEMBERS': // Statistics about your members
                // Members yesterday / today online
-               $ymem = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `last_online` >= ".getConfig('START_YDAY')." AND `last_online` < ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__));
-               $tmem = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `last_online` >= ".getConfig('START_TDAY')." AND `status`='CONFIRMED'", __FILE__, __LINE__));
+               $ymem = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `last_online` >= {?START_YDAY?} AND `last_online` < {?START_TDAY?} AND `status`='CONFIRMED'", __FILE__, __LINE__));
+               $tmem = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `last_online` >= {?START_TDAY?} AND `status`='CONFIRMED'", __FILE__, __LINE__));
 
                // Yesterday / today registered
-               $yreg = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `joined` >= ".getConfig('START_YDAY')." AND `joined` < ".getConfig('START_TDAY'), __FILE__, __LINE__));
-               $treg = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `joined` >= ".getConfig('START_TDAY'), __FILE__, __LINE__));
+               $yreg = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `joined` >= {?START_YDAY?} AND `joined` < {?START_TDAY?}", __FILE__, __LINE__));
+               $treg = SQL_NUMROWS(SQL_QUERY("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `joined` >= {?START_TDAY?}", __FILE__, __LINE__));
 
                // Only males / females
                $male   = countSumTotalData('M', 'user_data', 'userid', 'gender', true, " AND `status`='CONFIRMED'");
@@ -241,7 +241,7 @@ switch (getConfig('guest_stats')) {
        case 'INACTIVE': // Deactivated stats
                loadTemplate('admin_settings_saved', false, getMessage('GUEST_STATS_DEACTIVATED'));
                break;
-}
+} // END - switch
 
 // [EOF]
 ?>
index c360728d6a4ced1ca965ea09cf2ff280f2466675..83d8724ff24622ea82a394cd25bacb0cac6e89e6 100644 (file)
@@ -219,7 +219,9 @@ LIMIT 1",
                $add = '';
                if ((getConfig('order_multi_page') == 'Y') && (isPostRequestParameterSet('zip')) && (postRequestParameter('zip') != '')) {
                        // Choose recipients by ZIP code
-                       $add = " AND d.zip LIKE '".bigintval(postRequestParameter('zip'))."{PER}'";
+                       $add = sprintf(" AND d.zip LIKE '%s%%'",
+                               bigintval(postRequestParameter('zip'))
+                       );
                } // END - if
 
                // Check for userids
index ba40074cf842234a089c2d9e22d1f5676d9b66c2..ddc7586b6f4001a2144985461ef6fd5f4e7c6b29 100644 (file)
@@ -280,14 +280,14 @@ switch ($mode) {
                $nothingMessage = '';
                switch ($mode) {
                        case 'list_in':
-                               $sql = "SELECT `trans_id`, `from_userid` AS party_userid, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `userid`=%s ORDER BY `time_trans` DESC LIMIT ".getConfig('transfer_max');
+                               $sql = "SELECT `trans_id`, `from_userid` AS party_userid, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_in` WHERE `userid`=%s ORDER BY `time_trans` DESC LIMIT {?transfer_max?}";
                                $nothingMessage = getMessage('TRANSFER_NO_INCOMING_TRANSFERS');
                                $content['balance'] = getMessage('TRANSFER_TOTAL_INCOMING');
                                $content['title']   = getMessage('TRANSFER_LIST_INCOMING');
                                break;
 
                        case 'list_out':
-                               $sql = "SELECT `trans_id`, `to_userid` AS party_userid, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_out` WHERE `userid`=%s ORDER BY `time_trans` DESC LIMIT ".getConfig('transfer_max');
+                               $sql = "SELECT `trans_id`, `to_userid` AS party_userid, `points`, `reason`, `time_trans` FROM `{?_MYSQL_PREFIX?}_user_transfers_out` WHERE `userid`=%s ORDER BY `time_trans` DESC LIMIT {?transfer_max?}";
                                $nothingMessage = getMessage('TRANSFER_NO_OUTGOING_TRANSFERS');
                                $content['balance'] = getMessage('TRANSFER_TOTAL_OUTGOING');
                                $content['title']   = getMessage('TRANSFER_LIST_OUTGOING');
index a4bb4d0271a1ed3179c73c3ca13330c74025d47f..e99858cd74a0970a5158ea5b3ce33147975b420b 100644 (file)
@@ -75,7 +75,7 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo
                setGetRequestParameter('mode', 'list');
 
                // And load all rows!
-               $result = SQL_QUERY_ESC("SELECT `id`,`wernis_account`,`wernis_amount`,`wernis_timestamp`,`wernis_type` FROM `{?_MYSQL_PREFIX?}_user_wernis` WHERE `userid`=%s ORDER BY `wernis_timestamp` DESC",
+               $result = SQL_QUERY_ESC("SELECT `id`, `wernis_account`, `wernis_amount`, `wernis_timestamp`, `wernis_type` FROM `{?_MYSQL_PREFIX?}_user_wernis` WHERE `userid`=%s ORDER BY `wernis_timestamp` DESC",
                        array(getMemberId()), __FILE__, __LINE__);
 
                // Load all rows
@@ -84,10 +84,9 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo
                        // Prepare data for output
                        $rowContent = array(
                                'wernis_timestamp' => generateDateTime($data['wernis_timestamp'], 2),
-                               'points'           => translateComma($data['wernis_amount']),
-                               'wernis_account'   => bigintval($data['wernis_account']),
-                               'status'           => WERNIS_TRANSFER_STATUS($data['wernis_type']),
-                               'raw_type'         => strtolower($data['wernis_type']),
+                               'wernis_amount'    => $data['wernis_amount'],
+                               'wernis_account'   => $data['wernis_account'],
+                               'wernis_type'      => $data['wernis_type'],
                                'sw'               => $SW,
                        );
 
@@ -106,13 +105,13 @@ if ((!isGetRequestParameterSet('mode')) || (getRequestParameter('mode') == 'choo
                // Is the payout mode active?
                if (getConfig('wernis_payout_active') == 'Y') {
                        // Add link
-                       $content['payout_link'] = "<a class=\"menu_blur\" style=\"height: 40px\" href=\"{%url=modules.php?module=login&amp;what=wernis&amp;mode=payout%}\"><div style=\"padding-top: 10px\">{--MEMBER_WERNIS_MODE_PAYOUT--}</div></a>";
+                       $content['payout_link'] = '<a class="menu_blur" style="height: 40px" href="{%url=modules.php?module=login&amp;what=wernis&amp;mode=payout%}"><div style="padding-top: 10px">{--MEMBER_WERNIS_MODE_PAYOUT--}</div></a>';
                } // END - if
 
                // Is the withdraw mode active?
                if (getConfig('wernis_withdraw_active') == 'Y') {
                        // Add link
-                       $content['withdraw_link'] = "<a class=\"menu_blur\" style=\"height: 40px\" href=\"{%url=modules.php?module=login&amp;what=wernis&amp;mode=withdraw%}\"><div style=\"padding-top: 10px\">{--MEMBER_WERNIS_MODE_WITHDRAW--}</div></a>";
+                       $content['withdraw_link'] = '<a class="menu_blur" style="height: 40px" href="{%url=modules.php?module=login&amp;what=wernis&amp;mode=withdraw%}"><div style="padding-top: 10px">{--MEMBER_WERNIS_MODE_WITHDRAW--}</div></a>';
                } // END - if
 
                // Mode chooser! ;-)
index b988afb7d9c5c954af4ddd788e896a79d349a5c8..1c20fbe7269a23df9c607a41f5c44888fff6c369 100644 (file)
@@ -820,7 +820,7 @@ function addMaxReceiveList ($mode, $default = '', $return = false) {
 // Checks wether the given email address is used.
 function isEmailTaken ($email) {
        // Query the database
-       $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `email` LIKE '{PER}%s{PER}' OR `email` LIKE '{PER}%s{PER}' LIMIT 1",
+       $result = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `email` LIKE '%%%s%%' OR `email` LIKE '%%%s%%' LIMIT 1",
                array($email, str_replace('.', '{DOT}', $email)), __FUNCTION__, __LINE__);
 
        // Is the email there?
index c91f93e88c2ff2dacb6ec88956f376df6c1f8ae7..cee610df471d40f836d541a06e9e6907d6a30147 100644 (file)
@@ -956,18 +956,6 @@ function getHttpStatus () {
        return $GLOBALS['http_status'];
 }
 
-// Compiles config entries for SQL queries
-function compileSqlConfig ($sqlString) {
-       // Replace all
-       foreach (array('_MYSQL_PREFIX', '_TABLE_TYPE') as $configEntry) {
-               // "Compile" it
-               $sqlString = str_replace('{?' . $configEntry . '?}', getConfig($configEntry), $sqlString);
-       } // END - foreach
-
-       // Return the compiled SQL string
-       return $sqlString;
-}
-
 // Setter for 'is_template_html'
 function enableTemplateHtml ($enable = true) {
        $GLOBALS['is_template_html'] = (bool) $enable;
index b46ccf124470a8875bd96eea6b085c52b9d87009..0e31d690264852f3b02910e2fee22b4eb213171a 100644 (file)
@@ -25,7 +25,7 @@ An Konto: $content[account]
 
 Bitte &uuml;berpr&uuml;fen Sie diese Daten und &uuml;berweisen Sie dann den geforderten Betrag.
 
-Die {!WERNIS_POINTS_VALUE!} Wernis wurden dem Mitglied bereits abgebucht.
+Die {%pipe,translateComma=$content[wernis_amout]%} Wernis wurden dem Mitglied bereits abgebucht.
 
 Bitte vergessen Sie nicht, das Mitglied &uuml;ber die Auszahlung zu informieren, da dies nicht automatisch erfolgt.
 
index abb5253266b20d7457095672160473b4ca743814..9e68df08bbd501375d77fed40a5e23ab0bf5aef4 100644 (file)
@@ -7,7 +7,7 @@ Sie k&ouml;nnen sich nun hier einloggen:
 Ihre Login-Id lautet: $userid
 URL zum Login: {?URL?}/login.php
 
-f&uuml;r Ihre Anmeldung werden wir Ihnen als Willkommensgutschrift $content[points] {?POINTS?} gutschreiben, sobald Sie {?ref_payout?} Mails best&auml;tigt haben. Erst dann k&ouml;nnen Sie Mails an die anderen Mitglieder verschicken!
+f&uuml;r Ihre Anmeldung werden wir Ihnen als Willkommensgutschrift {%config,translateComma=points_register%} {?POINTS?} gutschreiben, sobald Sie {?ref_payout?} Mails best&auml;tigt haben. Erst dann k&ouml;nnen Sie Mails an die anderen Mitglieder verschicken!
 
 Wir w&uuml;nschen Ihnen viel Spass und Erfolg beim Mail-Versand!
 
index 58ae5f913e8aca51dfceca4a262764ff99aea949..3b2db8c2294d6e7999b8ab7fd8f9e976b3845647 100644 (file)
@@ -1,6 +1,6 @@
 Hallo {%user,gender,translateGender=$userid%} {%user,surname=$userid%} {%user,family=$userid%},
 
-Sie hatten an uns {?MAIN_TITLE?} eine Auszahlungsanfrage geschickt.
+Sie hatten an uns eine Auszahlungsanfrage geschickt.
 
 Wir haben folgende Daten von Ihnen per Mail erhalten:
 ------------------------------
@@ -15,7 +15,7 @@ Auszahlungshoehe: $content[payout]
 An Konto: $content[account]
 ------------------------------
 
-Die dazu n&ouml;tigen {!WERNIS_POINTS_VALUE!} Wernis haben wir Ihnen bereits abgezogen.
+Die dazu n&ouml;tigen {%pipe,translateComma=$content[wernis_amout]%} Wernis haben wir Ihnen bereits abgezogen.
 
 Sie sollten soeben eine Aufbuchung auf Ihrem WDS66-Hauptaccount erhalten haben!
 
index 1822ada377cca863457583396f30b25fd1254e8c..376fc605759d4ba20554de8e26b2b02be77210da 100644 (file)
@@ -1,6 +1,6 @@
 <tr>
-       <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom right">$content[points] Wernis</td>
-       <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom right">$content[wernis_account]</td>
+       <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom right">{%pipe,translateComma=$content[wernis_amount]%} Wernis</td>
+       <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom right">{%pipe,bigintval=$content[wernis_account]%}</td>
        <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom right">$content[wernis_timestamp]</td>
-       <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom">$content[status]</td>
+       <td align="center" class="switch_sw$content[sw] wernis_type_$content[raw_type] bottom">{%pipe,WERNIS_TRANSFER_STATUS=$content[wernis_type]%}</td>
 </tr>