From b8e38719844932afed4b1ac23755a4c05b72eb99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 18 Jun 2011 02:02:46 +0000 Subject: [PATCH] Encapsulated adding configuration entries with new wrapper function addConfigAddSql() --- DOCS/TODOs.txt | 1 - DOCS/merge-exp.sh | 2 +- inc/extensions-functions.php | 13 ++++ inc/extensions/ext-active.php | 4 +- inc/extensions/ext-admins.php | 2 +- inc/extensions/ext-autopurge.php | 26 ++++---- inc/extensions/ext-beg.php | 34 +++++----- inc/extensions/ext-birthday.php | 6 +- inc/extensions/ext-bonus.php | 49 +++++++------- inc/extensions/ext-booking.php | 4 +- inc/extensions/ext-cache.php | 6 +- inc/extensions/ext-coupon.php | 5 ++ inc/extensions/ext-debug.php | 14 ++-- inc/extensions/ext-doubler.php | 38 +++++------ inc/extensions/ext-holiday.php | 8 +-- inc/extensions/ext-imprint.php | 4 +- inc/extensions/ext-logs.php | 2 +- inc/extensions/ext-maintenance.php | 2 +- inc/extensions/ext-mediadata.php | 6 +- inc/extensions/ext-menu.php | 4 +- inc/extensions/ext-newsletter.php | 12 ++-- inc/extensions/ext-nickname.php | 6 +- inc/extensions/ext-order.php | 14 ++-- inc/extensions/ext-other.php | 18 +++--- inc/extensions/ext-politician-stop.php | 2 +- inc/extensions/ext-primera.php | 12 ++-- inc/extensions/ext-refback.php | 6 +- inc/extensions/ext-register.php | 6 +- inc/extensions/ext-removeip.php | 18 +++--- inc/extensions/ext-rewrite.php | 2 +- inc/extensions/ext-sponsor.php | 4 +- inc/extensions/ext-sql_patches.php | 88 +++++++++++++------------- inc/extensions/ext-surfbar.php | 54 ++++++++-------- inc/extensions/ext-theme.php | 2 +- inc/extensions/ext-timezone.php | 4 +- inc/extensions/ext-top10.php | 6 +- inc/extensions/ext-transfer.php | 12 ++-- inc/extensions/ext-uberwach.php | 2 +- inc/extensions/ext-usage.php | 4 +- inc/extensions/ext-user.php | 10 +-- inc/extensions/ext-validator.php | 2 +- inc/extensions/ext-wernis.php | 30 ++++----- inc/extensions/ext-yoomedia.php | 24 +++---- 43 files changed, 292 insertions(+), 276 deletions(-) diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 82dedee3ba..42a64fc814 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -284,7 +284,6 @@ PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templat PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : div in templates/de/html/page_footer.tpl, line: 1 in /home PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/menu/menu_what_end.tpl, line: 1 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/menu/menu_what_end.tpl, line: 2 in -PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/admin/admin_logout_sql_patches_remove.tpl, line: 10 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : td in templates/de/html/admin/admin_main_footer.tpl, line: 1 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : tr in templates/de/html/admin/admin_main_footer.tpl, line: 2 in PHP Warning: DOMDocument::loadHTMLFile(): Unexpected end tag : table in templates/de/html/admin/admin_main_footer.tpl, line: 12 in diff --git a/DOCS/merge-exp.sh b/DOCS/merge-exp.sh index efc97a9b21..fcc04614e6 100755 --- a/DOCS/merge-exp.sh +++ b/DOCS/merge-exp.sh @@ -1,3 +1,3 @@ #!/bin/sh -svn merge --dry-run http://www.mxchange.org/repos/mailer/branches/0.2.1-FINAL-expression_language_BROKEN/ http://www.mxchange.org/repos/mailer/branches/0.2.1-FINAL . +svn merge --dry-run http://mxchange.org/repos/mailer/branches/0.2.1-FINAL-expression_language_BROKEN/ http://mxchange.org/repos/mailer/branches/0.2.1-FINAL . diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index cc85912150..cd3f0d068a 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -1883,6 +1883,18 @@ function addSponsorMenuSql ($action, $what, $title, $active, $sort) { } } +// Add configuration entry if not found for actual extension +function addConfigAddSql ($columnName, $columnSql) { + // Is the column there? + if (!isSqlTableColumnFound('{?_MYSQL_PREFIX?}_config', $columnName)) { + // Not found, so add it + addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `' . $columName . '` ' . $columnSql); + } else { + // Add debug line + logDebugMessage(__FUNCTION__, __LINE__, 'Configuration entry ' . $columnName . ' already created. columnSql=' . $columnSql); + } +} + // Enables/disables productive mode for current extension (used only while // registration). function enableExtensionProductive ($isProductive = true) { @@ -1956,5 +1968,6 @@ function isExtensionLibraryLoaded ($ext_name) { // Is it there? return ((isset($GLOBALS['ext_loaded']['library'][$ext_name])) && ($GLOBALS['ext_loaded']['library'][$ext_name] === true)); } + // [EOF] ?> diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index 6d70d9b111..7bfa767222 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -94,8 +94,8 @@ switch (getExtensionMode()) { break; case '0.0.5': // SQL queries for v0.0.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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); + 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!) setExtensionUpdateNotes("Aktiven-Liste im Gastbereich ist nun einschränkbar."); diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index d38c9135df..53996e7c99 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -95,7 +95,7 @@ switch (getExtensionMode()) { addAdminMenuSql('admins','config_admins','ACL einstellen','Richten Sie Zugriffskontrollzeilen für jeden Admin individuell ein, um ihm nur bestimmte Bereiche des Admin-Bereiches zugänglich zu machen oder zu sperren.',4); // Which is the default setting when you create a new admin login? - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD admins_default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); + addConfigAddSql('admins_default_acl', "ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); // Default is deny everything addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` ADD default_acl ENUM('deny','allow') NOT NULL DEFAULT 'deny'"); diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index a74dd0d7c9..840842d869 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -84,11 +84,11 @@ switch (getExtensionMode()) { addExtensionDependency('user'); // SQL queries - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `autopurge_inactive` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `autopurge_unconfirmed` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_inactive_since` BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_inactive_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT '25200'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_unconfirmed_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT '432000'"); + 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); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `ap_notified` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); @@ -129,17 +129,17 @@ switch (getExtensionMode()) { break; case '0.1.9': // SQL queries for v0.1.9 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `autopurge_tasks` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_tasks_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getOneDay()*7)."'"); + addConfigAddSql('autopurge_tasks', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + 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!"); break; case '0.2.0': // SQL queries for v0.2.0 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_in_notify` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_un_notify` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_tasks_notify` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('ap_in_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('ap_un_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('ap_tasks_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Mail wird bei Löschung von Aufgaben ausgesendet.

Bitte aktualisieren Sie auch die Admin-Templates!"); @@ -206,9 +206,9 @@ switch (getExtensionMode()) { break; case '0.3.3': // SQL queries for v0.3.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_del_mails` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_dm_notify` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_dm_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT '86400'"); + 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'"); // 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 00d7b78037..0a4f650bd2 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -52,9 +52,9 @@ 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); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT '600'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_userid_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00100"); + 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"); addDropTableSql('beg_ips'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_beg_ips` ( @@ -104,7 +104,7 @@ PRIMARY KEY (`id`) break; case '0.0.3': // SQL queries for v0.0.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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?})"); @@ -121,14 +121,14 @@ PRIMARY KEY (`id`) break; case '0.0.6': // SQL queries for v0.0.6 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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."); @@ -151,10 +151,10 @@ PRIMARY KEY (`id`) case '0.1.2': // SQL queries for v0.1.2 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_mode` ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_ranks` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_active` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_rallye` ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('beg_mode', "ENUM('DIRECT','REF') NOT NULL DEFAULT 'REF'"); + 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"); $visible = 'N'; $locked = 'Y'; @@ -193,11 +193,11 @@ PRIMARY KEY (`id`) break; case '0.1.7': // SQL queries for v0.1.7 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_ral_en_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_ral_di_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_new_mem_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_notify_bonus` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_notify_wait` BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); + 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"); @@ -227,7 +227,7 @@ PRIMARY KEY (`id`) break; case '0.2.2': // SQL queries for v0.2.2 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_include_own` ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('beg_include_own', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Eigene Mitglieder-Ids sind von der Bettel-Rallye nun ausschliessbar."); @@ -253,7 +253,7 @@ PRIMARY KEY (`id`) case '0.2.6': // SQL queries for v0.2.6 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_beg_ips` ADD `sid` VARCHAR(255) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `beg_pay_mode` ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;"); + addConfigAddSql('beg_pay_mode', "ENUM('IMG','JS','BOTH','NONE') DEFAULT 'NONE' NOT NULL ;"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("IP-Lock mit Session-Id erweitert. Tracker-Script eingefügt, dass das Einbinden des Bettel-Links als Bild/Script/CSS verhindern soll."); diff --git a/inc/extensions/ext-birthday.php b/inc/extensions/ext-birthday.php index 610dfb29d6..42e797914b 100644 --- a/inc/extensions/ext-birthday.php +++ b/inc/extensions/ext-birthday.php @@ -77,7 +77,7 @@ switch (getExtensionMode()) { break; case '0.2.0': // SQL queries for v0.2 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `birthday_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('birthday_points', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); addDropTableSql('user_birthday'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_birthday` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, @@ -159,8 +159,8 @@ PRIMARY KEY (`id`) break; case '0.3.6': // SQL queries for v0.3.6 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD birthday_mode ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD birthday_active ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('birthday_mode', "ENUM('DIRECT','REF') NOT NULL DEFAULT 'DIRECT'"); + addConfigAddSql('birthday_active', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Vergütungsmodus des Geburtstagsbonus einstellbar."); diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index cf900d1c47..a17b47ea88 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -128,11 +128,12 @@ PRIMARY KEY (`id`) // Add extension dependency because of the update command addExtensionDependency('sql_patches'); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `login_bonus` FLOAT(20,3) NOT NULL DEFAULT 10.000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `turbo_bonus` FLOAT(20,3) NOT NULL DEFAULT 100.000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `login_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `turbo_rates` VARCHAR(255) NOT NULL DEFAULT '50;20;10'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_ranks` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); + 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"); + // Use actual month for this update addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `login_bonus` FLOAT(20,3) NOT NULL DEFAULT 0.000"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `turbo_bonus` FLOAT(20,3) NOT NULL DEFAULT 0.000"); @@ -237,8 +238,8 @@ INDEX `userid` (`userid`) break; case '0.3.5': // SQL queries for v0.3.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_mode` ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('bonus_mode', "ENUM('UID','JACKPOT','ADD') NOT NULL DEFAULT 'ADD'"); + 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."); @@ -265,8 +266,8 @@ INDEX `userid` (`userid`) break; case '0.4.0': // SQL queries for v0.4.0 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*7).""); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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."); @@ -288,10 +289,10 @@ INDEX `userid` (`userid`) break; case '0.4.4': // SQL queries for v0.4.4 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_order` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 15.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_ref` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_stats` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT '5.00000'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_active` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + 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"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `bonus_stats` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); @@ -440,11 +441,11 @@ ORDER BY break; case '0.6.9': // SQL queries for v0.6.9 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_order_yn` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_ref_yn` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_stats_yn` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_login_yn` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_click_yn` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('bonus_order_yn', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('bonus_ref_yn', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('bonus_stats_yn', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('bonus_login_yn', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('bonus_click_yn', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Es können nun auch die folgenden Vergütungen bei der Auswertung der monatlichen Aktiv-Rallye mit berücksichtigt werden: Mailbestätigung (war vorher schon), Login-, Mailbuchung, Referal und Statistik-Bonus (100% Klickrate erreicht)."); @@ -479,11 +480,11 @@ ORDER BY break; case '0.7.7': // SQL queries for v0.7.7 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_en_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_di_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_new_mem_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_notify_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `bonus_notify_wait` BIGINT(20) UNSIGNED NOT NULL DEFAULT '30'"); + 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"); @@ -510,7 +511,7 @@ ORDER BY break; case '0.8.2': // SQL queries for v0.8.2 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD bonus_include_own ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('bonus_include_own', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` ADD `is_notify` ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index 30183f9999..7993769548 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `booking_per_page` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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 9e8986c3af..fd920a839c 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD db_hits BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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!) @@ -218,7 +218,7 @@ switch (getExtensionMode()) { break; case '0.2.3': // SQL queries for v0.2.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD cache_filter ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql("cache_filter ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Cachen von Filtern hinzugefügt."); diff --git a/inc/extensions/ext-coupon.php b/inc/extensions/ext-coupon.php index ea81554b42..8c87f9ab67 100644 --- a/inc/extensions/ext-coupon.php +++ b/inc/extensions/ext-coupon.php @@ -77,6 +77,11 @@ UNIQUE KEY (`coupon_code`) PRIMARY KEY (`id`), UNIQUE KEY `coupon_user` (`coupon_id`,`userid`) ) TYPE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Coupon->user connection'"); + + // Configuration entries + + // Admin menus + addAdminMenuSql('setup','config_coupon','Gutscheine','Allgemeine Einstellungen zu Code-Gutscheinen und Gutscheinen von Sponsoren (z.B. per API) können hier vorgenommen werden.', 15); break; case 'remove': // Do stuff when removing extension diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index 4cc55dcded..53ddff9cd0 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -129,13 +129,13 @@ PRIMARY KEY (`id`) 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT " . (getOneDay() * 30)); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{?SERVER_URL?}'"); + 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_master_url', "VARCHAR(255) NOT NULL DEFAULT '{?SERVER_URL?}'"); break; case 'remove': // Do stuff when removing extension diff --git a/inc/extensions/ext-doubler.php b/inc/extensions/ext-doubler.php index 0936e8a12d..da931e12c5 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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!) - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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) - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_jackpot ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('doubler_jackpot', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // A user account to take points from (default: 0->none) - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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! - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_send_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"); + addConfigAddSql('doubler_send_mode', "ENUM('DIRECT','RESET') NOT NULL DEFAULT 'DIRECT'"); // Timeout for entries to be purged (default: one week) - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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"); // Counter for usage of the doubler - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `doubler_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('doubler_counter', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); // // --- MENU SYSTEMS --- @@ -145,7 +145,7 @@ PRIMARY KEY (`id`) case '0.0.2': // SQL queries for v0.0.2 // Total used points - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_used FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); + addConfigAddSql("doubler_used 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."); @@ -158,7 +158,7 @@ PRIMARY KEY (`id`) case '0.0.4': // SQL queries for v0.0.4 // Shall I use the doubler's account to take points from? (Y/N, default=Y) - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql("doubler_own ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("{?POINTS?}-Guthaben des Verdopplers kann optional nicht mit einbezogen werden."); @@ -170,9 +170,9 @@ PRIMARY KEY (`id`) break; case '0.0.6': // SQL queries for v0.0.6 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_max_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_group_sent TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD doubler_sent_all ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('doubler_max_sent', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"); + addConfigAddSql('doubler_group_sent', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 1"); + addConfigAddSql('doubler_sent_all', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Gebührenabzug wird beim Einzahlen abgezogen (wurde von Auszahlung abgezogen) und maximal bei Auszahlung zu kontrollierende Accounts einstellbar.
Template admin_config_doubler_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"); diff --git a/inc/extensions/ext-holiday.php b/inc/extensions/ext-holiday.php index 19b08bf7bd..8f93dacf6b 100644 --- a/inc/extensions/ext-holiday.php +++ b/inc/extensions/ext-holiday.php @@ -61,7 +61,7 @@ PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci"); // Add default values to config - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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); @@ -156,22 +156,20 @@ PRIMARY KEY (`id`) 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"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD holiday_lock BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getOneDay()*2)."'"); + 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!"); break; case '0.1.4': // SQL queries for v0.1.4 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"); + addConfigAddSql('holiday_mode', "ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Urlaubsschaltung wird erst Abends um 00:00 Uhr aktiv und nicht durch die Beantragung. Dies kann nun auch auf direkte Umstellung eingestellt werden."); break; case '0.1.5': // SQL queries for v0.1.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD holiday_mode ENUM('DIRECT','RESET') NOT NULL DEFAULT 'RESET'"); - // Update notes (these will be set as task text!) setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); break; diff --git a/inc/extensions/ext-imprint.php b/inc/extensions/ext-imprint.php index c630720e05..74c3d1d2bb 100644 --- a/inc/extensions/ext-imprint.php +++ b/inc/extensions/ext-imprint.php @@ -61,8 +61,8 @@ switch (getExtensionMode()) { addAdminMenuSql('setup','config_imprint','Impressum','Einstellungen zum Impressum.',8); // Extend config with with entries - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `imprint_image_url` VARCHAR(255) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `imprint_image_script` VARCHAR(255) NOT NULL DEFAULT ''"); + addConfigAddSql('imprint_image_url', "VARCHAR(255) NOT NULL DEFAULT ''"); + addConfigAddSql('imprint_image_script', "VARCHAR(255) NOT NULL DEFAULT ''"); // Create imprint data table addDropTableSql('imprint_data'); diff --git a/inc/extensions/ext-logs.php b/inc/extensions/ext-logs.php index caf200950b..70b2c3eff3 100644 --- a/inc/extensions/ext-logs.php +++ b/inc/extensions/ext-logs.php @@ -50,7 +50,7 @@ switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run addAdminMenuSql('stats', 'logs', 'Aufruflogbücher', 'Verwalten Sie Ihre Aufruflogbücher mit diesem Admin-Bereich! (Derzeit nur Download!)', 8); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `logs_base` VARCHAR(255) NOT NULL DEFAULT 'logs'"); + addConfigAddSql('logs_base', "VARCHAR(255) NOT NULL DEFAULT 'logs'"); break; case 'remove': // Do stuff when removing extension diff --git a/inc/extensions/ext-maintenance.php b/inc/extensions/ext-maintenance.php index 689b719721..9a9de5df25 100644 --- a/inc/extensions/ext-maintenance.php +++ b/inc/extensions/ext-maintenance.php @@ -52,7 +52,7 @@ setExtensionAlwaysActive('Y'); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD maintenance ENUM('Y','N') NOT NULL DEFAULT 'N';"); + addConfigAddSql('maintenance', "ENUM('Y','N') NOT NULL DEFAULT 'N';"); addAdminMenuSql('setup','maintenance','Wartungsmodus','Schalten Sie den Wartungsmodus ein, nur wenn sehr schwerwiegende Fehler vorliegen, die Sie oder mxchange.org nicht schenll genug beheben können.',10); break; diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index 04aa118939..3612365add 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -124,9 +124,9 @@ PRIMARY KEY (`media_key`) break; case '0.0.7': // SQL queries for v0.0.7 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_start` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_stage` BIGINT(20) UNSIGNED NOT NULL DEFAULT '500'"); - addAdminMenuSql('setup','config_mediadata','Mediendaten','Stellen Sie allgemeine Einstellungen zu den Mediendaten ein.', 10); + 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!) setExtensionUpdateNotes("Start des {?mt_word2?} und Anzahl Anmeldungen aufgenommen. (Task #13)
diff --git a/inc/extensions/ext-menu.php b/inc/extensions/ext-menu.php index cf3d9ef09d..e923018d3e 100644 --- a/inc/extensions/ext-menu.php +++ b/inc/extensions/ext-menu.php @@ -75,8 +75,8 @@ switch (getExtensionMode()) { case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `guest_menu_advert_enabled` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `member_menu_advert_enabled` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('guest_menu_advert_enabled', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('member_menu_advert_enabled', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Insert menu entry addAdminMenuSql('menu','config_menu','Einstellungen','Einstellungen an den Gast- und Mitgliedsmenüs vornehmen.',7); diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index 56fdfda8f9..5729ed7cfb 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -184,12 +184,12 @@ PRIMARY KEY (`nl_order_id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Newsletter orders'"); // Configuration - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_expire` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay() * 7).""); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_archive_expire` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay() * 14).""); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_subject` VARCHAR(255) NOT NULL DEFAULT 'Newsletter vom {OPEN_CONFIG}CURRENT_DATE{CLOSE_CONFIG}'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_header` MEDIUMTEXT"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_default_footer` MEDIUMTEXT"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nl_archive` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + 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_archive', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Admin menu addAdminMenuSql('newsletter', 'list_newsletter', 'Newsletter Verwalten', 'Legen Sie hier einen neuen Newsletter mit Betreff und Verfallsdatum an und listen Sie bestehende auf. Die Grunddaten lassen sich hier ebenfalls ändern.', 1); diff --git a/inc/extensions/ext-nickname.php b/inc/extensions/ext-nickname.php index 84d9789f06..93ec509a3f 100644 --- a/inc/extensions/ext-nickname.php +++ b/inc/extensions/ext-nickname.php @@ -97,9 +97,9 @@ switch (getExtensionMode()) { break; case '0.0.6': // SQL queries for v0.0.6 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nickname_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nickname_pattern` VARCHAR(255) NOT NULL DEFAULT 'a-zA-Z0-9_'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `nickname_chars` VARCHAR(255) NOT NULL DEFAULT 'a-z, A-Z, 0-9, _'"); + 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); // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index a5ca009d6d..08a78deecd 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -74,7 +74,7 @@ switch (getExtensionMode()) { case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.1.0': // SQL queries for v0.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `order_max_full` ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'"); + addConfigAddSql('order_max_full', "ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'"); addAdminMenuSql('setup','config_order','Mailbuchungsseite','Einstellungen am Mailbuchungsformular.',7); // Update notes (these will be set as task text!) @@ -141,7 +141,7 @@ switch (getExtensionMode()) { break; case '0.2.3': // SQL queries for v0.2.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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"); @@ -193,8 +193,8 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us break; case '0.3.1': // SQL queries for v0.3.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'"); + addConfigAddSql('order_select', "VARCHAR(255) NOT NULL DEFAULT 'userid'"); + addConfigAddSql('order_mode', "ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Beworbene URL wird nun getestet."); @@ -292,7 +292,7 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us break; case '0.4.9': // SQL queries for v0.4.9 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'"); + addConfigAddSql('repay_deleted_mails', "ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Bei Löschung von Mailbuchungen kann nun scripteweit entschieden werden (Einstellungen also), ob die verbliebenen {?POINTS?} wieder gutgeschrieben werden sollen oder in den Jackpot landen."); @@ -316,8 +316,8 @@ INDEX (`pool_id`) case '0.5.2': // SQL queries for v0.5.2 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `test_text`"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `test_subj`"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `allow_url_in_text` ENUM('Y','N') NOT NULL DEFAULT 'N'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `allow_url_in_subject` ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('allow_url_in_text', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('allow_url_in_subject', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Inkonsistenz in Konfigurationsnamen korregiert."); diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index 4810ded0c9..fd651510e6 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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."); @@ -160,14 +160,14 @@ switch (getExtensionMode()) { break; case '0.1.6': // SQL queries for v0.1.6 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD reject_url VARCHAR(255) NOT NULL DEFAULT '{?URL?}'"); + addConfigAddSql('reject_url', "VARCHAR(255) NOT NULL DEFAULT '{?URL?}'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Bei Ablehnung der URL wird jetzt endlich eine Standard-URL eingesetzt, die konfigurierbar ist. Fehler beim Laden der Konfiguration gefunden."); break; case '0.1.7': // SQL queries for v0.1.7 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD currency VARCHAR(255) NOT NULL DEFAULT '€'"); + addConfigAddSql('currency', "VARCHAR(255) NOT NULL DEFAULT '€'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Standard-Währung der Gebühren für alle Erweiterungen geltend hinzugefügt."); @@ -179,7 +179,7 @@ switch (getExtensionMode()) { break; case '0.1.9': // SQL queries for v0.1.9 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD mailid_error_redirect ENUM('index','reject') NOT NULL DEFAULT 'index'"); + addConfigAddSql('mailid_error_redirect', "ENUM('index','reject') NOT NULL DEFAULT 'index'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Bei fehlerhafter Mail während der Bestätigung kann wahlweise zur Hauptseite weitergeleitet oder auf die eingestellte Ablehnungsseite umgeleitet werden."); @@ -193,21 +193,21 @@ switch (getExtensionMode()) { break; case '0.2.1': // SQL queries for v0.2.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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."); break; case '0.2.2': // SQL queries for v0.2.2 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `display_debug_sqls` ENUM('N','Y') NOT NULL DEFAULT 'N'"); + addConfigAddSql('display_debug_sqls', "ENUM('N','Y') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("(Fast) alle SQL-Abfragen lassen sich nun zu Debugging-Zwecken (!) einschalten. Nur der Administrator sieht diese unten am Ende der Seite."); break; case '0.2.3': // SQL queries for v0.2.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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,14 +222,14 @@ switch (getExtensionMode()) { break; case '0.2.5': // SQL queries for v0.2.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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."); break; case '0.2.6': // SQL queries for v0.2.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `stats_enabled` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('stats_enabled', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Interne Statistiken sind nun abschaltbar (kann Performance bringen)."); diff --git a/inc/extensions/ext-politician-stop.php b/inc/extensions/ext-politician-stop.php index 761f8ae01a..1c75c2c0d7 100644 --- a/inc/extensions/ext-politician-stop.php +++ b/inc/extensions/ext-politician-stop.php @@ -49,7 +49,7 @@ setExtensionVersionHistory(array('0.0')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `politician_stop_backlink` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('politician_stop_backlink', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addAdminMenuSql('config','config_politician_stop','Politiker-Stopp-Aktion','Einstellungen zur Satire-Aktion "Politiker-Stopp - Jetzt wird zurück zensiert."', 7); // Register filter diff --git a/inc/extensions/ext-primera.php b/inc/extensions/ext-primera.php index 3ed6b0750c..b76c24c6f7 100644 --- a/inc/extensions/ext-primera.php +++ b/inc/extensions/ext-primera.php @@ -68,12 +68,12 @@ KEY (`userid`), PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Transfers in Primera'"); - // Confiuration - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `primera_min_payout` BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `primera_min_withdraw` BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `primera_api_name` VARCHAR(255) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `primera_api_md5` VARCHAR(32) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `primera_refid` VARCHAR(255) NOT NULL DEFAULT ''"); + // 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_api_name', "VARCHAR(255) NOT NULL DEFAULT ''"); + addConfigAddSql('primera_api_md5', "VARCHAR(32) NOT NULL DEFAULT ''"); + addConfigAddSql('primera_refid', "VARCHAR(255) NOT NULL DEFAULT ''"); // User data addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `primera_nickname` VARCHAR(255) NOT NULL DEFAULT ''"); diff --git a/inc/extensions/ext-refback.php b/inc/extensions/ext-refback.php index aa555d790f..e8584fa90e 100644 --- a/inc/extensions/ext-refback.php +++ b/inc/extensions/ext-refback.php @@ -89,9 +89,9 @@ KEY (`refid`) case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `refback_enabled` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `refback_min_perc` TINYINT(3) NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `refback_max_perc` TINYINT(3) NOT NULL DEFAULT 100"); + 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"); 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-register.php b/inc/extensions/ext-register.php index 22423fc6db..be486be914 100644 --- a/inc/extensions/ext-register.php +++ b/inc/extensions/ext-register.php @@ -260,7 +260,7 @@ PRIMARY KEY (`id`) break; case '0.4.2': // SQL queries for v0.4.2 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD register_default ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('register_default', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Bei der Anmeldung kann die Standard-Auswahl zwischen Ja/Nein umgeschaltet werden. Das Ändern des Templates templates/".getLanguage()."/html/guest/guest_register.tpl ist nicht mehr nötig."); @@ -331,14 +331,14 @@ PRIMARY KEY (`id`) break; case '0.5.4': // SQL queries for v0.5.4 - addAdminMenuSql('setup','config_register2','Anmeldeformular','Stellen Sie ein, wie viel Kategorien der Gast bei der Anmeldung mindestens einstellen muss. Diese Einstellung gilt nachher auch im Mitgliedsbereich!',8); + addAdminMenuSql('setup', 'config_register2', 'Anmeldeformular', 'Stellen Sie ein, wie viel Kategorien der Gast bei der Anmeldung mindestens einstellen muss. Diese Einstellung gilt nachher auch im Mitgliedsbereich!', 8); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Weiteren Menüpunkt aus menu-{?DEFAULT_LANG?} heraus geholt."); break; case '0.5.5': // SQL queries for v0.5.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `register_generate_password_empty` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('register_generate_password_empty', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Weiteren Menüpunkt aus menu-{?DEFAULT_LANG?} heraus geholt."); diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index f24cfb3089..e91ed60db6 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -49,15 +49,15 @@ setExtensionVersionHistory(array('0.0', '0.0.1')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_anon_ip` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_anon_host` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_anon_ua` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_anon_ref` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_admin_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_guest_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_member_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `removeip_sponsor_show` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `anonymous_ip` ENUM('LOCAL','ZERO','RANDOM') NOT NULL DEFAULT 'LOCAL'"); + addConfigAddSql('removeip_anon_ip', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('removeip_anon_host', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('removeip_anon_ua', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('removeip_anon_ref', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('removeip_admin_show', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('removeip_guest_show', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('removeip_member_show', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('removeip_sponsor_show', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('anonymous_ip', "ENUM('LOCAL','ZERO','RANDOM') NOT NULL DEFAULT 'LOCAL'"); addAdminMenuSql('setup','config_removeip','Anonymität/Privatsphähre','Stellen Sie hier ein, ob die IP-Nummer, User-Agent und/oder Referer-Adresse anonymisiert im gesamten Script verwendet werden soll.',15); break; diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php index d8939998a7..3f0078e5a1 100644 --- a/inc/extensions/ext-rewrite.php +++ b/inc/extensions/ext-rewrite.php @@ -124,7 +124,7 @@ switch (getExtensionMode()) { break; case '0.0.9': // SQL queries for v0.0.9 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD rewrite_skip VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'"); + addConfigAddSql('rewrite_skip', "VARCHAR(255) NOT NULL DEFAULT 'login:admin:frametester:mailid'"); addAdminMenuSql('setup','config_rewrite','Rewrite-Engine','Stellen Sie hier ein, welche Module übersprungen werden sollen, in denen also kein Umschreiben des HTML-Codes stattfinden soll.', 8); // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index 70f096cd4a..ea912b947c 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -370,8 +370,8 @@ PRIMARY KEY (`id`) // // General configuration stuff // - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `sponsor_ref_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 100.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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 53988a2bf7..51d6045a02 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -108,7 +108,7 @@ switch (getExtensionMode()) { case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ext_autopurge` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('ext_autopurge', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addAdminMenuSql('setup','config_extensions','Erweitungsmanagement','Alle Einstellungen am Erweiterungsmanagement.', 10); // Update notes (these will be set as task text!) @@ -123,21 +123,21 @@ switch (getExtensionMode()) { break; case '0.0.3': // SQL queries for v0.0.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `points_word` VARCHAR(255) NOT NULL DEFAULT 'Punkte'"); + addConfigAddSql('points_word', "VARCHAR(255) NOT NULL DEFAULT 'Punkte'"); // 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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."); break; case '0.0.5': // SQL queries for v0.0.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `index_home` VARCHAR(255) NOT NULL DEFAULT 'welcome'"); + addConfigAddSql('index_home', "VARCHAR(255) NOT NULL DEFAULT 'welcome'"); addAdminMenuSql('setup','config_home','Home-Seite festlegen','Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standard) als Einstiegspunkt in das Menüsystem genutzt werden soll.', 5); // Update notes (these will be set as task text!) @@ -152,14 +152,14 @@ switch (getExtensionMode()) { break; case '0.0.7': // SQL queries for v0.0.7 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `verbose_sql` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('verbose_sql', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Die SQL-Anweisungen werden bei eingeschalteter Verbose-Funktion detailiert angezeigt."); break; case '0.0.8': // SQL queries for v0.0.8 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `menu_blur_spacer` VARCHAR(255) NOT NULL DEFAULT ' · '"); + addConfigAddSql('menu_blur_spacer', "VARCHAR(255) NOT NULL DEFAULT ' · '"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Nette Mouse-Hover-Effekte eingebaut (Anleitung MENUE_HOVER.txt zum Patchen der general.css bitte lesen!)"); @@ -173,7 +173,7 @@ switch (getExtensionMode()) { break; case '0.1.0': // SQL queries for v0.2.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `reg_points_mode` ENUM('ref','direct') NOT NULL DEFAULT 'ref'"); + addConfigAddSql('reg_points_mode', "ENUM('ref','direct') NOT NULL DEFAULT 'ref'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Soll der einmalige Ref-Bonus über das Referal-System (also alle oberen Refs bekommen auch etwas davon ab) oder direkt dem Werber aufgebucht werden?"); @@ -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"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `index_delay` TINYINT(3) NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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,14 +190,14 @@ 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); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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.)"); break; case '0.1.3': // SQL queries for v0.1.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD refid_target ENUM('register','index') NOT NULL DEFAULT 'register'"); + addConfigAddSql("refid_target ENUM('register','index') NOT NULL DEFAULT 'register'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Auf welche Seite soll der Ref-Link zeigen? Eingangsseite oder Anmeldeformular?"); @@ -216,12 +216,12 @@ switch (getExtensionMode()) { break; case '0.1.6': // SQL queries for v0.1.6 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `enable_title_deco` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `title_left` VARCHAR(10) NOT NULL DEFAULT '[--'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `title_middle` VARCHAR(10) NOT NULL DEFAULT '-'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `title_right` VARCHAR(10) NOT NULL DEFAULT '--]'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `enable_mod_title` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `enable_what_title` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('enable_title_deco', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('title_left', "VARCHAR(10) NOT NULL DEFAULT '[--'"); + addConfigAddSql('title_middle', "VARCHAR(10) NOT NULL DEFAULT '-'"); + addConfigAddSql('title_right', "VARCHAR(10) NOT NULL DEFAULT '--]'"); + addConfigAddSql('enable_mod_title', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('enable_what_title', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addAdminMenuSql('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8); // Update notes (these will be set as task text!) @@ -254,7 +254,7 @@ switch (getExtensionMode()) { break; case '0.2.1': // SQL queries for v0.2.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `css_php` ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'"); + addConfigAddSql('css_php', "ENUM('DIRECT','FILE') NOT NULL DEFAULT 'FILE'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden."); @@ -266,9 +266,9 @@ switch (getExtensionMode()) { break; case '0.2.3': // SQL queries for v0.2.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `guest_menu` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `member_menu` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `youre_here` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('guest_menu', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('member_menu', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('youre_here', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Gast- und Mitgliedsmenüs lassen sich getrennt voneinander abschalten."); @@ -283,7 +283,7 @@ switch (getExtensionMode()) { // Switch to JPEG format $auto_type = 'jpg'; } // END - if - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `img_type` ENUM('jpg','png') NOT NULL DEFAULT '" . $auto_type . "'"); + addConfigAddSql('img_type', "ENUM('jpg','png') NOT NULL DEFAULT '" . $auto_type . "'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion imagecreatefromjpeg() und das JPEG-Bild vorhanden sind oder nicht."); @@ -302,7 +302,7 @@ switch (getExtensionMode()) { break; case '0.2.7': // SQL queries for v0.2.7 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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!) @@ -318,9 +318,9 @@ switch (getExtensionMode()) { break; case '0.2.9': // SQL queries for v0.2.9 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_word` VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_word2` VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `mt_word3` VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'"); + addConfigAddSql('mt_word', "VARCHAR(255) NOT NULL DEFAULT 'Mailtausch'"); + addConfigAddSql('mt_word2', "VARCHAR(255) NOT NULL DEFAULT 'Mailtausches'"); + addConfigAddSql('mt_word3', "VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Wörter {?mt_word?}, {?mt_word2?} und {?mt_word3?} sind austauschbar."); @@ -393,7 +393,7 @@ INDEX (`la_posy`), PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci"); // Which menu do you like? - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `admin_menu` ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'"); + addConfigAddSql('admin_menu', "ENUM('NEW','OLD') NOT NULL DEFAULT 'OLD'"); // Insert menus addAdminMenuSql('setup','config_admin','Adminmenü','Diverse Einstellungen am Adminmenü vornehmen.', 9); @@ -404,7 +404,7 @@ PRIMARY KEY (`id`) case '0.3.3': // SQL queries for v0.3.3 // Switch of the "intelligent menu sorter" when you want to have a fixed menu structure... - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `admin_menu_sorter` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('admin_menu_sorter', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // The statistics table addDropTableSql('admin_menu_stats'); @@ -441,12 +441,12 @@ PRIMARY KEY (`id`) break; case '0.3.6': // SQL queries for v0.3.6 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `salt_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `pass_scramble` VARCHAR(255) NOT NULL DEFAULT ''"); + 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 ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `rand_no` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `file_hash` VARCHAR(255) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `master_salt` VARCHAR(255) NOT NULL DEFAULT ''"); + 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"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_mod_reg` ADD `has_menu` ENUM('Y','N') NOT NULL DEFAULT 'N'"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `has_menu`='Y' WHERE `module`='admin' OR `module`='index' OR `module`='login' LIMIT 3"); @@ -480,7 +480,7 @@ PRIMARY KEY (`id`) break; case '0.4.1': // SQL queries for v0.4.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `show_timings` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('show_timings', "ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Tabellen-Schlüssel neu gesetzt und Parsing-Zeit im Footer eingeblendet."); @@ -492,10 +492,10 @@ PRIMARY KEY (`id`) break; case '0.4.3': // SQL queries for v0.4.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `proxy_host` VARCHAR(255) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `proxy_port` INT(5) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `proxy_username` VARCHAR(255) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `proxy_password` VARCHAR(255) NOT NULL DEFAULT ''"); + addConfigAddSql('proxy_host', "VARCHAR(255) NOT NULL DEFAULT ''"); + 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); // Update notes (these will be set as task text!) @@ -518,8 +518,8 @@ PRIMARY KEY (`id`) break; case '0.4.5': // SQL queries for v0.4.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `last_month` CHAR(2) NOT NULL DEFAULT '00'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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."); @@ -571,7 +571,7 @@ PRIMARY KEY (`id`) break; case '0.5.3': // SQL queries for v0.5.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `session_save_path` VARCHAR(255) NOT NULL DEFAULT ''"); + addConfigAddSql('session_save_path', "VARCHAR(255) NOT NULL DEFAULT ''"); addAdminMenuSql('setup','config_session','Session-Einstellungen','Ändern Sie hier den Speicherpfad für Sessiondateien (Sitzungsdateien) ab, falls die Standard-Einstellung bei Ihrem Hoster zu Problem führen sollte.', 16); // Update notes (these will be set as task text!) @@ -589,7 +589,7 @@ PRIMARY KEY (`id`) break; case '0.5.5': // SQL queries for v0.5.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `show_points_unconfirmed` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('show_points_unconfirmed', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Anzeige der {?POINTS?} unter den unbestätigten Mails kann nun optional abgeschaltet werden."); @@ -632,7 +632,7 @@ PRIMARY KEY (`filter_id`) break; case '0.6.0': // SQL queries for v0.6.0 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'"); + addConfigAddSql('update_filter_usage', "ENUM('N','Y') NOT NULL DEFAULT 'N'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Benutzungsstatistik eingebaut. Das Zählen der Filterverwendungen sollte ausschliesslich zu Debugging-Zwecken eingesetzt werden."); @@ -764,7 +764,7 @@ INDEX (`ip`) break; case '0.7.5': // SQL queries for v0.7.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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)."); diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index 8fe248f89f..131726809c 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -146,33 +146,33 @@ UNIQUE KEY `status_action` (`actions_status`,`actions_action`) addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_surfbar_actions` (`actions_status`,`actions_action`,`actions_new_status`) VALUES ('MIGRATED','BOOKNOW','PENDING')"); // Config entries - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_pay_model` ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_static_reward` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_static_costs` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_static_time` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_static_lock` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5).""); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_dynamic_percent` FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_max_order` INT(7) UNSIGNED NOT NULL DEFAULT 10"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_restart_time` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6).""); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_autostart` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_migrate_urls` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_total_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_daily_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_yester_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_weekly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_monthly_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_stats_reload` BIGINT(20) UNSIGNED NOT NULL DEFAULT 30"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_purge_deleted` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*7).""); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_purge_migrated` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*3).""); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_pause_mode` ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_pause_url` VARCHAR(255) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_notify_limits` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_notify_admin_unlock` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_warn_low_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_low_interval` BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_migrate_order` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_notification_mode` ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `surfbar_guest_login_form` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('surfbar_pay_model', "ENUM('STATIC','DYNAMIC') NOT NULL DEFAULT 'STATIC'"); + addConfigAddSql('surfbar_static_reward', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.25000"); + addConfigAddSql('surfbar_static_costs', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); + addConfigAddSql('surfbar_static_time', "SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); + addConfigAddSql('surfbar_static_lock', "SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(60*5).""); + addConfigAddSql('surfbar_dynamic_percent', "FLOAT(10,5) UNSIGNED NOT NULL DEFAULT 10.00000"); + addConfigAddSql('surfbar_max_order', "INT(7) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('surfbar_restart_time', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(60*6).""); + addConfigAddSql('surfbar_autostart', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('surfbar_migrate_urls', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('surfbar_total_counter', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('surfbar_daily_counter', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('surfbar_yester_counter', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('surfbar_weekly_counter', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('surfbar_monthly_counter', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addConfigAddSql('surfbar_stats_reload', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 30"); + addConfigAddSql('surfbar_purge_deleted', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*7).""); + addConfigAddSql('surfbar_purge_migrated', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*3).""); + addConfigAddSql('surfbar_pause_mode', "ENUM('INTERNAL','EXERNAL') NOT NULL DEFAULT 'INTERNAL'"); + addConfigAddSql('surfbar_pause_url', "VARCHAR(255) NOT NULL DEFAULT ''"); + addConfigAddSql('surfbar_notify_limits', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('surfbar_notify_admin_unlock', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('surfbar_warn_low_points', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); + addConfigAddSql('surfbar_low_interval', "BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}"); + addConfigAddSql('surfbar_migrate_order', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('surfbar_notification_mode', "ENUM('INSTANT','RESET') NOT NULL DEFAULT 'INSTANT'"); + addConfigAddSql('surfbar_guest_login_form', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Extend user data addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `surfbar_low_notified` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"); diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index 804702168f..6f09b59a7d 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -155,7 +155,7 @@ INDEX (`theme_active`) case '0.0.9': // SQL queries for v0.0.9 // Config SQL - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `default_theme` VARCHAR(255) NOT NULL DEFAULT 'default'"); + addConfigAddSql('default_theme', "VARCHAR(255) NOT NULL DEFAULT 'default'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Fehlende Konfiguration hinzugefügt."); diff --git a/inc/extensions/ext-timezone.php b/inc/extensions/ext-timezone.php index db54b282bb..fa25ccf847 100644 --- a/inc/extensions/ext-timezone.php +++ b/inc/extensions/ext-timezone.php @@ -51,8 +51,8 @@ setExtensionAlwaysActive('Y'); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `timezone` VARCHAR(255) NOT NULL DEFAULT 'Europe/Berlin'"); - addAdminMenuSql('setup','config_timezone','Zeitzone','Einstellungen an der Zeitzone können hier konfiguriert werden.',10); + addConfigAddSql('timezone', "VARCHAR(255) NOT NULL DEFAULT 'Europe/Berlin'"); + addAdminMenuSql('setup', 'config_timezone', 'Zeitzone', 'Einstellungen an der Zeitzone können hier konfiguriert werden.', 10); // Register filter registerFilter('init', 'INIT_TIMEZONE', false, true, isExtensionDryRun()); diff --git a/inc/extensions/ext-top10.php b/inc/extensions/ext-top10.php index 335801b1c6..db0913f2a8 100644 --- a/inc/extensions/ext-top10.php +++ b/inc/extensions/ext-top10.php @@ -51,13 +51,13 @@ 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); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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 // SQL commands to run - addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='top10'"); - addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_top10'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='top10' LIMIT 1"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_top10' LIMIT 1"); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index bfa708f1cc..9686b0d0b3 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_max` BIGINT(20) UNSIGNED NOT NULL DEFAULT 50"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_age` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay()*28)); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT {?ONE_DAY?}"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `transfer_balance` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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'"); @@ -135,7 +135,7 @@ PRIMARY KEY (`id`) break; case '0.0.5': // SQL queries for v0.0.5 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('ap_transfer', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Link Auflisten im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!"); diff --git a/inc/extensions/ext-uberwach.php b/inc/extensions/ext-uberwach.php index 81df8f7a94..a605356c9a 100644 --- a/inc/extensions/ext-uberwach.php +++ b/inc/extensions/ext-uberwach.php @@ -77,7 +77,7 @@ switch (getExtensionMode()) { break; case '0.0.2': // SQL queries for v0.0.2 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `uberwach_backlink` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('uberwach_backlink', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addAdminMenuSql('config','config_uberwach','Überwach!-Aktion','Einstellungen zur Aktion "Überwach!"', 7); break; } // END - switch diff --git a/inc/extensions/ext-usage.php b/inc/extensions/ext-usage.php index fefa70eed2..78fddd176d 100644 --- a/inc/extensions/ext-usage.php +++ b/inc/extensions/ext-usage.php @@ -49,8 +49,8 @@ setExtensionVersionHistory(array('0.0')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addAdminMenuSql('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'"); + addAdminMenuSql('stats', 'usage', 'Aufrufstatistik', 'Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)', 9); + addConfigAddSql('usage_base', "VARCHAR(255) NOT NULL DEFAULT 'usage'"); break; case 'remove': // Do stuff when removing extension diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 5b7e23fcb6..06b6068413 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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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!) @@ -334,8 +334,8 @@ INDEX (`stats_type`) break; case '0.3.4': // SQL queries for v0.3.4 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10"); + addConfigAddSql('select_user_zero_refid', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + 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'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_del` ( diff --git a/inc/extensions/ext-validator.php b/inc/extensions/ext-validator.php index 97acde1424..ab41c37048 100644 --- a/inc/extensions/ext-validator.php +++ b/inc/extensions/ext-validator.php @@ -49,7 +49,7 @@ setExtensionVersionHistory(array('0.0')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `enable_validator` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('enable_validator', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addAdminMenuSql('setup','config_validator','Validierer','Schalten Sie die Validierer-Links ein, um die Gültigkeit Ihres HTML- oder CSS-Codes zu überprüfen.', 10); break; diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index 4a901fde25..cbd6d61f31 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -64,11 +64,11 @@ PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci"); // Confiuration - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"); + 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/'"); // User data addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''"); @@ -108,28 +108,28 @@ PRIMARY KEY (`id`) case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_active` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_active` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_factor` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_factor` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_fee_percent` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_fee_percent` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_fee_fix` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_fee_fix` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + 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"); // 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."); break; case '0.0.2': // SQL queries for v0.0.2 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_pass_md5` VARCHAR(32) NOT NULL DEFAULT ''"); + addConfigAddSql('wernis_pass_md5', "VARCHAR(32) NOT NULL DEFAULT ''"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("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 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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 bfa56d6eed..33fdc927be 100644 --- a/inc/extensions/ext-yoomedia.php +++ b/inc/extensions/ext-yoomedia.php @@ -56,20 +56,20 @@ setExtensionAlwaysActive('Y'); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_sid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_passwd` VARCHAR(255) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_erotic_allowed` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_tm_max_reload` SMALLINT(6) UNSIGNED NOT NULL DEFAULT ".(24 * 8).""); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_tm_min_wait` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 60"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_tm_clicks_remain` INT(7) UNSIGNED NOT NULL DEFAULT 1000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_tm_min_pay` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_requests_total` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `yoomedia_requests_remain` SMALLINT(6) UNSIGNED NOT NULL DEFAULT 200"); + 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"); // 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); - addAdminMenuSql('email','list_yoomedia_tm','Yoo!Media Textmails','Listet Textmail-Buchungen über das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10); + 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); + addAdminMenuSql('email', 'list_yoomedia_tm', 'Yoo!Media Textmails','Listet Textmail-Buchungen über das Interface 2.0 von Yoo!Media nach Ihren eingestellten Kriterien auf. Vorsicht: Jede Aktualisierung dieser Liste kostet Ihnen eine Abfrage!',10); // Reload lock table addDropTableSql('yoomedia_reload'); -- 2.39.5