From 86577a1e6d69fb5246d3b7374bf88b242263de64 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 22 Nov 2009 09:11:58 +0000 Subject: [PATCH] Menu moved to extension --- inc/extensions/ext-support.php | 20 ++++++++++++++------ install/menu-de.sql | 1 - install/menu-en.sql | 1 - 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/inc/extensions/ext-support.php b/inc/extensions/ext-support.php index ba7ba5f29d..ce051f48f9 100644 --- a/inc/extensions/ext-support.php +++ b/inc/extensions/ext-support.php @@ -39,13 +39,13 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Version number -setThisExtensionVersion('0.1.2'); +setThisExtensionVersion('0.1.3'); // Version history array (add more with , '0.1.0' and so on) -setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2')); +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) @@ -55,17 +55,17 @@ switch (getExtensionMode()) { case 'remove': // Do stuff when removing extension // SQL commands to run - addExtensionSql(''); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='support' LIMIT 1"); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - addExtensionSql(''); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='support' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - addExtensionSql(''); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='support' LIMIT 1"); break; case 'update': // Update an extension @@ -124,6 +124,14 @@ switch (getExtensionMode()) { // Update notes (these will be set as task text!) setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; + + case '0.1.3': // SQL queries for v0.1.3 + // Member menu + addMemberMenu('main','support','Support ','Y','N',10); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Menü in Erweiterung verlagert."); + break; } // END - switch break; diff --git a/install/menu-de.sql b/install/menu-de.sql index e911e5e697..b81286150d 100644 --- a/install/menu-de.sql +++ b/install/menu-de.sql @@ -70,7 +70,6 @@ INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`vis INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N'); INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbestätigte Emails',5,'Y','N'); INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9); -INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10); INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000); INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (1,10,2.000,'Klick-Mail 10 Sek.',1.000); diff --git a/install/menu-en.sql b/install/menu-en.sql index e911e5e697..b81286150d 100644 --- a/install/menu-en.sql +++ b/install/menu-en.sql @@ -70,7 +70,6 @@ INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`vis INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflinks','Referal-Links',6,'Y','N'); INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','unconfirmed','Unbestätigte Emails',5,'Y','N'); INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','stats','Statistiken', 'Y','N',9); -INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','support','Support ','Y','N',10); INSERT INTO `{?_MYSQL_PREFIX?}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('logout','guest','Zum Gastmenü','Y','N',1000); INSERT INTO `{?_MYSQL_PREFIX?}_payments` VALUES (1,10,2.000,'Klick-Mail 10 Sek.',1.000); -- 2.39.5