]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-holiday.php
- Major change in menu system. You need to rewrite/update your member and guest
[mailer.git] / inc / extensions / ext-holiday.php
index a5937ff22537f92357276e2ce404dfde83a44891..9387596d95468894c636ca2f3aa24939fb588814 100644 (file)
@@ -53,8 +53,8 @@ case "register": // Do stuff when installtion is running (modules.php?module=adm
        // Create database
        $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_holidays";
        $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_user_holidays (
-id BIGINT(20) NOT NULL AUTO_INCREMENT,
-userid BIGINT(20) NOT NULL DEFAULT '0',
+id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+userid BIGINT(20) UNSIGNED NOT NULL DEFAULT '0',
 holiday_start VARCHAR(10) NOT NULL DEFAULT '0',
 holiday_end VARCHAR(10) NOT NULL DEFAULT '0',
 comments LONGBLOB NOT NULL,
@@ -63,7 +63,7 @@ PRIMARY KEY(id)
 ) TYPE=MyISAM";
 
        // Add default values to config
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_max BIGINT(20) NOT NULL DEFAULT '30'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'";
 
        // Add member menu
        $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('main', 'holiday', 'Urlaubsschaltung', '4', 'Y', 'Y')";
@@ -122,7 +122,7 @@ case "update": // Update an extension
 
        case "0.0.6": // SQL queries for v0.0.6
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Seit <A href=\"".SERVER_URL."/patches/340-Gast_Mitgliedsmenue_Deaktivieren.zip\">Patch 340</A> &uuml;berfl&uuml;ssige HTML-Tags entfernt.";
+               $UPDATE_NOTES = "Seit <A href=\"#\">Patch 340</A> &uuml;berfl&uuml;ssige HTML-Tags entfernt.";
                break;
 
        case "0.0.7": // SQL queries for v0.0.7
@@ -158,7 +158,7 @@ case "update": // Update an extension
        case "0.1.3": // SQL queries for v0.1.3
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_active ENUM('Y', 'N') NOT NULL DEFAULT 'N'";
                $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_max_receive WHERE value='0' LIMIT 1";
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_lock BIGINT(20) NOT NULL DEFAULT '".(60*60*24*2)."'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(60*60*24*2)."'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "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!";
@@ -179,7 +179,7 @@ case "update": // Update an extension
                break;
 
        case "0.1.6": // SQL queries for v0.1.6
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_activated BIGINT(20) NOT NULL DEFAULT '0'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD holiday_activated BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Fehlende Tabellenspalte hinzugef&uuml;gt.";
@@ -227,13 +227,6 @@ default: // Do stuff when extension is loaded
        $dummy = LOAD_CONFIG();
        $_CONFIG = merge_array($_CONFIG, $dummy);
        unset($dummy);
-
-       // Do we have a daily-reset-run?
-       if (((isBooleanConstantAndTrue('__DAILY_RESET')) && ($_CONFIG['holiday_mode'] == "RESET")) || ($_CONFIG['holiday_mode'] == "DIRECT"))
-       {
-               // Ok, let's check for finished holidays and unlock those accounts
-               $INC_POOL[] = sprintf("%sinc/reset/reset_holiday.php", PATH);
-       }
        break;
 }