X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-order.php;h=5011922d7c833f6aa8e42d9cdb5068417fa74077;hp=bed01eaf1478a9c0403740e2c82f77f9af3b8668;hb=c5a4b89497cf1430b387b43e0c7808ef6dac0acd;hpb=4db052cce49f60b6d9cc0f1c06b95cdd99f904ad diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index bed01eaf14..5011922d7c 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -32,7 +32,7 @@ ************************************************************************/ // Some security stuff... -if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF']))) { +if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } @@ -48,7 +48,7 @@ $EXT_VER_HISTORY = array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.3", "0.1.4", "0.1. switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installtion 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 $SQLs[] = ""; break; @@ -67,15 +67,15 @@ case "activate": // Do stuff when admin activates this extension case "deactivate": // Do stuff when admin deactivates this extension // SQL commands to run $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET visible='N', locked='Y' WHERE what='order' LIMIT 1"; - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET locked='Y' WHERE module='order' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_mod_reg SET visible='N', locked='Y' WHERE module='order' LIMIT 1"; break; case "update": // Update an extension switch ($EXT_VER) { case "0.1": // SQL queries for v0.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_max_full ENUM('ORDER', 'MAX') NOT NULL DEFAULT 'MAX'"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('setup', 'config_order', 'Mailbuchungsseite', '7', 'Einstellungen am Mailbuchungsformular.')"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig."; @@ -83,8 +83,8 @@ case "update": // Update an extension case "0.1.1": // SQL queries for v0.1.1 $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_order' LIMIT 1"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('setup', 'config_order', 'Mailbuchungsseite', '7', 'Einstellungen am Mailbuchungsformular.')"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, sort, descr) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Maximale Mailbuchung vervollständigt (Admin-Bereich und im Buchungsformular selber)."; @@ -141,7 +141,7 @@ case "update": // Update an extension break; case "0.2.3": // SQL queries for v0.2.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger"; @@ -194,7 +194,7 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us case "0.3.1": // SQL queries for v0.3.1 $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_mode ENUM('ASC', 'DESC') NOT NULL DEFAULT 'DESC'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Beworbene URL wird nun getestet."; @@ -271,8 +271,8 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us break; case "0.4.6": // SQL queries for v0.4.6 - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('order', NULL, 'Mailbuchungen', 3, 'Y', 'N')"; - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort, visible, locked) VALUES ('order', 'order2', 'Framekiller-Mails', 2, 'Y', 'N')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order',NULL,'Mailbuchungen',3,'Y','N')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('order','order2','Framekiller-Mails',2,'Y','N')"; $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='order', sort='1', title='Klick-Mails' WHERE what='order' LIMIT 1"; // Update notes (these will be set as task text!) @@ -285,17 +285,17 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us break; case "0.4.8": // SQL queries for v0.4.8 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailbuchung' WHERE action='setup' AND what='config_order' LIMIT 1"; + $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title='Mailbuchung' WHERE what='config_order' LIMIT 1"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben."; break; case "0.4.9": // SQL queries for v0.4.9 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD repay_deleted_mails ENUM('REPAY', 'JACKPOT', 'SHRED') NOT NULL DEFAULT 'REPAY'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Bei Löschung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen ".POINTS." wieder gutgeschrieben werden sollen oder in den Jackpot landen."; + $UPDATE_NOTES = "Bei Löschung von Mailbuchungen kann nun global entschieden werden (Einstellungen also), ob die verbliebenen {!POINTS!} wieder gutgeschrieben werden sollen oder in den Jackpot landen."; break; } @@ -311,11 +311,5 @@ default: // Do stuff when extension is loaded break; } -// Language file prefix -$EXT_LANG_PREFIX = "order"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = "N"; - // ?>