]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-admins.php
New wrapper functions introduced, some one-line parameter monsters killed:
[mailer.git] / inc / extensions / ext-admins.php
index 510ebf7dbffee8e8321cdbded5a6d013f16268de..8fb79f24aedeb6018802b1d945daccc95de431af 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -60,8 +60,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`');
+               addDropTableSql('admins_acls');
+               addDropTableSql('admins_mails');
                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP `default_acl`");
 
                // Remove filters
@@ -102,7 +102,7 @@ switch (getExtensionMode()) {
 
                                // But allow current admin everything (THIS SHALL BE YOU!)
                                addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admins` SET `default_acl`='allow' WHERE `id`=".bigintval(getCurrentAdminId())." LIMIT 1");
-                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_acls`');
+                               addDropTableSql('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,
@@ -122,7 +122,7 @@ PRIMARY KEY (`id`)
                                break;
 
                        case '0.4.0': // SQL queries for v0.4.0
-                               addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_admins_mails`');
+                               addDropTableSql('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,
@@ -348,7 +348,7 @@ PRIMARY KEY (`id`)
        case 'modify': // When the extension got modified
                break;
 
-       case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+       case 'test': // For testing purposes
                break;
 
        case 'init': // Do stuff when extension is initialized