From 73e9d78e610057f6c6d311328b3ad438ad017791 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 25 Jun 2011 21:58:26 +0000 Subject: [PATCH] Wrapper function introduced, double-quotes converted to single: - Wrapper function createConfigurationTimeSelections() introduced - A lot more double-quotes converted to single (speeds up things) - TODOs.txt updated --- DOCS/TODOs.txt | 12 ++--- inc/extensions/ext-active.php | 2 +- inc/extensions/ext-autopurge.php | 14 +++--- inc/extensions/ext-beg.php | 34 +++++++------- inc/extensions/ext-birthday.php | 2 +- inc/extensions/ext-bonus.php | 32 ++++++------- inc/extensions/ext-booking.php | 4 +- inc/extensions/ext-cache.php | 4 +- inc/extensions/ext-coupon.php | 12 +++-- inc/extensions/ext-debug.php | 16 +++---- inc/extensions/ext-doubler.php | 36 +++++++-------- inc/extensions/ext-holiday.php | 18 ++++---- inc/extensions/ext-mailid.php | 2 +- inc/extensions/ext-mediadata.php | 4 +- inc/extensions/ext-newsletter.php | 8 ++-- inc/extensions/ext-nickname.php | 2 +- inc/extensions/ext-optimize.php | 2 +- inc/extensions/ext-order.php | 2 +- inc/extensions/ext-other.php | 8 ++-- inc/extensions/ext-payout.php | 4 +- inc/extensions/ext-primera.php | 4 +- inc/extensions/ext-refback.php | 4 +- inc/extensions/ext-sponsor.php | 4 +- inc/extensions/ext-sql_patches.php | 54 +++++++++++----------- inc/extensions/ext-top10.php | 2 +- inc/extensions/ext-transfer.php | 10 ++-- inc/extensions/ext-user.php | 8 ++-- inc/extensions/ext-wernis.php | 20 ++++---- inc/extensions/ext-yoomedia.php | 18 ++++---- inc/language/de.php | 2 +- inc/modules/admin/what-config_bonus.php | 6 +-- inc/modules/admin/what-config_doubler.php | 2 +- inc/modules/admin/what-config_holiday.php | 4 +- inc/modules/admin/what-config_home.php | 6 ++- inc/modules/admin/what-config_surfbar.php | 14 +++--- inc/modules/admin/what-config_transfer.php | 4 +- inc/template-functions.php | 1 + inc/wrapper-functions.php | 9 ++++ 38 files changed, 203 insertions(+), 187 deletions(-) diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 5b0ff8573f..3fca4825ed 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -191,12 +191,12 @@ ./inc/mysql-manager.php:368: // @TODO Try to rewrite this to one or more functions ./inc/mysql-manager.php:44:// @TODO Can we cache this? ./inc/revision-functions.php:169:// @TODO This function does also set and get in 'cache_array' -./inc/template-functions.php:1047: // @TODO Deprecate this thing -./inc/template-functions.php:1058: // @TODO Deprecate this thing -./inc/template-functions.php:1145: // @TODO This can be easily moved out after the merge from EL branch to this is complete -./inc/template-functions.php:1178: // @TODO Add a little more infos here -./inc/template-functions.php:1489:// @TODO Lame description for this function -./inc/template-functions.php:1511: // @TODO Move this in a filter +./inc/template-functions.php:1048: // @TODO Deprecate this thing +./inc/template-functions.php:1059: // @TODO Deprecate this thing +./inc/template-functions.php:1146: // @TODO This can be easily moved out after the merge from EL branch to this is complete +./inc/template-functions.php:1179: // @TODO Add a little more infos here +./inc/template-functions.php:1490:// @TODO Lame description for this function +./inc/template-functions.php:1512: // @TODO Move this in a filter ./inc/template-functions.php:189: * @TODO On some pages this is buggy ./inc/template-functions.php:265: // @TODO Remove this sanity-check if all is fine ./inc/template-functions.php:578:// @TODO $simple/$constants are deprecated diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index 51209b1781..53761d0557 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -94,7 +94,7 @@ switch (getExtensionMode()) { break; case '0.0.5': // SQL queries for v0.0.5 - addConfigAddSql('active_limit', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('active_limit', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10'); addAdminMenuSql('setup', 'config_active', 'Aktiv-Liste', 'Einstellungen an der Aktiv-Liste (Heute Online im Gastbereich) vornehmen.', 8); // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index 840842d869..67db090c27 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -86,11 +86,11 @@ switch (getExtensionMode()) { // SQL queries addConfigAddSql('autopurge_inactive', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addConfigAddSql('autopurge_unconfirmed', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addConfigAddSql('ap_inactive_since', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'"); - addConfigAddSql('ap_inactive_time', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'"); - addConfigAddSql('ap_unconfirmed_time', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'"); - addAdminMenuSql('setup','config_autopurge','Auto-Löschung','Automatisch inaktive oder nicht bestätigte Accounts löschen.',12); - addAdminMenuSql('user','list_autopurge','Inaktive finden','Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.',10); + addConfigAddSql('ap_inactive_since', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 2592000'); + addConfigAddSql('ap_inactive_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 25200'); + addConfigAddSql('ap_unconfirmed_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 432000'); + addAdminMenuSql('setup', 'config_autopurge', 'Auto-Löschung', 'Automatisch inaktive oder nicht bestätigte Accounts löschen.', 12); + addAdminMenuSql('user', 'list_autopurge', 'Inaktive finden', 'Lassen Sie sich vor dem täglichen Reset anzeigen, welche Mitglieder als inaktiv erkannt werden und welche gelöscht werden.', 10); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `ap_notified` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Update notes (these will be set as task text!) @@ -130,7 +130,7 @@ switch (getExtensionMode()) { case '0.1.9': // SQL queries for v0.1.9 addConfigAddSql('autopurge_tasks', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addConfigAddSql('ap_tasks_time', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getOneDay()*7)."'"); + addConfigAddSql('ap_tasks_time', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7)); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Bereinigung von zu löschenden Aufgaben klappt wieder. Zeitlimit für genanntes kann eingestellt werden (Default = 7 Tage).

Bitte aktualisieren Sie auch die Admin-Templates!"); @@ -208,7 +208,7 @@ switch (getExtensionMode()) { case '0.3.3': // SQL queries for v0.3.3 addConfigAddSql('ap_del_mails', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addConfigAddSql('ap_dm_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addConfigAddSql('ap_dm_timeout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'"); + addConfigAddSql('ap_dm_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Von bereits gelöschten Mitgliedern die Mails löschen integriert."); diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index 82d3e2aced..3cf182bb34 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -52,10 +52,10 @@ switch (getExtensionMode()) { addAdminMenuSql('setup', 'config_beg', 'Bettel-Link', 'IP-Sperre, {OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Vergütung usw. können Sie hier einstellen.', 10); addGuestMenuSql('main', 'beg', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG} erbetteln!', 'N', 'Y', 4); addMemberMenuSql('main', 'beg', 'Ihr Bettel-Link', 'N', 'Y', 6); - addConfigAddSql('beg_timeout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'"); - addConfigAddSql('beg_userid_timeout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"); - addConfigAddSql('beg_points', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('beg_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 600'); + addConfigAddSql('beg_userid_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800'); + addConfigAddSql('beg_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100'); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // Table for IP locks addDropTableSql('beg_ips'); @@ -106,7 +106,7 @@ PRIMARY KEY (`id`) break; case '0.0.3': // SQL queries for v0.0.3 - addConfigAddSql('beg_points_max', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '0.10000'"); + addConfigAddSql('beg_points_max', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.10000'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Maximale Obergrenze an {?POINTS?} einstellbar (Standard: 0,1 {?POINTS?})"); @@ -123,14 +123,14 @@ PRIMARY KEY (`id`) break; case '0.0.6': // SQL queries for v0.0.6 - addConfigAddSql('beg_userid', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('beg_userid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Ein Mitgliedsaccount (empfehlenswert ist Ihr eigenes!) kann zum Abbuchen der {?POINTS?} verwendet werden. Template admin_config_beg.tpl (und pro!) nicht vergessen, zu aktualisieren."); break; case '0.0.8': // SQL queries for v0.0.8 - addConfigAddSql('beg_ip_timeout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"); + addConfigAddSql('beg_ip_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Zeitsperre gegen die selbe IP-Nummer hinzugefügt."); @@ -154,7 +154,7 @@ PRIMARY KEY (`id`) case '0.1.2': // SQL queries for v0.1.2 addConfigAddSql('beg_mode', "ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'"); - addConfigAddSql('beg_ranks', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('beg_ranks', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); addConfigAddSql('beg_active', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); addConfigAddSql('beg_rallye', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_points` FLOAT(21,5) UNSIGNED NOT NULL DEFAULT 0.00000"); @@ -198,11 +198,11 @@ PRIMARY KEY (`id`) addConfigAddSql('beg_ral_en_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); addConfigAddSql('beg_ral_di_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); addConfigAddSql('beg_new_mem_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addConfigAddSql('beg_notify_bonus', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addConfigAddSql('beg_notify_wait', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_ral_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_ral_en_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_ral_di_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('beg_notify_bonus', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); + addConfigAddSql('beg_notify_wait', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 30'); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_ral_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_ral_en_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `beg_ral_di_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Die Mitglieder können nun optional automatisch über eine aktivierte und/oder deaktivierte Bettel-Rallye informiert werden. Beide Benachrichtigungen können Sie unter Einstellungen --> Bettel-Link/-rallye seperat ein- und ausschalten! Zudem ist eine Sperre gegen eingeloggte Mitglieder eingebaut, die das Klicken auf den eigenen Bettel-Link etwas erschweren soll."); @@ -285,12 +285,12 @@ PRIMARY KEY (`id`) case '0.2.9': // SQL queries for v0.2.9 addDropTableSql('beg_referals'); addCreateTableSql('beg_referals', "( -`id` BIGINT( 20 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , -`userid` BIGINT( 20 ) UNSIGNED NULL DEFAULT NULL , -`remote_ip` VARCHAR( 15 ) NOT NULL DEFAULT '0.0.0.0', +`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , +`userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL , +`remote_ip` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP , `referal_url` TINYTEXT NOT NULL , -INDEX ( `userid` ) +INDEX (`userid`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Recorded Referal URLs'"); // Add admin menu diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index 064f690295..5e469e418d 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -76,7 +76,7 @@ switch (getExtensionMode()) { break; case '0.2.0': // SQL queries for v0.2 - addConfigAddSql('birthday_points', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('birthday_points', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); addDropTableSql('user_birthday'); addCreateTableSql('user_birthday', "( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 91d574ce83..b62cd5c1fe 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -128,11 +128,11 @@ PRIMARY KEY (`id`) // Add extension dependency because of the update command addExtensionDependency('sql_patches'); - addConfigAddSql('login_bonus', "FLOAT(20,3) NOT NULL DEFAULT 10.000"); - addConfigAddSql('turbo_bonus', "FLOAT(20,3) NOT NULL DEFAULT 100.000"); - addConfigAddSql('login_timeout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}"); + addConfigAddSql('login_bonus', 'FLOAT(20,3) NOT NULL DEFAULT 10.000'); + addConfigAddSql('turbo_bonus', 'FLOAT(20,3) NOT NULL DEFAULT 100.000'); + addConfigAddSql('login_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}'); addConfigAddSql('turbo_rates', "VARCHAR(255) NOT NULL DEFAULT '50;20;10'"); - addConfigAddSql('bonus_ranks', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('bonus_ranks', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); // Use actual month for this update addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `login_bonus` FLOAT(20,3) NOT NULL DEFAULT 0.000"); @@ -150,7 +150,7 @@ PRIMARY KEY (`id`) `mail_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `bonus_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `level` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`points` FLOAT(20,3) NOT NULL DEFAULT '0.000', +`points` FLOAT(20,3) NOT NULL DEFAULT 0.000, `timemark` VARCHAR(32) NOT NULL DEFAULT 0, PRIMARY KEY (`id`), INDEX `mail_id` (`mail_id`), @@ -241,7 +241,7 @@ INDEX `userid` (`userid`) case '0.3.5': // SQL queries for v0.3.5 addConfigAddSql('bonus_mode', "ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'"); - addConfigAddSql('bonus_userid', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('bonus_userid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Der Login-Bonus Aktiv-Bonus (= Klick-Bonus) können nun zuerst von einem Mitgliederaccount (das sollte Ihres sein!), vom Jackpot abgezogen oder einfach dazuadiert werden."); @@ -268,8 +268,8 @@ INDEX `userid` (`userid`) break; case '0.4.0': // SQL queries for v0.4.0 - addConfigAddSql('bonus_timeout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*7).""); - addConfigAddSql('bonus_lines', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('bonus_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7)); + addConfigAddSql('bonus_lines', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Automatisches Löschen von Turbo-Bonus-Zeilen ({?_MYSQL_PREFIX?}_bonus_turbo) und begrenzte Anzahl von Einträgen hinzugefügt."); @@ -291,9 +291,9 @@ INDEX `userid` (`userid`) break; case '0.4.4': // SQL queries for v0.4.4 - addConfigAddSql('bonus_order', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000"); - addConfigAddSql('bonus_ref', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); - addConfigAddSql('bonus_stats', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"); + addConfigAddSql('bonus_order', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000'); + addConfigAddSql('bonus_ref', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000'); + addConfigAddSql('bonus_stats', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 5.00000'); addConfigAddSql('bonus_active', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_order` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ref` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); @@ -485,11 +485,11 @@ ORDER BY addConfigAddSql('bonus_en_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); addConfigAddSql('bonus_di_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); addConfigAddSql('bonus_new_mem_notify', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addConfigAddSql('bonus_notify_points', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addConfigAddSql('bonus_notify_wait', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_en_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_di_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('bonus_notify_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); + addConfigAddSql('bonus_notify_wait', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 30'); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_en_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_di_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_ral_notify` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Optionale automatische Benachrichtigung über aktivierte und/oder deaktivierte Aktiv-Rallye einstellbar."); diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index 12dc7236a9..4988be1bd6 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -52,8 +52,8 @@ enableExtensionProductive(false); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // Configuration entries - addConfigAddSql('booking_per_page', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - addConfigAddSql('booking_purge', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay() * 3).""); + addConfigAddSql('booking_per_page', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); + addConfigAddSql('booking_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 3)); // Drop/create table for user bookings addDropTableSql('user_book'); diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 29221d4fdf..25b0cb1434 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -121,8 +121,8 @@ switch (getExtensionMode()) { break; case '0.0.7': // SQL queries for v0.0.7 - addConfigAddSql('db_hits', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addConfigAddSql('cache_hits', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('db_hits', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); + addConfigAddSql('cache_hits', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); addAdminMenuSql('stats','cache_stats','DB-Cache','Auf Cache und gesamte Datenbank registrierte Anfragen anzeigen.', 4); // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-coupon.php b/inc/extensions/ext-coupon.php index a567756adb..03d3a9495d 100644 --- a/inc/extensions/ext-coupon.php +++ b/inc/extensions/ext-coupon.php @@ -62,6 +62,7 @@ switch (getExtensionMode()) { `coupon_type` ENUM('CODE','API') NOT NULL DEFAULT 'CODE', `total_created` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `total_used` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +`points` FLOAT(20,5) NOT NULL DEFAULT 0.00000, `coupon_description` TEXT, PRIMARY KEY (`id`) ) TYPE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Created coupons'"); @@ -80,14 +81,15 @@ UNIQUE KEY (`coupon_code`) ) TYPE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Coupon->user connection'"); // Configuration entries - //addConfigAddSql('', ""); + addConfigAddSql('coupon_default_time', 'BIGINT(20) NOT NULL DEFAULT ' . (getOneDay() * 7)); + addConfigAddSql('coupon_default_points', 'FLOAT(20,5) NOT NULL DEFAULT 1000.00000'); // Menu systems: // - Admin entries - addAdminMenuSql('coupon', NULL,'Gutscheine', 'Einrichten und Versenden von Code-Gutscheinen, sowie per API (noch in Planung). Bei Code-Gutscheinen wird ein Code pro Mitglied erzeugt, der dann an das Mitglied ausgesandt wird. Löst das Mitglied den Gutschein ein, erhält es die Gutschrift auf sein Konto gutgeschrieben. Ausgangseinstellung ist die Gutschrift auf das Werbeguthaben, was für Paidmailer von Wichtigkeit ist, dass Guthaben aus Gutscheinen nicht auszahlungsfähig ist.', 6); - addAdminMenuSql('coupon', 'list_coupon', 'Auflisten','Listet alle Gutscheine und Einlösungen durch die Mitglieder auf.', 1); - addAdminMenuSql('coupon', 'send_coupon', 'Versenden/Neuen erstellen','Versendet neue Gutscheine an die Mitglieder. Wenn Sie auf "Absenden" klicken, warten Sie bitte die Folgeseite ab, da der Versand der Gutscheine derzeit nicht gepoolt ist.', 2); - addAdminMenuSql('coupon', 'config_coupon', 'Einstellungen','Allgemeine Einstellungen zu Code-Gutscheinen und Gutscheinen von Sponsoren (z.B. per API) können hier vorgenommen werden.', 3); + addAdminMenuSql('coupon', NULL, 'Gutscheine', 'Einrichten und Versenden von Code-Gutscheinen, sowie per API (noch in Planung). Bei Code-Gutscheinen wird ein Code pro Mitglied erzeugt, der dann an das Mitglied ausgesandt wird. Löst das Mitglied den Gutschein ein, erhält es die Gutschrift auf sein Konto gutgeschrieben. Ausgangseinstellung ist die Gutschrift auf das Werbeguthaben, was für Paidmailer von Wichtigkeit ist, dass Guthaben aus Gutscheinen nicht auszahlungsfähig ist.', 6); + addAdminMenuSql('coupon', 'list_coupon', 'Auflisten', 'Listet alle Gutscheine und Einlösungen durch die Mitglieder auf.', 1); + addAdminMenuSql('coupon', 'send_coupon', 'Versenden/Neuen erstellen', 'Versendet neue Gutscheine an die Mitglieder. Wenn Sie auf "Absenden" klicken, warten Sie bitte die Folgeseite ab, da der Versand der Gutscheine derzeit nicht gepoolt ist.', 2); + addAdminMenuSql('coupon', 'config_coupon', 'Einstellungen', 'Allgemeine Einstellungen zu Code-Gutscheinen und Gutscheinen von Sponsoren (z.B. per API) können hier vorgenommen werden.', 3); // - Member entries addMemberMenuSql('coupon', NULL, 'Gutscheine', 'N', 'Y', 3); addMemberMenuSql('coupon', 'cash_coupon', 'Gutschein einlösen', 'N', 'Y', 1); diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index 66919d5555..7803430229 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -121,20 +121,20 @@ PRIMARY KEY (`id`) addGuestMenuSql('debug','debug_pilory','Spam-Pranger','Y','Y',4); // Admin menu - addAdminMenuSql('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis {?CACHE_PATH?} befindet.',10); - addAdminMenuSql('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Einträge mit bestehenden abgeglichen werden können und dann evtl. hinzugefügt werden. Die debug.log wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1); - addAdminMenuSql('debug','list_debug','Einträge anzeigen','Listet alle bereits importierten Einträge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom Entwicklerteam geprüft werden können.',2); - addAdminMenuSql('debug','reg_debug','Am Server anmelden','Sie müssen zuerst Ihren Debug-Client (Ihr {?mt_word?} ist dies) oder Relay am Server von mxchange.org anmelden. Dies geschieht für Sie nicht automatisch, da Sie Ihre Daten zuvor überprüfen müssen, wie z.B. URL, eMail-Adresse und {?mt_word?}-Titel.',3); - addAdminMenuSql('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {?mt_word?} wieder vom Projekt-Server ab, damit mein Entwicklerteam weiss, welche Keys nicht mehr genutzt werden.',4); - addAdminMenuSql('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von mxchange.org hilft Ihnen gerne weiter.',5); + addAdminMenuSql('debug', NULL, 'Debug-System', 'Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis {?CACHE_PATH?} befindet.', 10); + addAdminMenuSql('debug', 'import_debug', 'debug.log importieren', 'Importieren Sie hier manuell die debug.log, damit neue Einträge mit bestehenden abgeglichen werden können und dann evtl. hinzugefügt werden. Die debug.log wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!', 1); + addAdminMenuSql('debug', 'list_debug', 'Einträge anzeigen', 'Listet alle bereits importierten Einträge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom Entwicklerteam geprüft werden können.', 2); + addAdminMenuSql('debug', 'reg_debug', 'Am Server anmelden', 'Sie müssen zuerst Ihren Debug-Client (Ihr {?mt_word?} ist dies) oder Relay am Server von mxchange.org anmelden. Dies geschieht für Sie nicht automatisch, da Sie Ihre Daten zuvor überprüfen müssen, wie z.B. URL, eMail-Adresse und {?mt_word?}-Titel.', 3); + addAdminMenuSql('debug', 'unreg_debug', 'Vom Server abmelden', 'Melden Sie bitte Ihren {?mt_word?} wieder vom Projekt-Server ab, damit mein Entwicklerteam weiss, welche Keys nicht mehr genutzt werden.', 4); + addAdminMenuSql('debug', 'config_debug', 'Einstellungen', 'Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von mxchange.org hilft Ihnen gerne weiter.', 5); // Config entries - addConfigAddSql('debug_id', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('debug_id', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); addConfigAddSql('debug_key', "VARCHAR(255) NOT NULL DEFAULT ''"); addConfigAddSql('debug_mode', "ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'"); addConfigAddSql('debug_new_log', "ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'"); addConfigAddSql('debug_new_client', "ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'"); - addConfigAddSql('debug_reject_log', "BIGINT(20) UNSIGNED NOT NULL DEFAULT " . (getOneDay() * 30)); + addConfigAddSql('debug_reject_log', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 30)); addConfigAddSql('debug_master_url', "VARCHAR(255) NOT NULL DEFAULT '{?SERVER_URL?}'"); break; diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 40734266a7..3d8d198149 100644 --- a/inc/extensions/ext-doubler.php +++ b/inc/extensions/ext-doubler.php @@ -68,36 +68,36 @@ PRIMARY KEY (`id`) // --- SETTINGS --- // // Minimum points to double - addConfigAddSql('doubler_min', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); + addConfigAddSql('doubler_min', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000'); // Maximum points to double - addConfigAddSql('doubler_max', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000"); + addConfigAddSql('doubler_max', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 10000.00000'); // Points left on users account after doubling - addConfigAddSql('doubler_left', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000"); + addConfigAddSql('doubler_left', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000'); // Charge for doubling points which goes to the webmaster (shreddered in fact!) - addConfigAddSql('doubler_charge', "FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000"); + addConfigAddSql('doubler_charge', 'FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.03000'); // Referal percents - addConfigAddSql('doubler_ref', "FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000"); + addConfigAddSql('doubler_ref', 'FLOAT(7,5) UNSIGNED NOT NULL DEFAULT 0.02000'); // Shall I use the jackpot to take points from? (Y/N, default=Y) addConfigAddSql('doubler_jackpot', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // A user account to take points from (default: 0->none) - addConfigAddSql('doubler_userid', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('doubler_userid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // Total payed out points from your doublers - addConfigAddSql('doubler_points', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addConfigAddSql('doubler_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); // Sending mode of mails (immediately/daily reset) // --> This also means who fast the doubled points will be payed out! addConfigAddSql('doubler_send_mode', "ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"); // Timeout for entries to be purged (default: one week) - addConfigAddSql('doubler_timeout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*7).""); + addConfigAddSql('doubler_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7)); // Number of newest entries to display - addConfigAddSql('doubler_display_new', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('doubler_display_new', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); // Number of entries which will be payed out soon - addConfigAddSql('doubler_display_pay', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('doubler_display_pay', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); // Number of entries which are already payed out - addConfigAddSql('doubler_display_old', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('doubler_display_old', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); // Points used by every member - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `doubler_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `doubler_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); // Counter for usage of the doubler - addConfigAddSql('doubler_counter', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('doubler_counter', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // // --- MENU SYSTEMS --- @@ -118,8 +118,8 @@ PRIMARY KEY (`id`) // SQL commands to run addDropTableSql('doubler'); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='doubler'"); - addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='doubler'"); - addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='doubler'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='doubler' LIMIT 1"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='doubler' LIMIT 1"); break; case 'activate': // Do stuff when admin activates this extension @@ -145,7 +145,7 @@ PRIMARY KEY (`id`) case '0.0.2': // SQL queries for v0.0.2 // Total used points - addConfigAddSql('doubler_user', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addConfigAddSql('doubler_user', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Gebühr wird vom Verdoppler-Pott abgezogen."); @@ -231,8 +231,8 @@ PRIMARY KEY (`id`) break; case '0.1.7': // SQL queries for v0.1.7 - addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_config` SET `doubler_charge`=`doubler_charge`*100 LIMIT 1'); - addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_config` SET `doubler_ref`=`doubler_ref`*100 LIMIT 1'); + addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_config` SET `doubler_charge`=`doubler_charge`*100 WHERE `config`=0 LIMIT 1'); + addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_config` SET `doubler_ref`=`doubler_ref`*100 WHERE `config`=0 LIMIT 1'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index d327ac1692..5bf6efb985 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -61,16 +61,16 @@ PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'User holiday data'"); // Add default values to config - addConfigAddSql('holiday_max', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); + addConfigAddSql('holiday_max', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 30'); // Add member menu - addMemberMenuSql('main','holiday','Urlaubsschaltung','Y','Y',4); + addMemberMenuSql('main', 'holiday', 'Urlaubsschaltung', 'Y', 'Y', 4); // Add admin menus - addAdminMenuSql('holiday', NULL, 'Urlaubsmanagement','Hier können Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.',4); - addAdminMenuSql('holiday','list_holiday','Auflisten','Alle Urlaubsschaltungen auflisten.',1); - addAdminMenuSql('holiday','del_holiday','Urlaub beenden','Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur "Verstoss gegen unsere AGBs" ein!',2); - addAdminMenuSql('holiday','config_holiday','Einstellungen','Maximale Tage für Urlaub usw. einstellen.',3); + addAdminMenuSql('holiday', NULL, 'Urlaubsmanagement', 'Hier können Sie Urlaubsschaltungen Ihrer Mitglieder auflisten oder auch wieder aufheben.', 4); + addAdminMenuSql('holiday', 'list_holiday', 'Auflisten', 'Alle Urlaubsschaltungen auflisten.', 1); + addAdminMenuSql('holiday', 'del_holiday', 'Urlaub beenden', 'Urlaubsschaltungen aufheben. Geben Sie bitte mehr als nur "Verstoss gegen unsere AGBs" ein!', 2); + addAdminMenuSql('holiday', 'config_holiday', 'Einstellungen', 'Maximale Tage für Urlaub usw. einstellen.', 3); // Remove 0 max mails per day addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value=0 LIMIT 1"); @@ -154,9 +154,9 @@ PRIMARY KEY (`id`) break; case '0.1.3': // SQL queries for v0.1.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD holiday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE value=0 LIMIT 1"); - addConfigAddSql('holiday_lock', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getOneDay()*2)."'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `holiday_active` ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_max_receive` WHERE `value`=0 LIMIT 1"); + addConfigAddSql('holiday_lock', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 2)); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Die Mitglieder-Accounts werden nicht mehr gesperrt, sondern nur auf Urlaub geschaltet. Lassen Sie sich nicht davon verwirren, dass sie "freigegeben" sind!"); diff --git a/inc/extensions/ext-mailid.php b/inc/extensions/ext-mailid.php index a67623ca09..958c16aa94 100644 --- a/inc/extensions/ext-mailid.php +++ b/inc/extensions/ext-mailid.php @@ -186,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 diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index bfc8dc47a5..a2d1a8e1b0 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -124,8 +124,8 @@ PRIMARY KEY (`media_key`) break; case '0.0.7': // SQL queries for v0.0.7 - addConfigAddSql('mt_start', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addConfigAddSql('mt_stage', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 500"); + addConfigAddSql('mt_start', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); + addConfigAddSql('mt_stage', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 500'); addAdminMenuSql('setup', 'config_mediadata', 'Mediendaten', 'Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10); // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index aed01066fb..b678d96984 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -184,11 +184,11 @@ PRIMARY KEY (`nl_order_id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Newsletter orders'"); // Configuration - addConfigAddSql('nl_expire', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay() * 7).""); - addConfigAddSql('nl_archive_expire', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay() * 14).""); + addConfigAddSql('nl_expire', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7)); + addConfigAddSql('nl_archive_expire', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 14)); addConfigAddSql('nl_default_subject', "VARCHAR(255) NOT NULL DEFAULT 'Newsletter vom {OPEN_CONFIG}CURRENT_DATE{CLOSE_CONFIG}'"); - addConfigAddSql('nl_default_header', "MEDIUMTEXT"); - addConfigAddSql('nl_default_footer', "MEDIUMTEXT"); + addConfigAddSql('nl_default_header', 'MEDIUMTEXT'); + addConfigAddSql('nl_default_footer', 'MEDIUMTEXT'); addConfigAddSql('nl_archive', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Admin menu diff --git a/inc/extensions/ext-nickname.php b/inc/extensions/ext-nickname.php index 64a0783c0e..c6953f912e 100644 --- a/inc/extensions/ext-nickname.php +++ b/inc/extensions/ext-nickname.php @@ -97,7 +97,7 @@ switch (getExtensionMode()) { break; case '0.0.6': // SQL queries for v0.0.6 - addConfigAddSql('nickname_len', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 5"); + addConfigAddSql('nickname_len', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 5'); addConfigAddSql('nickname_pattern', "VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'"); addConfigAddSql('nickname_chars', "VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'"); addAdminMenuSql('setup','config_nickname','Nicknamen','Stellen Sie minimale Nicknamenlänge, sowie erlaubte Zeichen hier ein.', 12); diff --git a/inc/extensions/ext-optimize.php b/inc/extensions/ext-optimize.php index ff6b0a45b1..96acbfb287 100644 --- a/inc/extensions/ext-optimize.php +++ b/inc/extensions/ext-optimize.php @@ -55,7 +55,7 @@ switch (getExtensionMode()) { addDropTableSql('optimize_gain'); addCreateTableSql('optimize_gain', "( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`gain` decimal(10,3) NOT NULL DEFAULT '0.000', +`gain` DECIMAL(10,3) NOT NULL DEFAULT 0.000, PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Optimization history data'"); addAdminMenuSql('misc', 'optimize', 'DB optimieren', 'Führen Sie dies ab und an aus, damit überflüssige Binärdaten aus der Datenbank entfernt werden.', 5); diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 16ea3d257d..87b84ce3b4 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -141,7 +141,7 @@ switch (getExtensionMode()) { break; case '0.2.3': // SQL queries for v0.2.3 - addConfigAddSql('order_min', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('order_min', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Minimum an Empfänger pro Mailbuchung einstellbar. Standard: 10 Empfänger"); diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index f3ae6254d9..aa768524e1 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -91,7 +91,7 @@ switch (getExtensionMode()) { break; case '0.0.4': // SQL queries for v0.0.4 - addConfigAddSql('max_comma', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 3"); + addConfigAddSql('max_comma', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 3'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Angezeigte Kommastellen können zwischen 0 und 5 eingestellt werden."); @@ -193,7 +193,7 @@ switch (getExtensionMode()) { break; case '0.2.1': // SQL queries for v0.2.1 - addConfigAddSql('min_age', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 16"); + addConfigAddSql('min_age', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 16'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Minimumalter ist nun konfigurierbar."); @@ -207,7 +207,7 @@ switch (getExtensionMode()) { break; case '0.2.3': // SQL queries for v0.2.3 - addConfigAddSql('max_send', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('max_send', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Fehlende Konfiguration hinzugefügt."); @@ -222,7 +222,7 @@ switch (getExtensionMode()) { break; case '0.2.5': // SQL queries for v0.2.5 - addConfigAddSql('code_length', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 5"); + addConfigAddSql('code_length', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 5'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Codelänge aus tables.sql rausgeholt."); diff --git a/inc/extensions/ext-payout.php b/inc/extensions/ext-payout.php index adbb2a90a1..d101a4d936 100644 --- a/inc/extensions/ext-payout.php +++ b/inc/extensions/ext-payout.php @@ -53,7 +53,7 @@ switch (getExtensionMode()) { addCreateTableSql('user_payouts', "( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`payout_total` FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000', +`payout_total` FLOAT(22,3) UNSIGNED NOT NULL DEFAULT 0.000, `target_account` VARCHAR(255) NOT NULL DEFAULT '', `target_bank` VARCHAR(255) NOT NULL DEFAULT '', `payout_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -67,7 +67,7 @@ PRIMARY KEY (`id`) addCreateTableSql('payout_types', "( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `type` VARCHAR(255) NOT NULL DEFAULT '', -`rate` FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000', +`rate` FLOAT(22,3) UNSIGNED NOT NULL DEFAULT 0.000, `min_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Payout types'"); diff --git a/inc/extensions/ext-primera.php b/inc/extensions/ext-primera.php index d14a1a94bc..960fc96800 100644 --- a/inc/extensions/ext-primera.php +++ b/inc/extensions/ext-primera.php @@ -69,8 +69,8 @@ PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Transfers in Primera'"); // Configuration - addConfigAddSql('primera_min_payout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000"); - addConfigAddSql('primera_min_withdraw', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000"); + addConfigAddSql('primera_min_payout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000'); + addConfigAddSql('primera_min_withdraw', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000'); addConfigAddSql('primera_api_name', "VARCHAR(255) NOT NULL DEFAULT ''"); addConfigAddSql('primera_api_md5', "VARCHAR(32) NOT NULL DEFAULT ''"); addConfigAddSql('primera_refid', "VARCHAR(255) NOT NULL DEFAULT ''"); diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php index 48f1364256..d65eedb801 100644 --- a/inc/extensions/ext-refback.php +++ b/inc/extensions/ext-refback.php @@ -90,8 +90,8 @@ KEY (`refid`) switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 addConfigAddSql('refback_enabled', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addConfigAddSql('refback_min_perc', "TINYINT(3) NOT NULL DEFAULT 0"); - addConfigAddSql('refback_max_perc', "TINYINT(3) NOT NULL DEFAULT 100"); + addConfigAddSql('refback_min_perc', 'TINYINT(3) NOT NULL DEFAULT 0'); + addConfigAddSql('refback_max_perc', 'TINYINT(3) NOT NULL DEFAULT 100'); addAdminMenuSql('setup', 'config_refback', 'Refback', 'Ändern Sie Einstellungen zum Refback, wie z.B. Minimum- und Maximum-Prozente, was die Mitglieder einstellen dürfen.', 15); addAdminMenuSql('user', 'list_refback', 'Refback auflisten', 'Refback aller Mitglieder auflisten.', 15); diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index 5f185b28e8..688c70d9bf 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -370,8 +370,8 @@ PRIMARY KEY (`id`) // // General configuration stuff // - addConfigAddSql('sponsor_ref_points', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); - addConfigAddSql('sponsor_min_points', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000"); + addConfigAddSql('sponsor_ref_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000'); + addConfigAddSql('sponsor_min_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1000.00000'); // // Register module // diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index e1236807b1..19d6839bf9 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -123,14 +123,14 @@ switch (getExtensionMode()) { break; case '0.0.3': // SQL queries for v0.0.3 - addConfigAddSql('points_word', "VARCHAR(255) NOT NULL DEFAULT 'Punkte'"); + addConfigAddSql('points_word', "VARCHAR(255) NOT NULL DEFAULT '{OPEN_TEMPLATE}DEFAULT_POINTS{CLOSE_TEMPLATE}'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Das Wort "Punkte" kann nun per Datenbank geändert werden. Damit können Sie anstelle des Wortes Punkte auch Klammlose, Wernis, Primera oder € schreiben."); break; case '0.0.4': // SQL queries for v0.0.4 - addConfigAddSql('mails_page', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('mails_page', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Anzahl Mails pro Seite in EMail-Details ansehen und EMail-Archiv hinzugefügt."); @@ -181,8 +181,8 @@ switch (getExtensionMode()) { case '0.1.1': // SQL queries for v0.1.1 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standard) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1"); - addConfigAddSql('index_delay', "TINYINT(3) NOT NULL DEFAULT 0"); - addConfigAddSql('index_cookie', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*365).""); + addConfigAddSql('index_delay', 'TINYINT(3) NOT NULL DEFAULT 0'); + addConfigAddSql('index_cookie', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 365)); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."); @@ -190,7 +190,7 @@ switch (getExtensionMode()) { case '0.1.2': // SQL queries for v0.1.2 addAdminMenuSql('setup','config_refid','Standard-Ref-Id','Stellen Sie hier die Mitglieder-Id ein, die genommen werden soll, wenn der Gast n icht per Referal-Link Ihren {?mt_word?} aufgerufen hat.', 7); - addConfigAddSql('def_refid', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('def_refid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Standard Referal-Id kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"); @@ -302,7 +302,7 @@ switch (getExtensionMode()) { break; case '0.2.7': // SQL queries for v0.2.7 - addConfigAddSql('stats_limit', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('stats_limit', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 10'); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1"); // Update notes (these will be set as task text!) @@ -379,6 +379,7 @@ INDEX (`la_action`), INDEX (`la_what`), PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Menu system -> LAS'"); + // All "logical areas" together addDropTableSql('admin_menu_las_data'); addCreateTableSql('admin_menu_las_data', "( @@ -392,11 +393,12 @@ INDEX (`la_posx`), INDEX (`la_posy`), PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'LAS position and title data'"); + // Which menu do you like? addConfigAddSql('admin_menu', "ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'"); // Insert menus - addAdminMenuSql('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9); + addAdminMenuSql('setup', 'config_admin', 'Adminmenü', 'Diverse Einstellungen am Adminmenü vornehmen.', 9); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Logische Bereiche (Logical Areas = LAs) eingeführt. Dadurch wird das immer stärker anwachsende Admin-Menü in grosse Hauptgruppen unterteilt, wodurch ein Auffinden von Menüpunkten verbessert wird."); @@ -428,11 +430,11 @@ PRIMARY KEY (`id`) case '0.3.5': // SQL queries for v0.3.5 // List accounts with no referal - addMemberMenuSql('stats',NULL,'Statistiken','Y','N',4); - addMemberMenuSql('stats','stats2','Framekiller-Mails','Y','N',2); - addMemberMenuSql('extras',NULL,'Extras','Y','N',5); - addMemberMenuSql('rals',NULL,'Rallyes','Y','N',6); - addMemberMenuSql('account',NULL,'Ihr Account','Y','N',7); + addMemberMenuSql('stats', NULL, 'Statistiken', 'Y', 'N', 4); + addMemberMenuSql('stats', 'stats2', 'Framekiller-Mails', 'Y', 'N', 2); + addMemberMenuSql('extras', NULL, 'Extras', 'Y', 'N', 5); + addMemberMenuSql('rals', NULL, 'Rallyes', 'Y', 'N', 6); + addMemberMenuSql('account', NULL, 'Ihr Account', 'Y', 'N', 7); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='stats', `sort`=1, `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`=3 WHERE `what`='reflinks' LIMIT 1"); @@ -441,10 +443,10 @@ PRIMARY KEY (`id`) break; case '0.3.6': // SQL queries for v0.3.6 - addConfigAddSql('salt_length', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('salt_length', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); addConfigAddSql('pass_scramble', "VARCHAR(255) NOT NULL DEFAULT ''"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` MODIFY `password` VARCHAR(255) NOT NULL DEFAULT ''"); - addConfigAddSql('rand_no', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('rand_no', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); addConfigAddSql('file_hash', "VARCHAR(255) NOT NULL DEFAULT ''"); addConfigAddSql('master_salt', "VARCHAR(255) NOT NULL DEFAULT ''"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_config` SET `rand_no`=(ROUND(RAND() * 99999) + 100000) WHERE `config`=0 LIMIT 1"); @@ -493,7 +495,7 @@ PRIMARY KEY (`id`) case '0.4.3': // SQL queries for v0.4.3 addConfigAddSql('proxy_host', "VARCHAR(255) NOT NULL DEFAULT ''"); - addConfigAddSql('proxy_port', "INT(5) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('proxy_port', 'INT(5) UNSIGNED NOT NULL DEFAULT 0'); addConfigAddSql('proxy_username', "VARCHAR(255) NOT NULL DEFAULT ''"); addConfigAddSql('proxy_password', "VARCHAR(255) NOT NULL DEFAULT ''"); addAdminMenuSql('setup','config_proxy','Proxy-Einstellungen','Sollte Ihr Webserver sich hinter einem Proxy befinden, so können Sie Ihren {?mt_word?} so konfigurieren, dass es Updates durch diesen hindurch sucht!', 15); @@ -518,8 +520,8 @@ PRIMARY KEY (`id`) break; case '0.4.5': // SQL queries for v0.4.5 - addConfigAddSql('last_month', "CHAR(2) NOT NULL DEFAULT '00'"); - addConfigAddSql('last_week', "CHAR(2) NOT NULL DEFAULT '00'"); + addConfigAddSql('last_month', 'CHAR(2) NOT NULL DEFAULT 00'); + addConfigAddSql('last_week', 'CHAR(2) NOT NULL DEFAULT 00'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Täglichen/wöchentlichen/monatlichen Reset verbessert."); @@ -536,7 +538,7 @@ PRIMARY KEY (`id`) break; case '0.4.8': // SQL queries for v0.4.8 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` ADD INDEX (`subject`)"); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_task_system` ADD INDEX (`subject`)'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Index für Betreff eingefügt."); @@ -548,23 +550,23 @@ PRIMARY KEY (`id`) break; case '0.5.0': // SQL queries for v0.5.0 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `level`"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid`"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)"); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `level`'); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` DROP INDEX `userid`'); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_refsystem` ADD UNIQUE `userid_level` (`userid`,`level`)'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Referal-System unterstützt nun detailierte Referal-Übersicht und vieles mehr."); break; case '0.5.1': // SQL queries for v0.5.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` DROP `descr`"); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_member_menu` DROP `descr`'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Beschreibungsspalte von Mitgliedsmenü entfernt, welche ohnehin nicht genutzt wird."); break; case '0.5.2': // SQL queries for v0.5.2 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_refdepths` CHANGE `percents` `percents` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Prozentsätze können nun fünf Stellen hinter dem Komma sein."); @@ -608,7 +610,7 @@ PRIMARY KEY (`id`) break; case '0.5.8': // SQL queries for v0.5.8 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` DROP `ext_lang_file`"); + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_extensions` DROP `ext_lang_file`'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Sprachdateinamen werden nicht mehr in der Datenbank behalten."); @@ -765,7 +767,7 @@ INDEX (`ip`) break; case '0.7.5': // SQL queries for v0.7.5 - addConfigAddSql('last_hour', "TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00"); + addConfigAddSql('last_hour', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Aktuelle Stunde hinzugefügt (ist nicht konfigurierbar)."); @@ -780,7 +782,7 @@ INDEX (`ip`) break; case '0.7.7': // SQL queries for v0.7.7 - addMemberMenuSql('earn',NULL,'Verdienen','Y','N',2); + addMemberMenuSql('earn', NULL, 'Verdienen', 'Y', 'N', 2); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='earn', `sort`=1 WHERE `what`='unconfirmed' LIMIT 1"); // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index db0913f2a8..2373861495 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.php @@ -51,7 +51,7 @@ switch (getExtensionMode()) { // SQL commands to run addGuestMenuSql('main','top10','TOP-10','Y','Y', 7); addAdminMenuSql('setup','config_top10','TOP-10 Listen','Stellen Sie hier ein, wie lang die TOP-Listen sein sollen, also wie viele Plätze angezeigt werden sollen.', 8); - addConfigAddSql('top10_max', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('top10_max', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); break; case 'remove': // Do stuff when removing extension diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index 610451ceed..c987e75e46 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -88,11 +88,11 @@ PRIMARY KEY (`id`) addMemberMenuSql('main', 'transfer', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transfer', 'N', 'Y', 5); // Add config values - addConfigAddSql('transfer_max', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 50"); - addConfigAddSql('transfer_age', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*28)); - addConfigAddSql('transfer_timeout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}"); - addConfigAddSql('transfer_balance', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); - addConfigAddSql('transfer_code', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"); + addConfigAddSql('transfer_max', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 50'); + addConfigAddSql('transfer_age', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 28)); + addConfigAddSql('transfer_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}'); + addConfigAddSql('transfer_balance', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 100'); + addConfigAddSql('transfer_code', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 5'); // Add row(s) to user's data addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'"); diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 77be291ef1..124d3be697 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -196,7 +196,7 @@ INDEX (`stats_type`) case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.1.0': // SQL queries for v0.1 - addConfigAddSql('user_limit', "INT(7) UNSIGNED NOT NULL DEFAULT 20"); + addConfigAddSql('user_limit', 'INT(7) UNSIGNED NOT NULL DEFAULT 20'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Seitenweises Anzeigen der User-Liste ist nun möglich."); @@ -260,7 +260,7 @@ INDEX (`stats_type`) break; case '0.2.1': // SQL queries for v0.2.1 - addConfigAddSql('user_alpha', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('user_alpha', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10'); addAdminMenuSql('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8); // Update notes (these will be set as task text!) @@ -335,7 +335,7 @@ INDEX (`stats_type`) case '0.3.4': // SQL queries for v0.3.4 addConfigAddSql('select_user_zero_refid', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addConfigAddSql('user_min_confirmed', "SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('user_min_confirmed', 'SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10'); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // Update notes (these will be set as task text!) @@ -345,7 +345,7 @@ INDEX (`stats_type`) case '0.3.5': // SQL queries for v0.3.5 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_reason` TINYTEXT"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'"); - addConfigAddSql('user_delete_purge', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay() * 30).""); + addConfigAddSql('user_delete_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 30)); addAdminMenuSql('user', 'list_user_del', 'Löschungen auflisten', 'Listet die Löschungen von Usern auf.', 9); addDropTableSql('user_del'); addCreateTableSql('user_del', "( diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index 7b495e69c6..743409b569 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -64,9 +64,9 @@ PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Transfered Wernis per user'"); // Confiuration - addConfigAddSql('wernis_min_payout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"); - addConfigAddSql('wernis_min_withdraw', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"); - addConfigAddSql('wernis_api_id', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('wernis_min_payout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000'); + addConfigAddSql('wernis_min_withdraw', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000'); + addConfigAddSql('wernis_api_id', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); addConfigAddSql('wernis_api_md5', "VARCHAR(32) NOT NULL DEFAULT ''"); addConfigAddSql('wernis_api_url', "VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"); @@ -110,12 +110,12 @@ PRIMARY KEY (`id`) case '0.0.1': // SQL queries for v0.0.1 addConfigAddSql('wernis_payout_active', "ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); addConfigAddSql('wernis_withdraw_active', "ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); - addConfigAddSql('wernis_payout_factor', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - addConfigAddSql('wernis_withdraw_factor', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - addConfigAddSql('wernis_payout_fee_percent', "FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addConfigAddSql('wernis_withdraw_fee_percent', "FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addConfigAddSql('wernis_payout_fee_fix', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addConfigAddSql('wernis_withdraw_fee_fix', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('wernis_payout_factor', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000'); + addConfigAddSql('wernis_withdraw_factor', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000'); + addConfigAddSql('wernis_payout_fee_percent', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000'); + addConfigAddSql('wernis_withdraw_fee_percent', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000'); + addConfigAddSql('wernis_payout_fee_fix', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); + addConfigAddSql('wernis_withdraw_fee_fix', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("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."); @@ -129,7 +129,7 @@ PRIMARY KEY (`id`) break; case '0.0.3': // SQL queries for v0.0.3 - addConfigAddSql('wernis_refid', "INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT 00000"); + addConfigAddSql('wernis_refid', 'INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT 00000'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("WDS66-Username muss nun eintragen werden (API-Anpassung)."); diff --git a/inc/extensions/ext-yoomedia.php b/inc/extensions/ext-yoomedia.php index f2472132a6..89743fd55c 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -56,16 +56,16 @@ setExtensionAlwaysActive('Y'); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addConfigAddSql('yoomedia_id', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addConfigAddSql('yoomedia_sid', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('yoomedia_id', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); + addConfigAddSql('yoomedia_sid', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); addConfigAddSql('yoomedia_passwd', "VARCHAR(255) NOT NULL DEFAULT ''"); - addConfigAddSql('yoomedia_erotic_allowed', "TINYINT(2) UNSIGNED NOT NULL DEFAULT 0"); - addConfigAddSql('yoomedia_tm_max_reload', "SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""); - addConfigAddSql('yoomedia_tm_min_wait', "SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); - addConfigAddSql('yoomedia_tm_clicks_remain', "INT(7) UNSIGNED NOT NULL DEFAULT 1000"); - addConfigAddSql('yoomedia_tm_min_pay', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addConfigAddSql('yoomedia_requests_total', "SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); - addConfigAddSql('yoomedia_requests_remain', "SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); + addConfigAddSql('yoomedia_erotic_allowed', 'TINYINT(2) UNSIGNED NOT NULL DEFAULT 0' ) ; + addConfigAddSql('yoomedia_tm_max_reload', 'SMALLINT(6) UNSIGNED NOT NULL DEFAULT ' . (24 * 8)); + addConfigAddSql('yoomedia_tm_min_wait', 'SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60'); + addConfigAddSql('yoomedia_tm_clicks_remain', 'INT(7) UNSIGNED NOT NULL DEFAULT 1000'); + addConfigAddSql('yoomedia_tm_min_pay', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); + addConfigAddSql('yoomedia_requests_total', 'SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200'); + addConfigAddSql('yoomedia_requests_remain', 'SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200'); // Admin menu addAdminMenuSql('setup', 'config_yoomedia', 'Yoo!Media Interface 2.0','Einstellungen zum Yoo!Media Interface 2.0, wie Affiliate-Id, Interface-Passwort und vieles mehr.',17); diff --git a/inc/language/de.php b/inc/language/de.php index d180136ee3..a1a99a5586 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -904,7 +904,7 @@ addMessages(array( 'ADMIN_LIST_REFERALS_NOTE' => "Änderung: Klicken Sie die Mitglieder-Id an und gelangen Sie zum Mitgliederprofil. Klicken Sie Anzahl Referals an, werden die Referals des jeweiligen Mitgliedes aufgelistet.", 'ADMIN_DELETE_NORMAL_MAIL' => "Mitglieder-Mail löschen", 'ADMIN_NORMAL_MAIL_ALREADY_DELETED' => "Mitglieder-Mail bereits gelöscht.", - 'INITIAL_RELEASE' => "Erste Alpha-Version", + 'INITIAL_RELEASE' => "Erstes Release fertiggestellt.", 'NO_UPDATE_NOTES' => "Keine Update-Hinweise gefunden.", 'MYSQL_QUERY_STRING' => "SQL-Abfragebefehl war:", 'MEMBER_NO_MAILS_IN_POOL' => "Sie haben noch keine Mailbuchungen aufgegeben! Es können somit Ihnen auch keine angezeigt werden.", diff --git a/inc/modules/admin/what-config_bonus.php b/inc/modules/admin/what-config_bonus.php index 412e177909..bfa6a2feed 100644 --- a/inc/modules/admin/what-config_bonus.php +++ b/inc/modules/admin/what-config_bonus.php @@ -104,9 +104,9 @@ if (isFormSent()) { $content['trates_list'] = $OUT; // Selection boxes - $content['login_timeout_selection'] = createTimeSelections(getConfig('login_timeout') , 'login_timeout' , 'WDh'); - $content['bonus_timeout_selection'] = createTimeSelections(getConfig('bonus_timeout') , 'bonus_timeout' , 'WDh'); - $content['wait_selection'] = createTimeSelections(getConfig('bonus_notify_wait'), 'bonus_notify_wait', 'ms' ); + $content['login_timeout_selection'] = createConfigurationTimeSelections('login_timeout' , 'WDh'); + $content['bonus_timeout_selection'] = createConfigurationTimeSelections('bonus_timeout' , 'WDh'); + $content['wait_selection'] = createConfigurationTimeSelections('bonus_notify_wait', 'ms' ); // Init Y/N selections foreach (array('active','login_yn','stats_yn','order_yn','ref_yn','click_yn','enable_notify','disable_notify','new_member_notify','include_own') as $entry) { diff --git a/inc/modules/admin/what-config_doubler.php b/inc/modules/admin/what-config_doubler.php index acb86ea6e8..6738249233 100644 --- a/inc/modules/admin/what-config_doubler.php +++ b/inc/modules/admin/what-config_doubler.php @@ -100,7 +100,7 @@ if (isFormSent()) { } // END - foreach // Timeout selection box or input box? - $content['timeout_selection'] = createTimeSelections(getConfig('doubler_timeout') , 'doubler_timeout' , 'WDh'); + $content['timeout_selection'] = createConfigurationTimeSelections('doubler_timeout', 'WDh'); // Load template loadTemplate('admin_config_doubler', false, $content); diff --git a/inc/modules/admin/what-config_holiday.php b/inc/modules/admin/what-config_holiday.php index 95e715ffd5..00d9de8032 100644 --- a/inc/modules/admin/what-config_holiday.php +++ b/inc/modules/admin/what-config_holiday.php @@ -48,7 +48,7 @@ if (isFormSent()) { adminSaveSettingsFromPostData(); } else { // Prepare constants for the template - $content['holiday_lock'] = createTimeSelections(getConfig('holiday_lock') , 'holiday_lock' , 'WDh'); + $content['holiday_lock'] = createConfigurationTimeSelections('holiday_lock', 'WDh'); // Init all entries foreach (array('holiday_mode_direct','holiday_mode_reset') as $entry) { @@ -57,7 +57,7 @@ if (isFormSent()) { // Set all entries foreach (array('holiday_mode') as $entry) { - $content[$entry . '_' . strtolower(getConfig('holiday_mode'))] = ' checked="checked"'; + $content[$entry . '_' . strtolower(getConfig($entry))] = ' checked="checked"'; } // END - if // Load form template diff --git a/inc/modules/admin/what-config_home.php b/inc/modules/admin/what-config_home.php index c025ddcbb7..5810fb04d9 100644 --- a/inc/modules/admin/what-config_home.php +++ b/inc/modules/admin/what-config_home.php @@ -45,7 +45,9 @@ addYouAreHereLink('admin', __FILE__); // Init 'sub' value $sub = ''; -if (isGetRequestParameterSet('sub')) $sub = getRequestParameter('sub'); +if (isGetRequestParameterSet('sub')) { + $sub = getRequestParameter('sub'); +} // END - if switch ($sub) { case 'settings': // Settings related to the index page @@ -61,7 +63,7 @@ switch ($sub) { $content[getConfig('index_delay')] = ' selected="selected"'; // Generate selection - $content['cookie_selection'] = createTimeSelections(getConfig('index_cookie'), 'index_cookie', 'YMWD'); + $content['cookie_selection'] = createConfigurationTimeSelections('index_cookie', 'YMWD'); // Output form loadTemplate('admin_config_home_settings', false, $content); diff --git a/inc/modules/admin/what-config_surfbar.php b/inc/modules/admin/what-config_surfbar.php index 6599a72554..f0213cd06c 100644 --- a/inc/modules/admin/what-config_surfbar.php +++ b/inc/modules/admin/what-config_surfbar.php @@ -55,13 +55,13 @@ if (isFormSent()) { } else { // Prepare content $content = array( - 'surfbar_static_time' => createTimeSelections(getConfig('surfbar_static_time') , 'surfbar_static_time' , 'ms' , 'left'), - 'surfbar_static_lock' => createTimeSelections(getConfig('surfbar_static_lock') , 'surfbar_static_lock' , 'hm' , 'left'), - 'surfbar_restart_time' => createTimeSelections(getConfig('surfbar_restart_time') , 'surfbar_restart_time' , 'ms' , 'left'), - 'surfbar_stats_reload' => createTimeSelections(getConfig('surfbar_stats_reload') , 'surfbar_stats_reload' , 'ms' , 'left'), - 'surfbar_purge_deleted' => createTimeSelections(getConfig('surfbar_purge_deleted') , 'surfbar_purge_deleted' , 'WDh', 'left'), - 'surfbar_purge_migrated' => createTimeSelections(getConfig('surfbar_purge_migrated'), 'surfbar_purge_migrated', 'WDh', 'left'), - 'surfbar_low_interval' => createTimeSelections(getConfig('surfbar_low_interval') , 'surfbar_low_interval' , 'WDh', 'left'), + 'surfbar_static_time' => createConfigurationTimeSelections('surfbar_static_time' , 'ms' , 'left'), + 'surfbar_static_lock' => createConfigurationTimeSelections('surfbar_static_lock' , 'hm' , 'left'), + 'surfbar_restart_time' => createConfigurationTimeSelections('surfbar_restart_time' , 'ms' , 'left'), + 'surfbar_stats_reload' => createConfigurationTimeSelections('surfbar_stats_reload' , 'ms' , 'left'), + 'surfbar_purge_deleted' => createConfigurationTimeSelections('surfbar_purge_deleted' , 'WDh', 'left'), + 'surfbar_purge_migrated' => createConfigurationTimeSelections('surfbar_purge_migrated', 'WDh', 'left'), + 'surfbar_low_interval' => createConfigurationTimeSelections('surfbar_low_interval' , 'WDh', 'left'), ); // Prepare further Y/N config entries diff --git a/inc/modules/admin/what-config_transfer.php b/inc/modules/admin/what-config_transfer.php index 9725e2c916..e2c85113b8 100644 --- a/inc/modules/admin/what-config_transfer.php +++ b/inc/modules/admin/what-config_transfer.php @@ -55,8 +55,8 @@ if (isFormSent()) { } // END - if // Time selection box - $content['age_selection'] = createTimeSelections(getConfig('transfer_age'), 'transfer_age', 'MWDh'); - $content['timeout_selection'] = createTimeSelections(getConfig('transfer_timeout'), 'transfer_timeout', 'MWDh'); + $content['age_selection'] = createConfigurationTimeSelections('transfer_age' , 'MWDh'); + $content['timeout_selection'] = createConfigurationTimeSelections('transfer_timeout', 'MWDh'); // Load template loadTemplate('admin_config_transfer', false, $content); diff --git a/inc/template-functions.php b/inc/template-functions.php index 597c5be930..3f28df1124 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -818,6 +818,7 @@ function generateImageOrCode ($img_code, $headerSent = true) { // Remove image from memory imagedestroy($image); } + // Create selection box or array of splitted timestamp function createTimeSelections ($timestamp, $prefix = '', $display = '', $align = 'center', $return_array=false) { // Do not continue if ONE_DAY is absend diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index ffd748ab41..81fbc2f8b0 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -2441,5 +2441,14 @@ function firstCharUpperCase ($str) { return ucfirst(strtolower($str)); } +// Shortens calls with configuration entry as first argument (the second will become obsolete in the future) +function createConfigurationTimeSelections ($configEntry, $stamps) { + // Get the configuration entry + $configValue = getConfig($configEntry); + + // Call inner method + return createTimeSelections($configValue, $configEntry, $stamps); +} + // [EOF] ?> -- 2.39.5