]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-holiday.php
Introduced wrapper function addCreateTableSql(), fixed parameter order:
[mailer.git] / inc / extensions / ext-holiday.php
index 6e025d459992f02e4a5600c977a8939d1f4bf1c0..d327ac16924b35595b7a2503ec4218b819256460 100644 (file)
@@ -50,7 +50,7 @@ switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // Create database
                addDropTableSql('user_holidays');
-               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_holidays` (
+               addCreateTableSql('user_holidays', "(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `holiday_start` VARCHAR(10) NOT NULL DEFAULT 0,
@@ -61,7 +61,7 @@ PRIMARY KEY (`id`)
 ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'User holiday data'");
 
                // Add default values to config
-               addConfigAddSql("holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
+               addConfigAddSql('holiday_max', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'");
 
                // Add member menu
                addMemberMenuSql('main','holiday','Urlaubsschaltung','Y','Y',4);
@@ -156,7 +156,7 @@ PRIMARY KEY (`id`)
                        case '0.1.3': // SQL queries for v0.1.3
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'");
                                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value=0 LIMIT 1");
-                               addConfigAddSql("holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getOneDay()*2)."'");
+                               addConfigAddSql('holiday_lock', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getOneDay()*2)."'");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf <strong>Urlaub</strong> geschaltet. Lassen Sie sich nicht davon verwirren, dass sie &quot;freigegeben&quot; sind!");