]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-birthday.php
Removed all LIMIT x statements from extension removal queries, several minor fixes
[mailer.git] / inc / extensions / ext-birthday.php
index 8440fbe9c5cc5f4dd817d3d837b254d545622873..ffbfc09f501eebb65ec9d6b1dbea3e85350fc830 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Versendet Geburtstagsmails an die Mitglieder     *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision::                                                        $ *
+ * $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 - 2008 by Roland Haeder                           *
  * For more information visit: http://www.mxchange.org                  *
@@ -54,7 +59,7 @@ case "remove": // Do stuff when removing extension
        // SQL commands to run
        ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP birthday_sent");
        ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_birthday`");
-       ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday' LIMIT 1");
+       ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_birthday'");
        break;
 
 case "activate": // Do stuff when admin activates this extension
@@ -85,7 +90,7 @@ points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 chk_value VARCHAR(255) NOT NULL DEFAULT '',
 KEY(userid),
 PRIMARY KEY(id)
-) Type=MyISAM");
+) Type={!_TABLE_TYPE!}");
                ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_birthday','Geburtstagsmails','Stellen Sie hier ein, ob die Mitglieder {!POINTS!} (nicht automatisch) gutgeschrieben kommen sollen oder nicht.', 9)");
 
                // Update notes (these will be set as task text!)
@@ -186,11 +191,14 @@ CHANGE `birth_year` `birth_year` SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT
        }
        break;
 
+case "modify": // When the extension got modified
+       break;
+
 case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
        break;
 
 default: // Do stuff when extension is loaded
-       if ((isBooleanConstantAndTrue('__DAILY_RESET')) && (getConfig('birthday_points') > 0)) {
+       if ((isResetModeEnabled()) && (getConfig('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", constant('PATH'));