X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-holiday.php;h=8ef1bff7612a5f1e54c6b5eb9b3f2514876a5a9c;hb=11692c9f43d52ad1dfe9498cd2f3aea70a3ebf78;hp=81aa1376bf1e9598a20bdba119ffab41f3335b56;hpb=2acfc49984a0f9bb3adaf6366351d6ce604dcacd;p=mailer.git diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index 81aa1376bf..8ef1bff761 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -14,8 +14,6 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009, 2010 by Mailer Developer Team * @@ -40,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Version number setThisExtensionVersion('0.2.1'); @@ -51,7 +49,7 @@ setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0 switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Create database - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_holidays` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -80,11 +78,11 @@ PRIMARY KEY (id) case 'remove': // Do stuff when removing extension // SQL commands to run - addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_holidays`'); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='holiday' LIMIT 1"); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='holiday' LIMIT 4"); - addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value=0 LIMIT 1"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (value, comment) VALUES (0,'Urlaub')"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `value`=0 LIMIT 1"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_max_receive` (`value`, `comment`) VALUES (0,'Urlaub')"); break; case 'activate': // Do stuff when admin activates this extension @@ -191,12 +189,12 @@ PRIMARY KEY (id) break; case '0.1.8': // SQL queries for v0.1.8 - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_holiday')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_holiday')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_holiday')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('member', '', 'list_holiday')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('member', '', 'del_holiday')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (`la_id`, `la_action`, `la_what`) VALUES ('config', '', 'config_holiday')"); // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin - addExtensionUpdateDependency('sql_patches'); + addExtensionDependency('sql_patches'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Erweiterung in's neue Menüsystem integriert."); @@ -210,7 +208,7 @@ PRIMARY KEY (id) break; case '0.2.0': // SQL queries for v0.2.0 - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET title = 'Urlaubsmanagement' WHERE action = 'holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Urlaubsmanagement' WHERE `action`='holiday' AND (`what`='' OR `what` IS NULL) LIMIT 1"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); @@ -220,7 +218,7 @@ PRIMARY KEY (id) // Update notes (these will be set as task text!) setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - } + } // END - switch break; case 'modify': // When the extension got modified @@ -235,7 +233,7 @@ PRIMARY KEY (id) default: // Unknown extension mode logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; -} +} // END - switch // [EOF] ?>