ADD UNIQUE ... what? INDEX now. And auto-unregistration of missing filter functions...
authorRoland Häder <roland@mxchange.org>
Tue, 9 Aug 2011 17:59:06 +0000 (17:59 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 9 Aug 2011 17:59:06 +0000 (17:59 +0000)
16 files changed:
inc/db/lib-mysql3.php
inc/extensions/ext-coupon.php
inc/extensions/ext-earning.php
inc/extensions/ext-grade.php
inc/extensions/ext-network.php
inc/extensions/ext-newsletter.php
inc/extensions/ext-sponsor.php
inc/extensions/ext-sql_patches.php
inc/extensions/ext-surfbar.php
inc/extensions/ext-user.php
inc/extensions/ext-yoomedia.php
inc/filter-functions.php
inc/filters.php
inc/fix_filters.php
inc/fix_menu.php
inc/fix_refsystem.php

index 85069429d15745deaf796e5ad661f1deb06696c3..1024b238d513ffc1b6c30553526fd4f008b349ff 100644 (file)
@@ -366,11 +366,11 @@ function SQL_ALTER_TABLE ($sql, $F, $L, $enableCodes = true) {
        $isAlterIndex = (
                (
                        isInString('INDEX', $sql)
        $isAlterIndex = (
                (
                        isInString('INDEX', $sql)
-               ) && (
+               ) || (
                        isInString('KEY', $sql)
                        isInString('KEY', $sql)
-               ) && (
+               ) || (
                        isInString('FULLTEXT', $sql)
                        isInString('FULLTEXT', $sql)
-               ) && (
+               ) || (
                        isInString('UNIQUE', $sql)
                )
        );
                        isInString('UNIQUE', $sql)
                )
        );
@@ -579,7 +579,7 @@ function isSqlTableCreated ($tableName) {
 
 // Is a table column there?
 function isSqlTableColumnFound ($tableName, $columnName) {
 
 // Is a table column there?
 function isSqlTableColumnFound ($tableName, $columnName) {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',columnName=' . $columName . ' - ENTERED!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',columnName=' . $columnName . ' - ENTERED!');
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__][$tableName][$columnName])) {
                // And column name as well
        // Do we have cache?
        if (!isset($GLOBALS[__FUNCTION__][$tableName][$columnName])) {
                // And column name as well
@@ -598,7 +598,7 @@ function isSqlTableColumnFound ($tableName, $columnName) {
        } // END - if
 
        // Return cache
        } // END - if
 
        // Return cache
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',columnName=' . $columName . ',result=' . intval($GLOBALS[__FUNCTION__][$tableName][$columnName]) . ' - EXIT!');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',columnName=' . $columnName . ',result=' . intval($GLOBALS[__FUNCTION__][$tableName][$columnName]) . ' - EXIT!');
        return $GLOBALS[__FUNCTION__][$tableName][$columnName];
 }
 
        return $GLOBALS[__FUNCTION__][$tableName][$columnName];
 }
 
index 2d2bae282482284f86595abe0da6b19c18a3cdf9..77143b8ac3bd3a6c802b4d47eb0037b89cf9f8a0 100644 (file)
@@ -77,7 +77,7 @@ PRIMARY KEY (`id`)",
 `coupon_code` VARCHAR(30) NULL DEFAULT NULL,
 `cashed_on` TIMESTAMP NULL DEFAULT NULL,
 PRIMARY KEY (`id`),
 `coupon_code` VARCHAR(30) NULL DEFAULT NULL,
 `cashed_on` TIMESTAMP NULL DEFAULT NULL,
 PRIMARY KEY (`id`),
-UNIQUE `coupon_user` (`coupon_id`,`userid`),
+UNIQUE INDEX `coupon_user` (`coupon_id`,`userid`),
 UNIQUE (`coupon_code`)",
                        'Coupon->user connection');
 
 UNIQUE (`coupon_code`)",
                        'Coupon->user connection');
 
index 4ef86a53cfdfc86b428ea30109293eff3ebf254a..cd8f3a9f4ac0a73caf92d5f29a38379c80f1738b 100644 (file)
@@ -65,7 +65,7 @@ switch (getExtensionMode()) {
 `earning_provider` VARCHAR(255) NOT NULL DEFAULT 'INVALID',
 `earning_sorting` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`earning_id`),
 `earning_provider` VARCHAR(255) NOT NULL DEFAULT 'INVALID',
 `earning_sorting` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`earning_id`),
-UNIQUE `earning_group_name` (`earning_group`,`earning_provider`)",
+UNIQUE INDEX `earning_group_name` (`earning_group`,`earning_provider`)",
                        'Registered (extra) earnings');
 
                // User->earnings connection table
                        'Registered (extra) earnings');
 
                // User->earnings connection table
@@ -81,7 +81,7 @@ UNIQUE `earning_group_name` (`earning_group`,`earning_provider`)",
 `earning_current_amount` SMALLINT(7) NOT NULL DEFAULT 0,
 `earning_points` FLOAT(20,5) NOT NULL DEFAULT 0.00000,
 PRIMARY KEY (`id`),
 `earning_current_amount` SMALLINT(7) NOT NULL DEFAULT 0,
 `earning_points` FLOAT(20,5) NOT NULL DEFAULT 0.00000,
 PRIMARY KEY (`id`),
-UNIQUE `user_earning` (`earning_id`,`earning_userid`),
+UNIQUE INDEX `user_earning` (`earning_id`,`earning_userid`),
 INDEX (`earning_userid`)",
                        'User->Earning connections');
 
 INDEX (`earning_userid`)",
                        'User->Earning connections');
 
index 687bc0d61849eb355017ce0e1ad51ceb81676b8b..3eff1425edb47760a5db0ec95c3eccbb6b90dbc8 100644 (file)
@@ -83,7 +83,7 @@ UNIQUE (`grade_cash_name`)",
 `grade_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `grade_cash_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`id`),
 `grade_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `grade_cash_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`id`),
-UNIQUE `grade_cash` (`grade_id`,`grade_cash_id`),
+UNIQUE INDEX `grade_cash` (`grade_id`,`grade_cash_id`),
 INDEX (`grade_cash_id`)",
                        'Grade<->cash data connection');
 
 INDEX (`grade_cash_id`)",
                        'Grade<->cash data connection');
 
index 9419d9ff20abd1b39d0a67b709c8d9f9d1468604..14a18b8d6fae64a4b2a9c1044e31facd2cadb262 100644 (file)
@@ -100,7 +100,7 @@ UNIQUE (`network_short_name`)",
 `network_type_click_url` VARCHAR(255) NOT NULL DEFAULT '',
 `network_type_banner_url` VARCHAR(255) NULL DEFAULT NULL,
 PRIMARY KEY (`network_type_id`),
 `network_type_click_url` VARCHAR(255) NOT NULL DEFAULT '',
 `network_type_banner_url` VARCHAR(255) NULL DEFAULT NULL,
 PRIMARY KEY (`network_type_id`),
-UNIQUE `provider_type` (`network_id`,`network_type_handle`)",
+UNIQUE INDEX `provider_type` (`network_id`,`network_type_handle`)",
                        'Types provideable by networks');
 
                // HTTP parameters (names) for URLs
                        'Types provideable by networks');
 
                // HTTP parameters (names) for URLs
@@ -113,8 +113,8 @@ UNIQUE `provider_type` (`network_id`,`network_type_handle`)",
 `request_param_value` VARCHAR(20) NOT NULL DEFAULT 'invalid',
 `request_param_default` VARCHAR(255) NULL DEFAULT NULL,
 PRIMARY KEY (`network_param_id`),
 `request_param_value` VARCHAR(20) NOT NULL DEFAULT 'invalid',
 `request_param_default` VARCHAR(255) NULL DEFAULT NULL,
 PRIMARY KEY (`network_param_id`),
-UNIQUE `provider_type_key` (`network_id`,`network_type_id`,`request_param_key`),
-UNIQUE `provider_type_value` (`network_id`,`network_type_id`,`request_param_value`),",
+UNIQUE INDEX `provider_type_key` (`network_id`,`network_type_id`,`request_param_key`),
+UNIQUE INDEX `provider_type_value` (`network_id`,`network_type_id`,`request_param_value`),",
                        'Request parameters for GET/POST request');
 
                // Error status codes
                        'Request parameters for GET/POST request');
 
                // Error status codes
@@ -125,7 +125,7 @@ UNIQUE `provider_type_value` (`network_id`,`network_type_id`,`request_param_valu
 `network_type_code_value` VARCHAR(50) NOT NULL DEFAULT '',
 `network_type_code_type` VARCHAR(100) NOT NULL DEFAULT 'INVALID_TYPE',
 PRIMARY KEY (`network_type_code_id`),
 `network_type_code_value` VARCHAR(50) NOT NULL DEFAULT '',
 `network_type_code_type` VARCHAR(100) NOT NULL DEFAULT 'INVALID_TYPE',
 PRIMARY KEY (`network_type_code_id`),
-UNIQUE `code_type` (`network_type_code_value`,`network_type_id`),
+UNIQUE INDEX `code_type` (`network_type_code_value`,`network_type_id`),
 INDEX (`network_type_id`)",
                        'Error codes for all types');
 
 INDEX (`network_type_id`)",
                        'Error codes for all types');
 
@@ -156,7 +156,7 @@ UNIQUE (`network_translation_name`)",
 `network_api_index` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,
 `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`network_api_id`),
 `network_api_index` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,
 `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`network_api_id`),
-UNIQUE `provider_type_key` (`network_id`,`network_type_id`,`network_api_index`),
+UNIQUE INDEX `provider_type_key` (`network_id`,`network_type_id`,`network_api_index`),
 INDEX (`sort`)",
                        'Translation of API responses, generic data, DO NOT ALTER!');
 
 INDEX (`sort`)",
                        'Translation of API responses, generic data, DO NOT ALTER!');
 
@@ -170,8 +170,8 @@ INDEX (`sort`)",
 `network_query_amount` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `network_active` ENUM('Y','N') NOT NULL DEFAULT 'Y',
 PRIMARY KEY (`network_id`),
 `network_query_amount` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `network_active` ENUM('Y','N') NOT NULL DEFAULT 'Y',
 PRIMARY KEY (`network_id`),
-UNIQUE `network_affiliate` (`network_id`,`network_affiliate_id`),
-UNIQUE `affiliate_site` (`network_affiliate_id`,`network_site_id`)",
+UNIQUE INDEX `network_affiliate` (`network_id`,`network_affiliate_id`),
+UNIQUE INDEX `affiliate_site` (`network_affiliate_id`,`network_site_id`)",
                        'Configuration data from the webmaster (you!)');
 
                // Configuration data for e.g. reload-time
                        'Configuration data from the webmaster (you!)');
 
                // Configuration data for e.g. reload-time
@@ -186,7 +186,7 @@ UNIQUE `affiliate_site` (`network_affiliate_id`,`network_site_id`)",
 `min_payment` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
 `allow_erotic` VARCHAR(10) NOT NULL DEFAULT '',
 PRIMARY KEY (`network_data_id`),
 `min_payment` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000,
 `allow_erotic` VARCHAR(10) NOT NULL DEFAULT '',
 PRIMARY KEY (`network_data_id`),
-UNIQUE `provider_type` (`network_id`,`network_type_id`)",
+UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)",
                        'Configuration data for every type (e.g. reload-time)');
 
                // Cache for queried APIs. Re-check depends on config
                        'Configuration data for every type (e.g. reload-time)');
 
                // Cache for queried APIs. Re-check depends on config
@@ -200,7 +200,7 @@ UNIQUE `provider_type` (`network_id`,`network_type_id`)",
 `network_cache_data` MEDIUMBLOB,
 `network_cache_timestamp` TIMESTAMP NULL DEFAULT NULL,
 PRIMARY KEY (`network_cache_id`),
 `network_cache_data` MEDIUMBLOB,
 `network_cache_timestamp` TIMESTAMP NULL DEFAULT NULL,
 PRIMARY KEY (`network_cache_id`),
-UNIQUE `provider_type` (`network_id`,`network_type_id`)",
+UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)",
                        'Cache for all queried APIs');
 
                // Reload locks for several types
                        'Cache for all queried APIs');
 
                // Reload locks for several types
@@ -212,7 +212,7 @@ UNIQUE `provider_type` (`network_id`,`network_type_id`)",
 `network_reload_lock` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,
 `network_inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`network_reload_id`),
 `network_reload_lock` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 0,
 `network_inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`network_reload_id`),
-UNIQUE `provider_type` (`network_id`,`network_type_id`)",
+UNIQUE INDEX `provider_type` (`network_id`,`network_type_id`)",
                        'Reload locks');
 
                // Insert API response array translations, these will be used for calling the right filter function
                        'Reload locks');
 
                // Insert API response array translations, these will be used for calling the right filter function
index edb0159919464ac35f9bb4665ffa96c6738175c5..895f1f6d4f4f432908f76ca0d25d70c7f44b4030 100644 (file)
@@ -179,7 +179,7 @@ INDEX `newsletter_id` (`nl_id`)",
 `nl_order_placed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 `nl_order_accepted` ENUM('Y','N') NOT NULL DEFAULT 'N',
 PRIMARY KEY (`nl_order_id`),
 `nl_order_placed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 `nl_order_accepted` ENUM('Y','N') NOT NULL DEFAULT 'N',
 PRIMARY KEY (`nl_order_id`),
-UNIQUE `sponsor_nl_topic` (`nl_sponsor_id`,`nl_id`,`nl_topic_id`),
+UNIQUE INDEX `sponsor_nl_topic` (`nl_sponsor_id`,`nl_id`,`nl_topic_id`),
 INDEX `topic` (`nl_topic_id`)",
                                        'Newsletter orders');
 
 INDEX `topic` (`nl_topic_id`)",
                                        'Newsletter orders');
 
index 43ffd192616d4b7abf72d2533234a9e02950611b..f82a2a697a42e2c9a98be524cd1383a8427ca16e 100644 (file)
@@ -155,7 +155,7 @@ INDEX (`ext_name`)",
 `active` ENUM('Y','N') NOT NULL DEFAULT 'N',
 `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`id`),
 `active` ENUM('Y','N') NOT NULL DEFAULT 'N',
 `sort` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`id`),
-UNIQUE `action_what` (`action`,`what`),
+UNIQUE INDEX `action_what` (`action`,`what`),
 UNIQUE (`what`),
 INDEX (`action`)",
                        'Sponsor menu');
 UNIQUE (`what`),
 INDEX (`action`)",
                        'Sponsor menu');
index 875228577f8884e614d8da63f92f1573b80ea3a2..e9cb0920e9812fb0bf85d6723e89da44ea0d0340 100644 (file)
@@ -335,13 +335,13 @@ IN (
                                break;
 
                        case '0.3.1': // SQL queries for v0.3.1
                                break;
 
                        case '0.3.1': // SQL queries for v0.3.1
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` ADD UNIQUE `ext_name` (`ext_name`)");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD UNIQUE `login` (`login`)");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` ADD UNIQUE INDEX `ext_name` (`ext_name`)");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD UNIQUE INDEX `login` (`login`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refbanner` ADD INDEX `visible` (`visible`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refbanner` ADD INDEX `visible` (`visible`)");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refdepths` ADD UNIQUE `level` (`level`)");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refdepths` ADD UNIQUE INDEX `level` (`level`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD INDEX `level` (`level`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` ADD INDEX `data_type` (`data_type`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD INDEX `level` (`level`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` ADD INDEX `data_type` (`data_type`)");
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_mod_reg` ADD UNIQUE `module` (`module`)");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_mod_reg` ADD UNIQUE INDEX `module` (`module`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` ADD INDEX `action` (`action`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` ADD INDEX `what` (`what`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` ADD INDEX `task_type` (`task_type`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` ADD INDEX `action` (`action`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admin_menu` ADD INDEX `what` (`what`)");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` ADD INDEX `task_type` (`task_type`)");
@@ -552,7 +552,7 @@ INDEX (`admin_id`)",
                        case '0.5.0': // SQL queries for v0.5.0
                                addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `level`');
                                addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid`');
                        case '0.5.0': // SQL queries for v0.5.0
                                addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `level`');
                                addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid`');
-                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)');
+                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE INDEX `userid_level` (`userid`,`level`)');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Referal-System unterst&uuml;tzt nun detailierte Referal-&Uuml;bersicht und vieles mehr.");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Referal-System unterst&uuml;tzt nun detailierte Referal-&Uuml;bersicht und vieles mehr.");
@@ -622,7 +622,7 @@ INDEX (`admin_id`)",
 `filter_active` ENUM('N','Y') NOT NULL DEFAULT 'Y',
 `filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`filter_id`),
 `filter_active` ENUM('N','Y') NOT NULL DEFAULT 'Y',
 `filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`filter_id`),
-UNIQUE `name_function` (`filter_name` , `filter_function`)",
+UNIQUE INDEX `name_function` (`filter_name` , `filter_function`)",
                                        'Filter system');
 
                                // Admin menu
                                        'Filter system');
 
                                // Admin menu
index d6ec60abc2c91ae1c87ac623f5b96c36bafa7c35..61e4262d9a59779d957002a3d54f74ad3f070736 100644 (file)
@@ -68,7 +68,7 @@ switch (getExtensionMode()) {
 `url_reject_reason` VARCHAR(255) NOT NULL DEFAULT '',
 `url_fixed_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`url_id`),
 `url_reject_reason` VARCHAR(255) NOT NULL DEFAULT '',
 `url_fixed_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`url_id`),
-UNIQUE `userid_url` (`url_userid`,`url`),
+UNIQUE INDEX `userid_url` (`url_userid`,`url`),
 INDEX `status_userid` (`url_status`,`url_userid`)",
                        'Visitor add-on URLs');
 
 INDEX `status_userid` (`url_status`,`url_userid`)",
                        'Visitor add-on URLs');
 
@@ -80,7 +80,7 @@ INDEX `status_userid` (`url_status`,`url_userid`)",
 `locks_url_id` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
 `locks_last_surfed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`locks_id`),
 `locks_url_id` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
 `locks_last_surfed` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`locks_id`),
-UNIQUE `userid_url` (`locks_userid`,`locks_url_id`),
+UNIQUE INDEX `userid_url` (`locks_userid`,`locks_url_id`),
 INDEX (`locks_url_id`)",
                        'Vistor-addon reload locks');
 
 INDEX (`locks_url_id`)",
                        'Vistor-addon reload locks');
 
@@ -92,7 +92,7 @@ INDEX (`locks_url_id`)",
 `salts_url_id` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
 `salts_last_salt` VARCHAR(255) NOT NULL DEFAULT '',
 PRIMARY KEY (`salts_id`),
 `salts_url_id` BIGINT(20) UNSIGNED  NOT NULL DEFAULT 0,
 `salts_last_salt` VARCHAR(255) NOT NULL DEFAULT '',
 PRIMARY KEY (`salts_id`),
-UNIQUE `salts_userid_url` (`salts_userid`,`salts_url_id`),
+UNIQUE INDEX `salts_userid_url` (`salts_userid`,`salts_url_id`),
 INDEX (`salts_url_id`)",
                        'Visitor add-on last used salts');
 
 INDEX (`salts_url_id`)",
                        'Visitor add-on last used salts');
 
@@ -105,7 +105,7 @@ INDEX (`salts_url_id`)",
 `stats_count` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `stats_last_surfed` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`stats_id`),
 `stats_count` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `stats_last_surfed` TIMESTAMP ON UPDATE CURRENT_TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`stats_id`),
-UNIQUE `userid_url` (`stats_userid`,`stats_url_id`),
+UNIQUE INDEX `userid_url` (`stats_userid`,`stats_url_id`),
 INDEX (`stats_url_id`)",
                        'Visitor add-on Statistics');
 
 INDEX (`stats_url_id`)",
                        'Visitor add-on Statistics');
 
@@ -117,7 +117,7 @@ INDEX (`stats_url_id`)",
 `actions_action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL,
 `actions_new_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
 PRIMARY KEY (`actions_id`),
 `actions_action` ENUM('EDIT','DELETE','PAUSE','UNPAUSE','FRAMETEST','RETREAT','RESUBMIT','BOOKNOW') NULL DEFAULT NULL,
 `actions_new_status` ENUM('PENDING','ACTIVE','LOCKED','STOPPED','REJECTED','DELETED','MIGRATED','DEPLETED') NULL DEFAULT NULL,
 PRIMARY KEY (`actions_id`),
-UNIQUE `status_action` (`actions_status`,`actions_action`)",
+UNIQUE INDEX `status_action` (`actions_status`,`actions_action`)",
                        'Visitor add-on Member Actions');
 
                // Member actions
                        'Visitor add-on Member Actions');
 
                // Member actions
index a8f0afbeb3407d5a3f81820d51c0548f77ae4c5f..9405d9104654237b9b3eda4c8fdf4a952696a4f0 100644 (file)
@@ -372,7 +372,7 @@ INDEX (`userid`)",
 
                        case '0.3.6': // SQL queries for v0.3.6
                                addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` DROP INDEX `userid`');
 
                        case '0.3.6': // SQL queries for v0.3.6
                                addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` DROP INDEX `userid`');
-                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` ADD UNIQUE `userid_catid` (`userid` , `cat_id`)');
+                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` ADD UNIQUE INDEX `userid_catid` (`userid` , `cat_id`)');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Der Sperrgrund wird nun mit abgespeichert und beim L&ouml;schen des Users mit ausgesendet.");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Der Sperrgrund wird nun mit abgespeichert und beim L&ouml;schen des Users mit ausgesendet.");
@@ -464,7 +464,7 @@ INDEX (`userid`)",
 `level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0,
 `refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`id`),
 `level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0,
 `refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 PRIMARY KEY (`id`),
-UNIQUE `user_refid` (`userid`,`level`,`refid`),
+UNIQUE INDEX `user_refid` (`userid`,`level`,`refid`),
 INDEX (`level`),
 INDEX (`refid`)",
                                        'User referals');
 INDEX (`level`),
 INDEX (`refid`)",
                                        'User referals');
index 7b0dec36d866795467b03f74bf65ea509aea524a..851921132e0d518b2dc3bbf144ded0041554f3a5 100644 (file)
@@ -80,7 +80,7 @@ switch (getExtensionMode()) {
 `y_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 0,
 `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
 `y_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 0,
 `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 PRIMARY KEY (`id`),
-UNIQUE `y_type` (`type`,`y_id`)",
+UNIQUE INDEX `y_type` (`type`,`y_id`)",
                        'Reload lock reminder for Yoo!Media campaigns');
                break;
 
                        'Reload lock reminder for Yoo!Media campaigns');
                break;
 
index a292ca2647989ca5fbfbb9ae62b5737f6b416915..ddecb475cb5a710d96392890e98a17a4ad9ae045 100644 (file)
@@ -288,6 +288,9 @@ function runFilterChain ($filterName, $filterData = NULL) {
                if (($active == 'Y') || ($active == 'A') || ((in_array($filterName, array('shutdown','extension_remove','post_extension_run_sql'))) && ($active == 'R'))) {
                        // Is this filter there?
                        if (!function_exists($filterFunction)) {
                if (($active == 'Y') || ($active == 'A') || ((in_array($filterName, array('shutdown','extension_remove','post_extension_run_sql'))) && ($active == 'R'))) {
                        // Is this filter there?
                        if (!function_exists($filterFunction)) {
+                               // Should be logged
+                               logDebugMessage(__FUNCTION__, __LINE__, 'filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - AUTO-UNREGISTERED!');
+
                                // Unregister it
                                unregisterFilter(__FUNCTION__, __LINE__, $filterName, $filterFunction);
 
                                // Unregister it
                                unregisterFilter(__FUNCTION__, __LINE__, $filterName, $filterFunction);
 
index b4726417fee7c8707fcb6621cb1ededdc22c3233..872936cbdac2e4183d6a45e296fd2aaf912b90cc 100644 (file)
@@ -60,8 +60,12 @@ function FILTER_FLUSH_FILTERS () {
 
        // Is the extension ext-sql_patches updated?
        if ((!isExtensionInstalled('sql_patches')) || (isExtensionInstalledAndOlder('sql_patches', '0.5.9'))) {
 
        // Is the extension ext-sql_patches updated?
        if ((!isExtensionInstalled('sql_patches')) || (isExtensionInstalledAndOlder('sql_patches', '0.5.9'))) {
+               // Log only in debug mode
+               if (isDebugModeEnabled()) {
+                       logDebugMessage(__FUNCTION__, __LINE__, 'Cannot flush filters, sql_patches might be missing. isExtensionInstalled()=' . intval(isExtensionInstalled('sql_patches')) . ',isExtensionInstalledAndOlder()=' . intval(isExtensionInstalledAndOlder('sql_patches', '0.5.9')));
+               } // END - if
+
                // Abort silently here
                // Abort silently here
-               logDebugMessage(__FUNCTION__, __LINE__, 'Cannot flush filters, sql_patches might be missing. isExtensionInstalled()=' . isExtensionInstalled('sql_patches') . ',isExtensionInstalledAndOlder()=' . isExtensionInstalledAndOlder('sql_patches', '0.5.9'));
                return false;
        } // END - if
 
                return false;
        } // END - if
 
index 547616edd52f9dac40c8988c0f3618538749ab35..b7dc7a9f400394bd40a0b0596d141e6e685d115e 100644 (file)
@@ -72,7 +72,7 @@ SQL_FREERESULT($result);
 
 // Now insert our unqiue key
 addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_filters` DROP KEY `name_function`');
 
 // Now insert our unqiue key
 addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_filters` DROP KEY `name_function`');
-addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_filters` ADD UNIQUE `name_function` (`filter_name` , `filter_function`)');
+addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_filters` ADD UNIQUE INDEX `name_function` (`filter_name` , `filter_function`)');
 
 // [EOF]
 ?>
 
 // [EOF]
 ?>
index 99fda9dab2e687895e053895dc6bab6955597c18..da6e5dcf97ebc0efa53d8aa0deda9a10f5b4f52f 100644 (file)
@@ -99,11 +99,11 @@ foreach (array('guest','member','admin') as $menu) {
 
        // Now insert our unqiue key for action-what combination
        addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` DROP KEY `action_what`", $menu));
 
        // Now insert our unqiue key for action-what combination
        addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` DROP KEY `action_what`", $menu));
-       addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` ADD UNIQUE `action_what` (`action` , `what`)", $menu));
+       addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` ADD UNIQUE INDEX `action_what` (`action` , `what`)", $menu));
 
        // Now insert our unqiue key for what
        addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` DROP KEY `what`", $menu));
 
        // Now insert our unqiue key for what
        addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` DROP KEY `what`", $menu));
-       addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` ADD UNIQUE `what` (`what`)", $menu));
+       addSql(sprintf("ALTER TABLE `{?_MYSQL_PREFIX?}_%s_menu` ADD UNIQUE INDEX `what` (`what`)", $menu));
 
        // And run all
        runFilterChain('run_sqls');
 
        // And run all
        runFilterChain('run_sqls');
index 31bbf1d420d76955b8ec2768731979be5702bf08..916795cd0fc3cb526672c55f331b0fd574a9df08 100644 (file)
@@ -50,7 +50,7 @@ if (!SQL_HASZERONUMS($result)) {
        SQL_QUERY('UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `level`=`level`+1', __FILE__, __LINE__);
 
        // Add it again
        SQL_QUERY('UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `level`=`level`+1', __FILE__, __LINE__);
 
        // Add it again
-       SQL_ALTER_TABLE('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)', __FILE__, __LINE__);
+       SQL_ALTER_TABLE('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE INDEX `userid_level` (`userid`,`level`)', __FILE__, __LINE__);
 
        // Rebuild cache
        rebuildCache('refsystem', 'refsystem');
 
        // Rebuild cache
        rebuildCache('refsystem', 'refsystem');