Marked some unfinished extensions as 'work-in-progress'
[mailer.git] / inc / extensions / ext-support.php
index 958a7d8ae39cff3eede3559dd16aef71bb72f04d..2d30c56086c039d4cb9cc3e004bca76702240125 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 04/29/2004 *
- * ================                             Last change: 05/02/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 04/29/2004 *
+ * ===================                          Last change: 05/02/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : ext-support.php                                  *
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 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.1.2');
+setThisExtensionVersion('0.1.3');
 
 // 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'));
+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'));
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
@@ -55,17 +56,17 @@ switch (getExtensionMode()) {
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
-               addExtensionSql('');
+               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='support' LIMIT 1");
                break;
 
        case 'activate': // Do stuff when admin activates this extension
                // SQL commands to run
-               addExtensionSql('');
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='support' LIMIT 1");
                break;
 
        case 'deactivate': // Do stuff when admin deactivates this extension
                // SQL commands to run
-               addExtensionSql('');
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='support' LIMIT 1");
                break;
 
        case 'update': // Update an extension
@@ -102,7 +103,7 @@ switch (getExtensionMode()) {
 
                        case '0.0.8': // SQL queries for v0.0.8
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
                                break;
 
                        case '0.0.9': // SQL queries for v0.0.9
@@ -124,6 +125,14 @@ switch (getExtensionMode()) {
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
                                break;
+
+                       case '0.1.3': // SQL queries for v0.1.3
+                               // Member menu
+                               addMemberMenuSql('main','support','Support ','Y','N',10);
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Men&uuml; in Erweiterung verlagert.");
+                               break;
                } // END - switch
                break;
 
@@ -137,7 +146,7 @@ switch (getExtensionMode()) {
                break;
 
        default: // Unknown extension mode
-               DEBUG_LOG(__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