Database columns changed in birthday, wernis news feed added
[mailer.git] / inc / extensions / ext-birthday.php
index 3e8d6d8a9648decfcf85038a0b216366baa6f794..661e55e8b3e18a396cb3d0ea111d483aeeedd788 100644 (file)
@@ -39,13 +39,13 @@ if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))
 }
 
 // Version number
-$EXT_VERSION = "0.3.8";
+$EXT_VERSION = "0.3.9";
 
 // Auto-set extension version
 if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
 
 // Version history array (add more with , "0.1" and so on)
-$EXT_VER_HISTORY = array("0.0", "0.1", "0.2", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8");
+$EXT_VER_HISTORY = array("0.0", "0.1", "0.2", "0.2.1", "0.2.2", "0.2.3", "0.2.4", "0.2.5", "0.2.6", "0.2.7", "0.2.8", "0.2.9", "0.3.0", "0.3.1", "0.3.2", "0.3.3", "0.3.4", "0.3.5", "0.3.6", "0.3.7", "0.3.8", "0.3.9");
 
 switch ($EXT_LOAD_MODE)
 {
@@ -179,6 +179,15 @@ PRIMARY KEY(id)
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Hash-Erstellung von <STRONG>md5()</STRONG> auf bessere Funktion <STRONG>generateHash()</STRONG> umgestellt.";
                break;
+
+       case "0.3.9": // SQL queries for v0.3.8
+               $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE `birth_day` `birth_day` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
+CHANGE `birth_month` `birth_month` SMALLINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT '01',
+CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT '1970'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Datenbankspalten umgestellt auf SMALLINT() UNSIGNED ZEROFILL.";
+               break;
        }
        break;
 
@@ -191,8 +200,7 @@ default: // Do stuff when extension is loaded
        // Save some RAM...
        unset($dummy);
 
-       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && ($_CONFIG['birthday_points'] > 0))
-       {
+       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && ($_CONFIG['birthday_points'] > 0)) {
                // Daily reset was run and we shall pay points so we start checking for members who
                // has a birthday for today
                $INC_POOL[] = sprintf("%sinc/mails/birthday_mails.php", PATH);