From: Roland Häder Date: Mon, 1 Nov 2010 22:31:55 +0000 (+0000) Subject: Dependencies added (required) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=09ec83fe187b93d34e797a58da1de2c25fac0b0b;p=mailer.git Dependencies added (required) --- diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index e88c037b25..a6dc4dc643 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -51,19 +51,18 @@ setExtensionAlwaysActive('Y'); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + // Add dependency to 'bonus' + addExtensionDependency('bonus'); + // SQL commands to run addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'"); - if (isExtensionActive('bonus')) { - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'"); - } + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'"); break; case 'remove': // Do stuff when removing extension // SQL commands to run addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'"); - if (isExtensionActive('bonus')) { - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'"); - } + 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("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP ap_notified"); break; @@ -81,6 +80,10 @@ switch (getExtensionMode()) { case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.1.0': // SQL queries for v0.1 + // Add dependency to 'user' + addExtensionDependency('user'); + + // SQL queries addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `autopurge_inactive` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `autopurge_unconfirmed` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_inactive_since` BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'"); diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 9aa53db213..cf61519ac6 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -48,6 +48,9 @@ setExtensionVersionHistory(array('0.0', '0.1.6', '0.2.0', '0.2.1', '0.2.2', '0.2 switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + // Add dependency to 'user' + addExtensionDependency('user'); + // 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önnen hier immer senden.', 5); addMemberMenuSql('main','bonus','Bonuspunkte','N','Y',7);