]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-mediadata.php
A lot rewrites from double-quote to single-quote, some fixes for extension handling...
[mailer.git] / inc / extensions / ext-mediadata.php
index 10f60565a470e1e061a0dd065b5bcd0e7542aa74..8856c68211757bc88fc87c0c86897d8b045b20ba 100644 (file)
@@ -43,54 +43,54 @@ if (!defined('__SECURITY')) {
 }
 
 // Version number
-EXT_SET_VERSION("0.0.9");
+EXT_SET_VERSION('0.0.9');
 
-// Version history array (add more with , "0.1" and so on)
-EXT_SET_VER_HISTORY(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"));
+// Version history array (add more with , '0.1.0' and so on)
+EXT_SET_VER_HISTORY(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'));
 
 switch ($EXT_LOAD_MODE)
 {
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
+case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
        // SQL commands to run
        ADD_EXT_SQL("");
        break;
 
-case "remove": // Do stuff when removing extension
+case 'remove': // Do stuff when removing extension
        // SQL commands to run
        ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
        ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_mediadata'");
        ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='mediadata'");
        break;
 
-case "activate": // Do stuff when admin activates this extension
+case 'activate': // Do stuff when admin activates this extension
        // SQL commands to run
        ADD_EXT_SQL("");
        break;
 
-case "deactivate": // Do stuff when admin deactivates this extension
+case 'deactivate': // Do stuff when admin deactivates this extension
        // SQL commands to run
        ADD_EXT_SQL("");
        break;
 
-case "update": // Update an extension
+case 'update': // Update an extension
        switch ($EXT_VER)
        {
-       case "0.0.1": // SQL queries for v0.0.1
+       case '0.0.1': // SQL queries for v0.0.1
                // Update notes (these will be set as task text!)
                EXT_SET_UPDATE_NOTES("Berechnung der Gesamt-{!POINTS!} korregiert.");
                break;
 
-       case "0.0.2": // SQL queries for v0.0.2
+       case '0.0.2': // SQL queries for v0.0.2
                // Update notes (these will be set as task text!)
                EXT_SET_UPDATE_NOTES("Daten des Scriptes mit eingebunden.");
                break;
 
-       case "0.0.3": // SQL queries for v0.0.3
+       case '0.0.3': // SQL queries for v0.0.3
                // Update notes (these will be set as task text!)
                EXT_SET_UPDATE_NOTES("Sicherheitsupdate: SQL-Anweisungen geschützt.");
                break;
 
-       case "0.0.4": // SQL queries for v0.0.4
+       case '0.0.4': // SQL queries for v0.0.4
                // SQL commands to run
                ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_mediadata`");
                ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_mediadata` (
@@ -103,17 +103,17 @@ PRIMARY KEY(media_key)
                EXT_SET_UPDATE_NOTES("Teile der Mediendaten werden in seperater Tabelle gesichert. Bitte beachten Sie, dass dieses Update nur Daten des <strong>aktuellen</strong> Zustandes ber&uuml;cksichtigen kann und <strong>nicht</strong> bereits gel&ouml;schter Mitglieder.");
                break;
 
-       case "0.0.5": // SQL queries for v0.0.5
+       case '0.0.5': // SQL queries for v0.0.5
                // Update notes (these will be set as task text!)
                EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
                break;
 
-       case "0.0.6": // SQL queries for v0.0.6
+       case '0.0.6': // SQL queries for v0.0.6
                // Update notes (these will be set as task text!)
                EXT_SET_UPDATE_NOTES("Mediendaten mussten komplett regeneriert werden.");
                break;
 
-       case "0.0.7": // SQL queries for v0.0.7
+       case '0.0.7': // SQL queries for v0.0.7
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_start BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD mt_stage BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'");
                ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10)");
@@ -123,12 +123,12 @@ PRIMARY KEY(media_key)
 Bitte stellen Sie diesen derzeit manuell unter <a href=\"{!URL!}/modules.php?module=admin&amp;what=config_mediadata\">Einstellungen-Medidata</a> selber einstellen.");
                break;
 
-       case "0.0.8": // SQL queries for v0.0.8
+       case '0.0.8': // SQL queries for v0.0.8
                // Update notes (these will be set as task text!)
                EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
                break;
 
-       case "0.0.9": // SQL queries for v0.0.9
+       case '0.0.9': // SQL queries for v0.0.9
                ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','mediadata','Mediendaten',3,'Y','N')");
 
                // Update notes (these will be set as task text!)
@@ -137,10 +137,10 @@ Bitte stellen Sie diesen derzeit manuell unter <a href=\"{!URL!}/modules.php?mod
        }
        break;
 
-case "modify": // When the extension got modified
+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. For details see file inc/modules/admin/what-extensions.php, arround line 305.
        break;
 
 default: // Do stuff when extension is loaded
@@ -148,7 +148,7 @@ default: // Do stuff when extension is loaded
 }
 
 if ((isset($dry_run)) && (isset($EXT_LOAD_MODE))) {
-       if ((!$dry_run) && ($EXT_LOAD_MODE == "update") && ($EXT_VER == "0.0.4")) {
+       if ((!$dry_run) && ($EXT_LOAD_MODE == 'update') && ($EXT_VER == '0.0.4')) {
                // Add auto-check file
                ADD_INC_TO_POOL(sprintf("%sinc/gen_mediadata.php", constant('PATH')));
        } // END - if