]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-wernis.php
A lot rewrites from double-quote to single-quote, some fixes for extension handling...
[mailer.git] / inc / extensions / ext-wernis.php
index a87848c046cdc962a27ef3f595616e18e3fc8e9e..7fdd4b9ce82f3f0b701df4cf5d5b87662cdad579 100644 (file)
@@ -38,14 +38,14 @@ if (!defined('__SECURITY')) {
 }
 
 // Version of this extension
-EXT_SET_VERSION("0.0.4");
+EXT_SET_VERSION('0.0.4');
 
-// 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"));
+// 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'));
 
 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("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
        ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_wernis` (
@@ -83,7 +83,7 @@ PRIMARY KEY(id)
        ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','wernis_portal','WDS66-News','N','N', 7)");
        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!}_user_wernis`");
        ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='wernis'");
@@ -91,22 +91,22 @@ case "remove": // Do stuff when removing extension
        ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `what`='wernis_portal'");
        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("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis_portal' LIMIT 1");
        ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='wernis' LIMIT 1");
        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("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis_portal' LIMIT 1");
        ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='wernis' LIMIT 1");
        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
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_factor FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
@@ -120,21 +120,21 @@ case "update": // Update an extension
                EXT_SET_UPDATE_NOTES("Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {!POINTS!}->Wernis versehen. Prozentualer Abzug als "Betreibergebühr hinzugefügt, was z.B. für Wechselstuben interessant ist.");
                break;
 
-       case "0.0.2": // SQL queries for v0.0.2
+       case '0.0.2': // SQL queries for v0.0.2
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_pass_md5 VARCHAR(32) NOT NULL DEFAULT ''");
 
                // Update notes (these will be set as task text!)
                EXT_SET_UPDATE_NOTES("Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {!MT_WORD!} als MD5-Hash gespeichert werden.");
                break;
 
-       case "0.0.3": // SQL queries for v0.0.3
+       case '0.0.3': // SQL queries for v0.0.3
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
 
                // Update notes (these will be set as task text!)
                EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf BIGINT(5) geändert.");
                break;
 
-       case "0.0.4": // SQL queries for v0.0.4
+       case '0.0.4': // SQL queries for v0.0.4
                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
 
                // Update notes (these will be set as task text!)
@@ -143,10 +143,10 @@ case "update": // Update an extension
        }
        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