From 01b4a1c465a7decc77384039fbcaf52fd7261e2f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 8 Nov 2010 02:34:52 +0000 Subject: [PATCH] Added activation/deactivation queries for ext-beg and ext-theme --- inc/extensions/ext-beg.php | 2 +- inc/extensions/ext-theme.php | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index d591d04bc8..73010788cb 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -80,7 +80,7 @@ PRIMARY KEY (`id`) case 'activate': // Do stuff when admin activates this extension // SQL commands to run addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='beg' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what` IN ('beg','beg2') LIMIT 2"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='N' WHERE `module`='beg' LIMIT 1"); break; diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index 94cad5d9d6..54df06813f 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -71,12 +71,14 @@ switch (getExtensionMode()) { case 'activate': // Do stuff when admin activates this extension // SQL commands to run - addExtensionSql(''); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `action`='theme' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='theme' OR `what`='theme' LIMIT 2"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - addExtensionSql(''); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `action`='theme' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='theme' OR `what`='theme' LIMIT 2"); break; case 'update': // Update an extension -- 2.39.5