A lot has been rewritten, ext-teams added, ext-forced continued:
[mailer.git] / inc / extensions / ext-mailid.php
index d75c8a7906f688defe78c3becdad243a8f0e3501..09e59108250c2c7d17c898ca51f63ce3e0c43cf9 100644 (file)
  * $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 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Version number
-setThisExtensionVersion('0.3.3');
+setThisExtensionVersion('0.3.4');
 
-// Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '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'));
+// Version history array (add more with , '0.0.1' and so on)
+setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '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'));
 
 switch (getExtensionMode()) {
-       case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+       case 'register': // Do stuff when installation is running
                // SQL commands to run
                addExtensionSql('');
                break;
@@ -187,7 +186,7 @@ switch (getExtensionMode()) {
 
                        case '0.2.5': // SQL queries for v0.2.5
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Den Punkte in der Gesamt-{?POINTS?}-Anzahl in ein Komma umgewandelt.");
+                               setExtensionUpdateNotes("Den Punkt in der Gesamt-{?POINTS?}-Anzahl in ein Komma umgewandelt.");
                                break;
 
                        case '0.2.6': // SQL queries for v0.2.6
@@ -202,7 +201,7 @@ switch (getExtensionMode()) {
 
                        case '0.2.8': // SQL queries for v0.2.8
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Bonus- und Standart-Referal-Id ausblendbar aus Aktiv-Rallye und bekommt kein Aktiv-Guthaben.");
+                               setExtensionUpdateNotes("Bonus- und Standard-Referal-Id ausblendbar aus Aktiv-Rallye und bekommt kein Aktiv-Guthaben.");
                                break;
 
                        case '0.2.9': // SQL queries for v0.2.9
@@ -229,22 +228,30 @@ switch (getExtensionMode()) {
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Variablen-Handling scripteweitgeändert.");
                                break;
-               }
+
+                       case '0.3.4': // SQL queries for v0.3.4
+                               // This update depends on latest sql_patches version
+                               addExtensionDependency('sql_patches');
+
+                               // Insert data in points_data
+                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('mailid_payback','points','LOCKED','DIRECT')");
+                               break;
+               } // END - switch
                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.
+       case 'test': // For testing purposes
                break;
 
        case 'init': // Do stuff when extension is initialized
                break;
 
        default: // Unknown extension mode
-               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode()));
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
                break;
-}
+} // END - switch
 
 // [EOF]
 ?>