Listing of notifications added
[mailer.git] / inc / extensions / ext-bonus.php
index 9e22079fe438a4d367168aa9e0ade608f6ca201d..b1270ac32356fd80bbfe316b658a258c6b511f43 100644 (file)
@@ -38,13 +38,13 @@ if (!defined('__SECURITY')) {
 }
 
 // Version of this extension
-$EXT_VERSION = "0.8.6";
+$EXT_VERSION = "0.8.7";
 
 // 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.6", "0.2.0", "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", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.6.4", "0.6.5", "0.6.6", "0.6.7", "0.6.8", "0.6.9", "0.7.0", "0.7.1", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.7.7", "0.7.8", "0.7.9", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.8.6");
+$EXT_VER_HISTORY = array("0.0", "0.1.6", "0.2.0", "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", "0.4.0", "0.4.1", "0.4.2", "0.4.3", "0.4.4", "0.4.5", "0.4.6", "0.4.7", "0.4.8", "0.4.9", "0.5.0", "0.5.1", "0.5.2", "0.5.3", "0.5.4", "0.5.5", "0.5.6", "0.5.7", "0.5.8", "0.5.9", "0.6.0", "0.6.1", "0.6.2", "0.6.3", "0.6.4", "0.6.5", "0.6.6", "0.6.7", "0.6.8", "0.6.9", "0.7.0", "0.7.1", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.7.7", "0.7.8", "0.7.9", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.8.6", "0.8.7");
 
 switch ($EXT_LOAD_MODE)
 {
@@ -80,7 +80,7 @@ PRIMARY KEY  (id)
 
 case "remove": // Do stuff when removing extension
        // SQL commands to run
-       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus') LIMIT 4";
+       $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what IN ('bonus','config_bonus','send_bonus','list_bonus','list_notifications') LIMIT 5";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='bonus' LIMIT 1";
        $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='bonus' LIMIT 1";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_links MODIFY link_type ENUM('NORMAL') NOT NULL DEFAULT 'NORMAL'";
@@ -526,29 +526,31 @@ WHERE last_online < ".$mark." ORDER BY userid";
        case "0.8.6": // SQL queries for v0.8.6
                $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert.";
                break;
+
+       case "0.8.7": // SQL queries for v0.8.7
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('email','list_notifications','Benachrichtigungen','Listet alle an die Mitglieder ausgesandten Benachrichtigungen auf.', 10)";
+
+               // Update notes
+               $UPDATE_NOTES = "Benachrichtigungsmails f&uuml;r z.B. Bettel- oder Aktiv-Rallye werden nun angezeigt.";
+               break;
        }
        break;
 
 default: // Do stuff when extension is loaded
-       if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1))
-       {
+       if (isBooleanConstantAndTrue('__DAILY_RESET') && (!DEBUG_MODE) && ($CSS != 1)) {
                // Daily reset was run so let's check if active rallye is activated
-               if ($_CONFIG['bonus_active'] == "Y")
-               {
+               if ($_CONFIG['bonus_active'] == "Y") {
                        // Run active rallye
                        if($_CONFIG['bonus_stats'] > 0) $INC_POOL[] = sprintf("%sinc/stats_bonus.php", PATH);
                        $INC_POOL[] = sprintf("%sinc/monthly/monthly_bonus.php", PATH);
-               }
-                else
-               {
+               } else {
                        // Reset points
                        $INC_POOL[] = sprintf("%sinc/reset/reset_bonus.php", PATH);
                }
        }
 
        // Check for bonus rallye is active and send mails out
-       if (($_CONFIG['bonus_active'] == "Y") && ($_CONFIG['bonus_new_mem_notify'] == "Y"))
-       {
+       if (($_CONFIG['bonus_active'] == "Y") && ($_CONFIG['bonus_new_mem_notify'] == "Y")) {
                // Include file for sending out mails
                $INC_POOL[] = sprintf("%sinc/mails/bonus_mails.php", PATH);
        }