]> git.mxchange.org Git - mailer.git/commitdiff
SQLs improved, verbose listing for SQLs fixed
authorRoland Häder <roland@mxchange.org>
Sat, 31 Oct 2009 18:12:14 +0000 (18:12 +0000)
committerRoland Häder <roland@mxchange.org>
Sat, 31 Oct 2009 18:12:14 +0000 (18:12 +0000)
inc/extensions-functions.php
inc/extensions/ext-autopurge.php
inc/extensions/ext-beg.php
inc/extensions/ext-bonus.php
inc/extensions/ext-network.php
inc/extensions/ext-nickname.php
inc/extensions/ext-refback.php
inc/extensions/ext-sponsor.php
inc/modules/admin/overview-inc.php

index dfa79d8fb9c739f19abcb241befba9d73297b13d..990c04ce79cd15c7387c2c5ba1cb1310db39d433 100644 (file)
@@ -676,9 +676,9 @@ function addExtensionVerboseSqlTable ($title = '', $dashed = '', $switch = false
                $SW = 2;
 
                // Get all SQLs
-               foreach (getExtensionSqls() as $idx => $sqls) {
+               foreach (getExtensionSqls() as $sqls) {
                        // New array format is recursive
-                       foreach ($sqls as $sql) {
+                       foreach ($sqls as $idx => $sql) {
                                // Trim out spaces
                                $sql = trim($sql);
 
index 50fbd19c09c9cbdf1368a688ebcf162b26e3b4b5..c2514e9397f1ca97dd8062ab801e39cfd73eb289 100644 (file)
@@ -65,7 +65,7 @@ switch (getExtensionMode()) {
                if (isExtensionActive('bonus')) {
                        addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'");
                }
-               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE what IN('config_autopurge','list_autopurge')");
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_autopurge','list_autopurge')");
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP ap_notified");
                break;
 
index bbaf8b2a5d3d2c92ad9dab35584ea88dbc8b1b0b..389917ad3539575ad748e3547a11a12e1dcd0529 100644 (file)
@@ -86,7 +86,7 @@ PRIMARY KEY (id)
        case 'deactivate': // Do stuff when admin deactivates this extension
                // SQL commands to run
                addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='beg' LIMIT 1");
-               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE what IN('beg','beg2') LIMIT 2");
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what` IN('beg','beg2') LIMIT 2");
                addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='Y' WHERE `module`='beg' LIMIT 1");
                break;
 
index f8650b319d2ab4a1fdcd88f21536534d55fe9215..fe73b153477048b579407dc3d2ff5b3e7ec539f7 100644 (file)
@@ -80,11 +80,9 @@ PRIMARY KEY  (id)
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               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?}_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'");
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='bonus'");
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'");
-               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` DROP bonus_id");
                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`");
index 7a3f7ba086ebc4345f99a5c1a92b55d9d9c2b103..5bb4e739c93b1c9f9bb5602a9ff688605672cd00 100644 (file)
@@ -39,7 +39,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Version number
 setThisExtensionVersion('0.0');
@@ -50,10 +50,20 @@ setExtensionVersionHistory(array('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?}_network_config`");
+               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_network_config` (
+`network_id` BIGINT(20) NOT NULL AUTO_INCREMENT,
+`network_name` VARCHAR(255) NOT NULL DEFAULT '',
+`network_title` VARCHAR(255) NOT NULL DEFAULT '',
+`network_reflink` VARCHAR(255) NOT NULL DEFAULT '',
+UNIQUE (`network_name`),
+PRIMARY KEY (`network_id`)
+) TYPE={?_TABLE_TYPE?} COMMENT='Network data'");
                break;
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
+               addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_network_config`");
                break;
 
        case 'activate': // Do stuff when admin activates this extension
index 011811443156f96ef83d90e437547643b5da163e..8ca9f150f25a2ed7fae9a18bc335db859603fe0d 100644 (file)
@@ -58,7 +58,7 @@ switch (getExtensionMode()) {
        case 'remove': // Do stuff when removing extension
                // 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("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN ('config_nickname','list_nickname')");
                addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_nickname_history`");
                break;
 
index cd653a64986221f50e49a876a0dcf54ee5bb62c0..22e30a9edb9822a2ec2bcca8d1bf06b77bec76d4 100644 (file)
@@ -74,7 +74,7 @@ KEY (`refid`)
                // SQL commands to run
                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("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_refback','list_refback')");
                addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET level=level-1");
                break;
 
index 8741bf814614219a1f814b8174cb354278e8924e..a5d137761a5016d9f0be101353ef804f918540e8 100644 (file)
@@ -384,7 +384,7 @@ PRIMARY KEY (`id`)
                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?}_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'");
                break;
index 2a09cb95a0b68f95b4cbe16164ef3137e2f6c0fb..ebd9c8377bbe5a37d8a274aa9d89f35d99b5ab09 100644 (file)
@@ -48,7 +48,7 @@ function outputStandardOverview (&$result_tasks) {
                array(getCurrentAdminId()), __FILE__, __LINE__);
 
        // We currently don't want to install an extension so let's find out if we need...
-       setExtensionMode('register');
+       setExtensionMode('test');
        $jobsDone = true;
 
        // Open the extension directory