From 00790481119eefa7a54a8dda1cb191fdf4f29226 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 23 Jan 2013 01:10:11 +0000 Subject: [PATCH] More rewrites to configuration: - Moved more configuration entries from tables.sql to proper extensions - Moved some configuration from/to ext-other to/from ext-foo - Swapped out 'update' step for ext-register - TODOs.txt updated --- .gitattributes | 2 + DOCS/TODOs.txt | 20 +- inc/extensions/ext-autopurge.php | 12 +- inc/extensions/ext-order.php | 4 +- inc/extensions/ext-other.php | 13 +- inc/extensions/ext-profile.php | 2 + inc/extensions/ext-register.php | 286 +-------------- inc/extensions/order/mode-update.php | 14 +- inc/extensions/register/.htaccess | 1 + inc/extensions/register/mode-update.php | 337 ++++++++++++++++++ inc/extensions/sql_patches/mode-update.php | 9 +- inc/extensions/user/mode-setup.php | 3 + inc/filters.php | 4 +- inc/language/de.php | 1 - inc/language/order_de.php | 1 + inc/language/other_de.php | 3 +- inc/language/register_de.php | 1 - inc/libs/order_functions.php | 60 ++++ inc/libs/other_functions.php | 48 +++ inc/libs/register_functions.php | 27 +- inc/modules/admin/what-config_autopurge.php | 12 - inc/modules/admin/what-config_other.php | 3 - inc/modules/admin/what-config_register2.php | 6 +- inc/modules/admin/what-config_title.php | 7 +- inc/modules/guest/action-online.php | 2 +- inc/modules/member/what-mydata.php | 2 +- inc/modules/member/what-order.php | 15 +- inc/modules/order.php | 4 +- inc/pool/pool-bonus.php | 4 +- inc/pool/pool-user.php | 10 +- inc/wrapper-functions.php | 62 +--- install/tables.sql | 14 - .../de/html/admin/admin_config_autopurge.tpl | 16 +- .../de/html/admin/admin_config_order.tpl | 15 +- .../de/html/admin/admin_config_other.tpl | 22 +- .../de/html/admin/admin_config_register2.tpl | 16 +- .../de/html/admin/admin_config_title.tpl | 6 +- 37 files changed, 594 insertions(+), 470 deletions(-) create mode 100644 inc/extensions/register/.htaccess create mode 100644 inc/extensions/register/mode-update.php diff --git a/.gitattributes b/.gitattributes index 5bfeb9730b..58b7ba4876 100644 --- a/.gitattributes +++ b/.gitattributes @@ -252,6 +252,8 @@ inc/extensions/network/.htaccess svneol=native#text/plain inc/extensions/network/mode-setup.php svneol=native#text/plain inc/extensions/order/.htaccess svneol=native#text/plain inc/extensions/order/mode-update.php svneol=native#text/plain +inc/extensions/register/.htaccess svneol=native#text/plain +inc/extensions/register/mode-update.php svneol=native#text/plain inc/extensions/sponsor/.htaccess svneol=native#text/plain inc/extensions/sponsor/mode-setup.php svneol=native#text/plain inc/extensions/sql_patches/.htaccess svneol=native#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index cc00330e31..265b12d242 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -59,6 +59,7 @@ ./inc/extensions/network/mode-setup.php:48: * @TODO Yoo!Media: What is LayerAd compared to Layer click? * ./inc/extensions/network/mode-setup.php:94:// @TODO network_type_handler is an internal name and needs documentation ./inc/extensions/order/mode-update.php:43:// @TODO Remove double-tab from all lines +./inc/extensions/register/mode-update.php:43:// @TODO Remove double tabs from all lines ./inc/extensions/sponsor/mode-setup.php:43:// @TODO Remove double tabs from all lines ./inc/extensions/sql_patches/mode-update.php:43:// @TODO Remove double tabs from all lines ./inc/extensions/user/mode-update.php:43:// @TODO Remove double tabs from all lines @@ -79,14 +80,14 @@ ./inc/header.php:66:// @TODO Find a way to not use direct module comparison ./inc/install-functions.php:446: // @TODO Comparing with DEFAULT_MAIN_TITLE doesn't work ./inc/install-functions.php:97: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); -./inc/language/de.php:1162: // @TODO Rewrite these two constants -./inc/language/de.php:1178: // @TODO Rewrite these three constants +./inc/language/de.php:1161: // @TODO Rewrite these two constants +./inc/language/de.php:1177: // @TODO Rewrite these three constants ./inc/language/de.php:46: // @TODO Please sort these language elements -./inc/language/de.php:749:// @TODO Are these constants longer used? +./inc/language/de.php:748:// @TODO Are these constants longer used? ./inc/language-functions.php:254: // @TODO These are all valid languages, again hard-coded ./inc/language/install_de.php:142: // @TODO Move this to e.g. ext-smtp ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no * -./inc/language/order_de.php:70: // @TODO Find better text +./inc/language/order_de.php:71: // @TODO Find better text ./inc/language/rallye_de.php:13: * @TODO Naming convention not applied for language strings * ./inc/language/refback_de.php:51: // @TODO Rewrite these constants to one ./inc/libs/admins_functions.php:537: // @TODO This can be, somehow, rewritten @@ -190,7 +191,8 @@ ./inc/modules/member/what-logout.php:17: * @TODO Rewrite the code to a filter * ./inc/modules/member/what-logout.php:52: // @TODO Move this in a filter, e.g. member_logout ./inc/modules/member/what-mydata.php:82: // @TODO Move this to a function (for better EL code) -./inc/modules/member/what-order.php:463: // @TODO Rewrite this to a filter +./inc/modules/member/what-order.php:464: // @TODO Rewrite this to a filter +./inc/modules/member/what-order.php:72: // @TODO Try to move out url_tlock to a filter for extra SQL statements ./inc/modules/member/what-payout.php:208: // @TODO Rewrite this to a filter ./inc/modules/member/what-points.php:61:// @TODO Should we rewrite this to a filter? ./inc/modules/member/what-rallyes.php:99: // @TODO Reactivate this: $content['admin'] = '' . $content['login'] . ''; @@ -215,13 +217,13 @@ ./inc/template-functions.php:1103: // @TODO Deprecate this thing ./inc/template-functions.php:1114: // @TODO Deprecate this thing ./inc/template-functions.php:1236: // @TODO This can be easily moved out after the merge from EL branch to this is complete -./inc/template-functions.php:1285: // @TODO Add a little more infos here -./inc/template-functions.php:1666:// @TODO Lame description for this function -./inc/template-functions.php:1688: // @TODO Move this in a filter +./inc/template-functions.php:1291: // @TODO Add a little more infos here +./inc/template-functions.php:1672:// @TODO Lame description for this function +./inc/template-functions.php:1694: // @TODO Move this in a filter ./inc/template-functions.php:209: * @TODO On some pages this is buggy ./inc/template-functions.php:298: // @TODO Remove these sanity checks if all is fine ./inc/template-functions.php:747: // @TODO $userid is deprecated and should be removed from loadEmailTemplate() and replaced with $content[userid] in all templates -./inc/wrapper-functions.php:3275: // @TODO Find a way to not use direct module comparison +./inc/wrapper-functions.php:3215: // @TODO Find a way to not use direct module comparison ./inc/wrapper-functions.php:566:// @TODO Do some more sanity check here ./inc/xml-functions.php:240: // @TODO Handle characters ./mailid.php:123: // @TODO Rewrite this to a filter/function diff --git a/inc/extensions/ext-autopurge.php b/inc/extensions/ext-autopurge.php index 8dba5bf256..317f1c7e1c 100644 --- a/inc/extensions/ext-autopurge.php +++ b/inc/extensions/ext-autopurge.php @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.4.1'); +setThisExtensionVersion('0.4.2'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1')); +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2')); // Keep this extension always active! setExtensionAlwaysActive('Y'); @@ -263,6 +263,14 @@ switch (getExtensionMode()) { // Update notes setExtensionUpdateNotes("Rückschriften bei Auto-Löschungen werden nun über die Tabelle {OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data verwaltet."); break; + + case '0.4.2': // SQL queries for v0.4.2 + addConfigAddSql('auto_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay()*14)); + addConfigAddSql('auto_purge_active', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + + // Update notes + setExtensionUpdateNotes("Konfiguration in diese Erweiterung verschoben."); + break; } // END - switch break; diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 77f9ac1016..afb7dae362 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.5.8'); +setThisExtensionVersion('0.5.9'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8')); +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9')); switch (getExtensionMode()) { case 'setup': // Do stuff when installation is running diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index 7e3ebc7514..a1c93e3416 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.2.9'); +setThisExtensionVersion('0.3.0'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9')); +setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0')); // Keep this extension always active! setExtensionAlwaysActive('Y'); @@ -255,6 +255,15 @@ switch (getExtensionMode()) { // Update notes (these will be set as task text!) setExtensionUpdateNotes("Anzahl Zeichen für wordwrap()-Aufruf hinzugefügt."); break; + + case '0.3.0': // SQL queries for v0.3.0 + addConfigAddSql('check_double_email', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('admin_notify', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('activate_xchange', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 100'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Konfiguration aus allgemeiner tables.sql zu dieser Erweiterung verschoben."); + break; } // END - switch break; diff --git a/inc/extensions/ext-profile.php b/inc/extensions/ext-profile.php index 614a19a993..dbffdddf9b 100644 --- a/inc/extensions/ext-profile.php +++ b/inc/extensions/ext-profile.php @@ -118,7 +118,9 @@ switch (getExtensionMode()) { // Add config SQLs addConfigAddSql('profile_update', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 15768000'); addConfigChangeSql('send_prof_update', 'send_profile_update', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('send_prof_update', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); addConfigAddSql('resend_profile_update', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 172800'); + addConfigAddSql('profile_lock', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400'); // Admin menu addAdminMenuSql('setup','config_profile','Mitgliedsprofile','Einstellungen für Mitgliedprofile.',14); diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php index e99a6fd926..9282339313 100644 --- a/inc/extensions/ext-register.php +++ b/inc/extensions/ext-register.php @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.5.7'); +setThisExtensionVersion('0.5.8'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7')); +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8')); switch (getExtensionMode()) { case 'setup': // Do stuff when installation is running @@ -79,288 +79,6 @@ switch (getExtensionMode()) { break; case 'update': // Update an extension - switch (getCurrentExtensionVersion()) { - case '0.1.0': // SQL queries for v0.1.0 - addDropTableSql('must_register'); - addCreateTableSql('must_register', " -`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`field_name` VARCHAR(255) NOT NULL DEFAULT '', -`field_required` ENUM('Y','N') NOT NULL DEFAULT 'Y', -PRIMARY KEY (`id`)", - 'Data which fields the user must fill out'); - - // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!) - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('surname', 'Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('family', 'Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('street_nr', 'Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('cntry', 'Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('zip', 'Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('city', 'Y')"); - - // Add admin menu - addAdminMenuSql('setup','config_register','Pflichtfelder','Stellen Sie hier die Pflichtfelder sowohl im Anmeldeformular, als auch im Mitgliedsbereich unter Profildaten ändern ein.', 12); - - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Einstellbare Pflichtfelder hinzugefügt."); - break; - - case '0.1.1': // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Veraltetes Update entfernt."); - break; - - case '0.1.3': // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Standard Referral-Id kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"); - break; - - case '0.1.4': // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); - break; - - case '0.1.5': // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Konfiguration der Pflichtangaben ausgelagert in Template"); - break; - - case '0.1.6': // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); - break; - - case '0.1.7': // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); - break; - - case '0.1.8': // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); - break; - - case '0.1.9': // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)"); - break; - - case '0.2.0': // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); - break; - - case '0.2.1': // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); - break; - - case '0.2.2': // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Sämtliche Sperren bei eingeloggten Admin deaktiviert."); - break; - - case '0.2.3': // SQL queries for v0.2.3 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Cookie refid aus Anmeldeformular entfernt."); - break; - - case '0.2.4': // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); - break; - - case '0.2.5': // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Seit Patch 340 überflüssige HTML-Tags entfernt."); - break; - - case '0.2.6': // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); - break; - - case '0.2.7': // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Referral-Id wird endlich korrekt gesetzt."); - break; - - case '0.2.8': // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Parse error in what-register.php beseitigt."); - break; - - case '0.2.9': // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Anrede "Firma" hinzugefügt."); - break; - - case '0.3.0': // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Wörter {?mt_word?}, {?mt_word2?} und {?mt_word3?} sind austauschbar."); - break; - - case '0.3.1': // SQL queries for v0.3.1 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Email-Adresse wird vor dem Speichern auf Gültigkeit hin getestet."); - break; - - case '0.3.2': // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.
-
-Wichtig: Laden Sie noch das Template guest_register.tpl mit hoch, welches unter templates/".getLanguage()."/html/guest/ zu finden ist!"); - break; - - case '0.3.3': // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten."); - break; - - case '0.3.4': // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Auf Grund der Integration der neue Erweiterung country in die Anmeldephase klappte die Anmeldung nicht. Die dazu nütige Verknüpfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!"); - break; - - case '0.3.5': // SQL queries for v0.3.5 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Design wird nach Anmeldung auch endlich im Mitgliedsmenü übernommen."); - break; - - case '0.3.6': // SQL queries for v0.3.6 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehlermeldung Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190 beseitigt."); - break; - - case '0.3.7': // SQL queries for v0.3.7 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehlermeldung Fatal error: Call to undefined function: get_curr_themee() in /../../guest/what-register.php on line 190 beseitigt."); - break; - - case '0.3.8': // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Weitere SQL-Befehle abgesichert."); - break; - - case '0.3.9': // SQL queries for v0.3.9 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); - break; - - case '0.4.0': // SQL queries for v0.4.0 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); - break; - - case '0.4.1': // SQL queries for v0.4.1 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); - break; - - case '0.4.2': // SQL queries for v0.4.2 - 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."); - break; - - case '0.4.3': // SQL queries for v0.4.3 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Parser-Error in inc/modules/guest/what-register.php beseitigt."); - break; - - case '0.4.4': // SQL queries for v0.4.4 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt."); - break; - - case '0.4.5': // SQL queries for v0.4.5 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("if-Anweisungen auf Funktion empty() umgestellt."); - break; - - case '0.4.6': // SQL queries for v0.4.6 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Einstellung nach {?POINTS?}-Einstellungen verlagert."); - break; - - case '0.4.7': // SQL queries for v0.4.7 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("setSession() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); - break; - - case '0.4.8': // SQL queries for v0.4.8 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."); - break; - - case '0.4.9': // SQL queries for v0.4.9 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt."); - break; - - case '0.5.0': // SQL queries for v0.5.0 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehlermeldung Fatal error: Call to undefined function registerGenerateCategoryTable() in {?PATH?}/inc/modules/guest/what-register.php on line 434 beseitigt."); - break; - - case '0.5.1': // SQL queries for v0.5.1 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Mail-Template register-member.tpl gefixt. Danke an wliepe für die Fehlerfindung!"); - break; - - case '0.5.2': // SQL queries for v0.5.2 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); - break; - - case '0.5.3': // SQL queries for v0.5.3 - // Register a filter - registerFilter(__FILE__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', FALSE, TRUE, isExtensionDryRun()); - - // Run these SQLs - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('gender','Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('email','Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('birthday','Y')"); - addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('marker','Y')"); - - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Filter register_must_fillout hinzugefügt, weitere Felder in {?_MYSQL_PREFIX?}_must_register eingefügt."); - 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); - - // 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 - 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."); - break; - - case '0.5.6': // SQL queries for v0.5.6 - // Register points data - registerExtensionPointsData('register_welcome', 'points', 'LOCKED', 'DIRECT'); - - // Update notes - setExtensionUpdateNotes("Anmeldewillkommensgutschrift wird nun über die Tabelle {OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data verwaltet."); - break; - - case '0.5.7': // SQL queries for v0.5.7 - // Register a filter - registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_GENERIC', FALSE, TRUE, isExtensionDryRun()); - - // Register points data - registerExtensionPointsData('referral_bonus', 'points', 'LOCKED', 'DIRECT'); - registerExtensionPointsData('referral_bonus_ref', 'points', 'LOCKED', 'DIRECT'); - - // Update notes - setExtensionUpdateNotes("Anmeldeformular komplett auf drei Filter umgestrickt (mehr dazu siehe Wiki) und weitere Verwendungszwecke registriert."); - break; - } // END - switch break; case 'modify': // When the extension got modified diff --git a/inc/extensions/order/mode-update.php b/inc/extensions/order/mode-update.php index c87577fa2f..aef7ff19a1 100644 --- a/inc/extensions/order/mode-update.php +++ b/inc/extensions/order/mode-update.php @@ -338,7 +338,19 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us addConfigAddSql('order_multi_page', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Spalte wird nun in dieser Erweiterung hinzugefügt (vorher: allgemeine tables.sql)."); + setExtensionUpdateNotes("Konfiguration wird nun in dieser Erweiterung hinzugefügt (vorher: allgemeine tables.sql)."); + break; + + case '0.5.9': // SQL queries for v0.5.9 + addConfigChangeSql('unconfirmed', 'max_unconfirmed', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 100'); + addConfigAddSql('max_unconfirmed', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 100'); + addConfigChangeSql('autosend_active', 'autosend_member_mails', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigAddSql('autosend_member_mails', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigChangeSql('max_tlength', 'max_text_length', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000'); + addConfigAddSql('max_text_length', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Konfiguration wird nun in dieser Erweiterung hinzugefügt (vorher: allgemeine tables.sql)."); break; } // END - switch diff --git a/inc/extensions/register/.htaccess b/inc/extensions/register/.htaccess new file mode 100644 index 0000000000..3a42882788 --- /dev/null +++ b/inc/extensions/register/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/inc/extensions/register/mode-update.php b/inc/extensions/register/mode-update.php new file mode 100644 index 0000000000..68098671d5 --- /dev/null +++ b/inc/extensions/register/mode-update.php @@ -0,0 +1,337 @@ +Profildaten ändern ein.', 12); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Einstellbare Pflichtfelder hinzugefügt."); + break; + + case '0.1.1': // SQL queries for v0.1.1 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Veraltetes Update entfernt."); + break; + + case '0.1.3': // SQL queries for v0.1.3 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Standard Referral-Id kann per Admin-Bereich eingestellt werden (war vorher nur in modules.php und index.php direkt eingebbar.)"); + break; + + case '0.1.4': // SQL queries for v0.1.4 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); + break; + + case '0.1.5': // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Konfiguration der Pflichtangaben ausgelagert in Template"); + break; + + case '0.1.6': // SQL queries for v0.1.6 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + break; + + case '0.1.7': // SQL queries for v0.1.7 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + break; + + case '0.1.8': // SQL queries for v0.1.8 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + break; + + case '0.1.9': // SQL queries for v0.1.9 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Pflichtfelder wieder eingebaut (waren irgentwie ausgebaut???)"); + break; + + case '0.2.0': // SQL queries for v0.2.0 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); + break; + + case '0.2.1': // SQL queries for v0.2.1 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); + break; + + case '0.2.2': // SQL queries for v0.2.2 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Sämtliche Sperren bei eingeloggten Admin deaktiviert."); + break; + + case '0.2.3': // SQL queries for v0.2.3 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Cookie refid aus Anmeldeformular entfernt."); + break; + + case '0.2.4': // SQL queries for v0.2.4 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); + break; + + case '0.2.5': // SQL queries for v0.2.5 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Seit Patch 340 überflüssige HTML-Tags entfernt."); + break; + + case '0.2.6': // SQL queries for v0.2.6 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); + break; + + case '0.2.7': // SQL queries for v0.2.7 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Referral-Id wird endlich korrekt gesetzt."); + break; + + case '0.2.8': // SQL queries for v0.2.8 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Parse error in what-register.php beseitigt."); + break; + + case '0.2.9': // SQL queries for v0.2.9 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Anrede "Firma" hinzugefügt."); + break; + + case '0.3.0': // SQL queries for v0.3.0 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Wörter {?mt_word?}, {?mt_word2?} und {?mt_word3?} sind austauschbar."); + break; + + case '0.3.1': // SQL queries for v0.3.1 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Email-Adresse wird vor dem Speichern auf Gültigkeit hin getestet."); + break; + + case '0.3.2': // SQL queries for v0.3.2 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Einbindung der Erweiterung country, die Sie sich noch optional von meiner Seite herunterladen müssen.
+
+Wichtig: Laden Sie noch das Template guest_register.tpl mit hoch, welches unter templates/".getLanguage()."/html/guest/ zu finden ist!"); + break; + + case '0.3.3': // SQL queries for v0.3.3 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Es werden dem Mitglied nur aktivierte Ländercodes zur Auswahl angeboten."); + break; + + case '0.3.4': // SQL queries for v0.3.4 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Auf Grund der Integration der neue Erweiterung country in die Anmeldephase klappte die Anmeldung nicht. Die dazu nütige Verknüpfung ist nun eingebaut und die Anmeldung klappt wieder. Vielen Dank nochmals an den Bug-Reporter (Fehlermelder)!"); + break; + + case '0.3.5': // SQL queries for v0.3.5 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Design wird nach Anmeldung auch endlich im Mitgliedsmenü übernommen."); + break; + + case '0.3.6': // SQL queries for v0.3.6 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehlermeldung Fatal error: Call to undefined function: get_theme() in /../../guest/what-register.php on line 190 beseitigt."); + break; + + case '0.3.7': // SQL queries for v0.3.7 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehlermeldung Fatal error: Call to undefined function: get_curr_themee() in /../../guest/what-register.php on line 190 beseitigt."); + break; + + case '0.3.8': // SQL queries for v0.3.8 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Weitere SQL-Befehle abgesichert."); + break; + + case '0.3.9': // SQL queries for v0.3.9 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); + break; + + case '0.4.0': // SQL queries for v0.4.0 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); + break; + + case '0.4.1': // SQL queries for v0.4.1 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); + break; + + case '0.4.2': // SQL queries for v0.4.2 + 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."); + break; + + case '0.4.3': // SQL queries for v0.4.3 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Parser-Error in inc/modules/guest/what-register.php beseitigt."); + break; + + case '0.4.4': // SQL queries for v0.4.4 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Anmeldefehler (EMail-Adresse war immer ein Ausrufezeichen) beseitigt."); + break; + + case '0.4.5': // SQL queries for v0.4.5 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("if-Anweisungen auf Funktion empty() umgestellt."); + break; + + case '0.4.6': // SQL queries for v0.4.6 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Einstellung nach {?POINTS?}-Einstellungen verlagert."); + break; + + case '0.4.7': // SQL queries for v0.4.7 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("setSession() mit @-Zeichen gegen ungewollte Ausgaben abgesichert."); + break; + + case '0.4.8': // SQL queries for v0.4.8 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."); + break; + + case '0.4.9': // SQL queries for v0.4.9 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Problem mit nicht anzeigbaren Kategorien in der Anmeldung beseitigt."); + break; + + case '0.5.0': // SQL queries for v0.5.0 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehlermeldung Fatal error: Call to undefined function registerGenerateCategoryTable() in {?PATH?}/inc/modules/guest/what-register.php on line 434 beseitigt."); + break; + + case '0.5.1': // SQL queries for v0.5.1 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Mail-Template register-member.tpl gefixt. Danke an wliepe für die Fehlerfindung!"); + break; + + case '0.5.2': // SQL queries for v0.5.2 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + break; + + case '0.5.3': // SQL queries for v0.5.3 + // Register a filter + registerFilter(__FILE__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', FALSE, TRUE, isExtensionDryRun()); + + // Run these SQLs + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('gender','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('email','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('birthday','Y')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('marker','Y')"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter register_must_fillout hinzugefügt, weitere Felder in {?_MYSQL_PREFIX?}_must_register eingefügt."); + 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); + + // 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 + 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."); + break; + + case '0.5.6': // SQL queries for v0.5.6 + // Register points data + registerExtensionPointsData('register_welcome', 'points', 'LOCKED', 'DIRECT'); + + // Update notes + setExtensionUpdateNotes("Anmeldewillkommensgutschrift wird nun über die Tabelle {OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data verwaltet."); + break; + + case '0.5.7': // SQL queries for v0.5.7 + // Register a filter + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_GENERIC', FALSE, TRUE, isExtensionDryRun()); + + // Register points data + registerExtensionPointsData('referral_bonus', 'points', 'LOCKED', 'DIRECT'); + registerExtensionPointsData('referral_bonus_ref', 'points', 'LOCKED', 'DIRECT'); + + // Update notes + setExtensionUpdateNotes("Anmeldeformular komplett auf drei Filter umgestrickt (mehr dazu siehe Wiki) und weitere Verwendungszwecke registriert."); + break; + + case '0.5.8': // SQL queries for v0.5.8 + addConfigAddSql('least_cats', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 5'); + addConfigAddSql('display_refid', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + addConfigAddSql('ip_timeout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400'); + + // Update notes + setExtensionUpdateNotes("Anmeldewillkommensgutschrift wird nun über die Tabelle {OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data verwaltet."); + break; + } // END - switch + +// [EOF] +?> diff --git a/inc/extensions/sql_patches/mode-update.php b/inc/extensions/sql_patches/mode-update.php index c362157f38..88d866f998 100644 --- a/inc/extensions/sql_patches/mode-update.php +++ b/inc/extensions/sql_patches/mode-update.php @@ -50,10 +50,8 @@ if (!defined('__SECURITY')) { break; case '0.0.2': // SQL queries for v0.0.2 - addConfigChangeSql('auto_purge', 'auto_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay()*14)); - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("In der Tabelle {?_MYSQL_PREFIX?}_config musste die Spalte auto_purge (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)"); + setExtensionUpdateNotes("Nicht mehr verwendetes Update, da nach ext-autopurge verschoben."); break; case '0.0.3': // SQL queries for v0.0.3 @@ -445,6 +443,7 @@ INDEX (`admin_id`)", break; case '0.4.5': // SQL queries for v0.4.5 + addConfigAddSql('last_daily' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); addConfigAddSql('last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); addConfigAddSql('last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); @@ -696,8 +695,8 @@ INDEX (`ip`)", break; case '0.7.6': // SQL queries for v0.7.6 - addConfigChangeSql('last_monthly', 'last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); - addConfigChangeSql('last_weekly' , 'last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); + addConfigChangeSql('last_month', 'last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); + addConfigChangeSql('last_week' , 'last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Spaltentyp fuer kleine Zahlen sollten auch z.B. TINYINT sein."); diff --git a/inc/extensions/user/mode-setup.php b/inc/extensions/user/mode-setup.php index a37d1cc13f..dd3df2fd4e 100644 --- a/inc/extensions/user/mode-setup.php +++ b/inc/extensions/user/mode-setup.php @@ -159,5 +159,8 @@ addAdminMenuSql('user', 'list_refs', 'Referrals anzeigen', 'Mit diesem Menü addAdminMenuSql('user', 'list_links', 'Unbestätigte Mails', 'Mit diesem Menüpunkt können Sie die vom Mitglied nicht bestätigten Mails anzeigen.', 8); addAdminMenuSql('user', 'list_user_cats', 'Kategorien anzeigen', 'Listet die ausgewählten Kategorien eines Mitgliedes auf.', 9); +// Add dependency to ext-other as pool-user requires it +addExtensionDependency('other'); + // [EOF] ?> diff --git a/inc/filters.php b/inc/filters.php index e1784f4691..c1e54c7c7d 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -1222,8 +1222,8 @@ function FILTER_GENERATE_POOL_MAIL_LINKS ($filterData) { // Filter to activate exchange function FILTER_ACTIVATE_EXCHANGE () { - // Is the extension 'user' there? - if ((!isExtensionActive('user')) || (getActivateXchange() == '0')) { + // Are the extension ext-user/other there? + if ((!isExtensionActive('user')) || (!isExtensionActive('other')) || (getActivateXchange() == '0')) { // Silently abort here return FALSE; } // END - if diff --git a/inc/language/de.php b/inc/language/de.php index f68a739f07..cfbd7727de 100644 --- a/inc/language/de.php +++ b/inc/language/de.php @@ -209,7 +209,6 @@ addMessages(array( 'ADMIN_ENTER_POINTS_REGISTER' => "Willkommensgutschrift", 'ADMIN_ENTER_POINTS_REFERRAL' => "Einmalige Referral-Gutschrift", 'CHOOSE_MORE_CATEGORIES' => "Bitte wählen Sie mehr Kategorien aus! Minimum ist: {?least_cats?}", - 'ADMIN_CONFIG_REJECT_DOUBLE_EMAIL' => "Doppelt angemeldete Email-Adressen ablehnen?", 'ADMIN_EDIT_POINTS' => "Willkommensgutschrift und andere Festbeträge editieren", // Referral levels (admin/generic) diff --git a/inc/language/order_de.php b/inc/language/order_de.php index a40f0c1975..be0344fa9b 100644 --- a/inc/language/order_de.php +++ b/inc/language/order_de.php @@ -56,6 +56,7 @@ addMessages(array( 'ADMIN_CONFIG_CHECK_EMAIL_SUBJECT' => "Sind URLs in der Betreffzeile erlaubt?", 'ADMIN_CONFIG_ORDER_NOTICE' => "Das Auswahlverfahren von Mailempfängern wirkt sich nur auf kleinere Buchungen - mit weniger Empfänger als maximal möglich - aus.", 'ADMIN_CONFIG_ORDER_MULTI_PAGE' => "Soll die Mailbuchungsseite in mehrere aufgeteilt werden? Dies erlaubt den Versand nach Postleitzahl zum Bespielt.", + 'ADMIN_CONFIG_AUTOSEND_MEMBER_MAILS' => "Ist der Auto-Versand aktiviert?", // Admin config - repay options 'ADMIN_CONFIG_REPAY_POINTS_REPAY' => "Dem Mitglied wieder gutschreiben", diff --git a/inc/language/other_de.php b/inc/language/other_de.php index 34c8c28251..adcab052f5 100644 --- a/inc/language/other_de.php +++ b/inc/language/other_de.php @@ -42,10 +42,10 @@ if (!defined('__SECURITY')) { // Language constans addMessages(array( + // Admin - configuration 'ADMIN_CONFIG_OTHER_TITLE' => "Sonstige Einstellungen", 'ADMIN_CONFIG_URL_TIME_LOCK' => "Selbe beworbene URL nicht mehr bewerbar (0 = URL sofort erneut buchbar)", 'ADMIN_CONFIG_POOL_MAX_SEND' => "Anzahl zu sendender Mails aus dem Pool", - 'ADMIN_CONFIG_AUTOSEND_ACTIVE' => "Ist der Auto-Versand aktiviert?", 'ADMIN_CONFIG_NOTIFY_ADMIN' => "Benachrichtigung bei Profiländerung?", 'ADMIN_CONFIG_MAX_ONLINETIME' => "Timeout für Who-is-Online", 'ADMIN_CONFIG_SENDING_TITLE' => "Versand-Optionen", @@ -76,6 +76,7 @@ addMessages(array( 'ADMIN_CONFIG_INTERNAL_STATS_ENABLED' => "Sollen die internen Statistiken eingeschaltet sein? Das Abschalten dieser Statistiken kann etwas Performance bringen, ist aber für Performancemessungen vorraussetzend.", 'ADMIN_CONFIG_WORD_WRAP' => "Allgemeiner Zeilenumbruch", 'ADMIN_CONFIG_OTHER_NOTICE' => "Hinweise: Der allgemeine Zeilenumbruch (in Zeichen angegeben) gilt als Fallback-Einstellung falls der für die Erweiterung spezielle Konfigurationseintrag fehlen sollte. Falls Sie Details wissen wollen, so schauen Sie bitte in der Funktion getWordWrap() im Script inc/wrapper-functions.php nach.", + 'ADMIN_CONFIG_REJECT_DOUBLE_EMAIL' => "Doppelt angemeldete Email-Adressen ablehnen?", )); // [EOF] diff --git a/inc/language/register_de.php b/inc/language/register_de.php index a91837b5bb..a4216b4492 100644 --- a/inc/language/register_de.php +++ b/inc/language/register_de.php @@ -55,7 +55,6 @@ addMessages(array( 'ADMIN_CONFIG_REGISTER_TITLE' => "Einstellungen am Anmeldeformular", 'ADMIN_CONFIG_LEAST_CATEGORIES' => "Mindestens auszuwählende Kategorieanzahl", 'ADMIN_CONFIG_REGISTER_GENERATE_PASSWORD_EMPTY' => "Soll bei leergelassenem Passwort in der Anmeldung eines per Zufall generiert werden?", - 'ADMIN_CONFIG_REJECT_DOUBLE_EMAIL' => "Doppelt angemeldete Email-Adressen ablehnen?", 'GUEST_EMAIL_IS_ALREADY_REGISTERED' => "Sie haben sich bereits mit dieser Email-Adresse angemeldet, oder jemand anderes verwendet Ihre. Doppelte Anmeldungen sind bei uns verboten.", 'PRE_USER_REGISTRATION_FAILED' => "Anmeldung fehlgeschlagen: Pre-Filterkette nicht gelaufen! Bitte melden Sie dies beim zuständigen Webmaster.", diff --git a/inc/libs/order_functions.php b/inc/libs/order_functions.php index 27f3bbf7e6..cbdff252a2 100644 --- a/inc/libs/order_functions.php +++ b/inc/libs/order_functions.php @@ -94,6 +94,42 @@ function isOrderMultiPageEnabled () { return $GLOBALS[__FUNCTION__]; } +// Getter for 'autosend_member_mails' config entry +function getAutosendMemberMails () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('autosend_member_mails'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Determines whether 'autosend_member_mails' is set to 'Y' +function isAutosendMemberMailsEnabled () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = (getAutosendMemberMails() == 'Y'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'order_max_full' config entry +function getOrderMaxFull () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('order_max_full'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // Getter for 'order_mode' config entry function getOrderMode () { // Is there cache? @@ -118,5 +154,29 @@ function getOrderSelect () { return $GLOBALS[__FUNCTION__]; } +// Getter for 'max_unconfirmed' config entry +function getMaxUnconfirmed () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('max_unconfirmed'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'max_text_length' config entry +function getMaxTextLenngth () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('max_text_length'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // [EOF] ?> diff --git a/inc/libs/other_functions.php b/inc/libs/other_functions.php index d80080f1cd..1aba657195 100644 --- a/inc/libs/other_functions.php +++ b/inc/libs/other_functions.php @@ -76,5 +76,53 @@ function getRejectUrl () { return $GLOBALS[__FUNCTION__]; } +// "Getter" for max_send +function getMaxSend () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('max_send'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// Getter for 'check_double_email' +function getCheckDoubleEmail () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = getConfig('check_double_email'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// Checks whether 'check_double_email' is 'Y' +function isCheckDoubleEmailEnabled () { + // Is the cache entry set? + if (!isset($GLOBALS[__FUNCTION__])) { + // No, so determine it + $GLOBALS[__FUNCTION__] = (getCheckDoubleEmail() == 'Y'); + } // END - if + + // Return cached entry + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for activate_xchange +function getActivateXchange () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('activate_xchange'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // [EOF] ?> diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 2c9c46a57a..2231732d84 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -257,13 +257,12 @@ function isRegistrationDataComplete () { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay=' . intval($isOkay) . ',selected=' . $GLOBALS['registration_selected_cats'] . '/' . getLeastCats()); $isOkay = (($isOkay) && ($GLOBALS['registration_selected_cats'] >= getLeastCats())); - if ((postRequestElement('email') != '!') && (isCheckDoubleEmailEnabled())) { - // Does the email address already exists in our database? - if ((isEmailTaken(postRequestElement('email'))) && (!isAdmin())) { - setPostRequestElement('email', '?'); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did enter a already used email address.'); - $isOkay = FALSE; - } // END - if + // Check if email is taken, if configured + if ((isExtensionInstalledAndNewer('other', '0.3.0')) && (isCheckDoubleEmailEnabled()) && (postRequestElement('email') != '!') && (isEmailTaken(postRequestElement('email'))) && (!isAdmin())) { + // Is already used + setPostRequestElement('email', '?'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did enter a already used email address.'); + $isOkay = FALSE; } // END - if // Check for IP timeout? @@ -537,7 +536,7 @@ function getDisplayRefid () { return $GLOBALS[__FUNCTION__]; } -// Checks whether 'display_refid' is "YES" +// Checks whether 'display_refid' is "Y" function isDisplayRefidEnabled () { // Is the cache entry set? if (!isset($GLOBALS[__FUNCTION__])) { @@ -609,6 +608,18 @@ function isRegisterGeneratePasswordEmptyEnabled () { return $GLOBALS[__FUNCTION__]; } +// "Getter" for least_cats +function getLeastCats () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('least_cats'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + // ---------------------------------------------------------------------------- // Template helper functions // ---------------------------------------------------------------------------- diff --git a/inc/modules/admin/what-config_autopurge.php b/inc/modules/admin/what-config_autopurge.php index fb4d44811e..d17a47d5e1 100644 --- a/inc/modules/admin/what-config_autopurge.php +++ b/inc/modules/admin/what-config_autopurge.php @@ -47,18 +47,6 @@ if (isFormSent('save_config')) { // Data was submitted so we store it adminSaveSettingsFromPostData(); } else { - // Output de-/activation selections - $content['ap_inactive_selection'] = addSelectionBox('yn', getAutopurgeInactive() , 'autopurge_inactive'); - $content['ap_unconfirmed_selection'] = addSelectionBox('yn', getConfig('autopurge_unconfirmed'), 'autopurge_unconfirmed'); - $content['ap_tasks_selection'] = addSelectionBox('yn', getConfig('autopurge_tasks') , 'autopurge_tasks'); - $content['ap_del_mails_selection'] = addSelectionBox('yn', getConfig('ap_del_mails') , 'ap_del_mails'); - - // Output notification selections - $content['ap_notify_inactive'] = addSelectionBox('yn', getConfig('ap_in_notify') , 'ap_in_notify'); - $content['ap_notify_unconfirmed'] = addSelectionBox('yn', getConfig('ap_un_notify') , 'ap_un_notify'); - $content['ap_notify_tasks'] = addSelectionBox('yn', getConfig('ap_tasks_notify'), 'ap_tasks_notify'); - $content['ap_notify_del_mails'] = addSelectionBox('yn', getConfig('ap_dm_notify') , 'ap_dm_notify'); - // Output time selection boxes $content['ap_in_since'] = createConfigurationTimeSelections('ap_inactive_since' , 'MWDh'); $content['ap_in_time'] = createConfigurationTimeSelections('ap_inactive_time' , 'MWDh'); diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index 3c45ba9720..843050d5d6 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -48,13 +48,11 @@ if (isFormSent('save_config')) { // Calculate stamps and set calculated stamps setPostRequestElement('online_timeout' , createEpocheTimeFromSelections('online_timeout' , postRequestArray())); setPostRequestElement('url_tlock' , createEpocheTimeFromSelections('url_tlock' , postRequestArray())); - setPostRequestElement('profile_lock' , createEpocheTimeFromSelections('profile_lock' , postRequestArray())); // Online-Timeout shall be > 0 or your database will crow and crow and crow... if (!isPostRequestElementSet('online_timeout')) { unsetPostRequestElement('ok'); } // Chedck other timestamps (which can be zero!) - if (!isPostRequestElementSet('profile_lock')) { unsetPostRequestElement('ok'); } if (!isPostRequestElementSet('url_tlock')) { unsetPostRequestElement('ok'); } // Check other settings @@ -70,7 +68,6 @@ if (isFormSent('save_config')) { // Time selection boxes $content['online_timeout'] = createConfigurationTimeSelections('online_timeout' , 'ms'); $content['url_tlock'] = createConfigurationTimeSelections('url_tlock' , 'WDh'); - $content['profile_lock'] = createConfigurationTimeSelections('profile_lock' , 'WDh'); // Prepare more foreach (array('css_php_direct','css_php_file','css_php_inline','mailid_error_redirect_index','mailid_error_redirect_reject') as $entry) { diff --git a/inc/modules/admin/what-config_register2.php b/inc/modules/admin/what-config_register2.php index 30aac7adc9..b18e01787d 100644 --- a/inc/modules/admin/what-config_register2.php +++ b/inc/modules/admin/what-config_register2.php @@ -54,11 +54,7 @@ if (isFormSent('save_config')) { adminSaveSettingsFromPostData(); } else { // Remember stuff in constants - $content['display_refid'] = addSelectionBox('yn', getDisplayRefid() , 'display_refid'); - $content['ip_timeout'] = createConfigurationTimeSelections('ip_timeout', 'Dhm'); - $content['check_double_email'] = addSelectionBox('yn', getCheckDoubleEmail() , 'check_double_email'); - $content['register_default'] = addSelectionBox('yn', getRegisterDefault() , 'register_default'); - $content['register_generate_password_empty'] = addSelectionBox('yn', getRegisterGeneratePasswordEmpty(), 'register_generate_password_empty'); + $content['ip_timeout'] = createConfigurationTimeSelections('ip_timeout', 'Dhm'); // Load normal template loadTemplate('admin_config_register2', FALSE, $content); diff --git a/inc/modules/admin/what-config_title.php b/inc/modules/admin/what-config_title.php index 654c6e969e..41a0e0249c 100644 --- a/inc/modules/admin/what-config_title.php +++ b/inc/modules/admin/what-config_title.php @@ -48,13 +48,8 @@ if (isFormSent('save_config') // Save settings adminSaveSettingsFromPostData(); } else { - // Remember config data in constants for the template - $content['enable_title_deco'] = addSelectionBox('yn', getConfig('enable_title_deco'), 'enable_title_deco'); - $content['enable_mod_title'] = addSelectionBox('yn', getConfig('enable_mod_title') , 'enable_mod_title' ); - $content['enable_what_title'] = addSelectionBox('yn', getConfig('enable_what_title'), 'enable_what_title'); - // Load template - loadTemplate('admin_config_title', FALSE, $content); + loadTemplate('admin_config_title'); } // [EOF] diff --git a/inc/modules/guest/action-online.php b/inc/modules/guest/action-online.php index 18db019120..d4dc6addf9 100644 --- a/inc/modules/guest/action-online.php +++ b/inc/modules/guest/action-online.php @@ -51,7 +51,7 @@ $total = countSumTotalData('', 'online', 'id', 'userid', TRUE); if (getConfig('mad_count') < $total) { // Update counter - updateConfiguration(array('mad_timestamp', 'mad_count'), array(time(), $total)); + updateConfiguration(array('mad_timestamp', 'mad_count'), array('UNIX_TIMESTAMP()', $total)); } // END - if // Prepare content diff --git a/inc/modules/member/what-mydata.php b/inc/modules/member/what-mydata.php index 9b5d431788..d79da15362 100644 --- a/inc/modules/member/what-mydata.php +++ b/inc/modules/member/what-mydata.php @@ -224,7 +224,7 @@ LIMIT 1', } elseif ((!isEmailValid(postRequestElement('email'))) && (!isAdmin())) { // Invalid email address! displayMessage('{--INVALID_EMAIL_ENTERED--}'); - } elseif ((isEmailTaken(postRequestElement('email'))) && (isCheckDoubleEmailEnabled()) && (!isAdmin())) { + } elseif ((isExtensionInstalledAndNewer('other', '0.3.0')) && (isCheckDoubleEmailEnabled()) && (!isAdmin()) && (isEmailTaken(postRequestElement('email')))) { // Email address is already registered displayMessage('{--MEMBER_EMAIL_IS_ALREADY_REGISTERED--}'); } else { diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 0cc9a78a8c..38c953be99 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -56,7 +56,7 @@ $data = array( ); $ALLOWED = getUserData('receive_mails') - getUserData('mail_orders'); -if (getConfig('order_max_full') == 'MAX') $ALLOWED = getUserData('receive_mails'); +if (getOrderMaxFull() == 'MAX') $ALLOWED = getUserData('receive_mails'); // Now check his points amount $totalPoints = getTotalPoints(getMemberId()); @@ -69,6 +69,7 @@ if ((isExtensionInstalledAndNewer('holiday', '0.1.3')) && (isUserDataEnabled('ho // Continue with the frametester, we first need to store the data temporary in the pool // // First we would like to store the data and get it's pool position back... + // @TODO Try to move out url_tlock to a filter for extra SQL statements $result = SQL_QUERY_ESC("SELECT `id`, `data_type` @@ -107,7 +108,7 @@ LIMIT 1", $TEST = str_replace(array(PHP_EOL, chr(13)), array('', ''), postRequestElement('text')); // Text length within allowed length? - if (strlen($TEST) > getConfig('max_tlength')) { + if (strlen($TEST) > getMaxTextLength()) { // Text is too long! $data['url'] = 'modules.php?module=login&what=order&code=' . getCode('OVERLENGTH'); } // END - if @@ -428,10 +429,10 @@ LIMIT 1", } elseif (postRequestElement('receiver') == '0') { // Not enougth receivers selected $data['url'] = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS1'); -} elseif (($ALLOWED == '0') && (getConfig('order_max_full') == 'ORDER')) { +} elseif (($ALLOWED == '0') && (getOrderMaxFull() == 'ORDER')) { // No more mail orders allowed displayMessage('{--MEMBER_ORDER_ALLOWED_EXHAUSTED--}'); -} elseif (getTotalUnconfirmedMails(getMemberId()) < getConfig('unconfirmed')) { +} elseif (getTotalUnconfirmedMails(getMemberId()) < getConfig('max_unconfirmed')) { // Show only enabled categories to the user ... $whereStatement = " WHERE `visible`='Y'"; @@ -544,7 +545,7 @@ LIMIT 1", SQL_FREERESULT($result_cats); // Now we need to load the mail types... - $result = SQL_QUERY("SELECT `id`, `price`, `payment`, `mail_title` FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `payment` ASC", __FILE__, __LINE__); + $result = SQL_QUERY("SELECT `id`, `price`, `payment`, `mail_title` FROM `{?_MYSQL_PREFIX?}_payments` WHERE `price` > 0 AND `payment` > 0 ORDER BY `payment` ASC", __FILE__, __LINE__); $payments = array(); if (!SQL_HASZERONUMS($result)) { @@ -566,7 +567,7 @@ LIMIT 1", $content['total_points'] = $totalPoints; // Check how many mail orders he has placed today and how many he's allowed to send - switch (getConfig('order_max_full')) { + switch (getOrderMaxFull()) { case 'MAX': // He is allowed to send as much as possible $content['order_max_full'] = '{--MEMBER_ORDER_ALLOWED_MAX--}'; break; @@ -576,7 +577,7 @@ LIMIT 1", break; default: // Unknown/invalid - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full'))); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getOrderMaxFull())); $content['order_max_full'] = '{--MEMBER_ORDER_ALLOWED_UNKNOWN--}'; break; } // END - switch diff --git a/inc/modules/order.php b/inc/modules/order.php index 289e50cd2f..93c09130e9 100644 --- a/inc/modules/order.php +++ b/inc/modules/order.php @@ -58,7 +58,7 @@ if (empty($url)) { $type = 'ADMIN'; // Is the auto-send mechanism active or inactive? - if (getConfig('autosend_active') == 'Y') { + if (isAutosendMemberMailsEnabled()) { // Auto-send is active $content['admin_autosend'] = '{--ADMIN_AUTOSEND_ACTIVE--}'; $content['member_autosend'] = '{--MEMBER_AUTOSEND_ACTIVE--}'; @@ -84,7 +84,7 @@ if (empty($url)) { // Update used points $add = ''; - if ((isExtensionInstalledAndNewer('order', '0.1.1')) && (getConfig('order_max_full') == 'ORDER')) { + if ((isExtensionInstalledAndNewer('order', '0.1.1')) && (getOrderMaxFull() == 'ORDER')) { $add = ',`mail_orders`=`mail_orders`+1'; } // END - if diff --git a/inc/pool/pool-bonus.php b/inc/pool/pool-bonus.php index 58ea34151c..f61af07f56 100644 --- a/inc/pool/pool-bonus.php +++ b/inc/pool/pool-bonus.php @@ -44,8 +44,8 @@ if (!defined('__SECURITY')) { if ((isResetModeEnabled()) || (!isHtmlOutputMode())) { // Skip here return FALSE; -} elseif (!isExtensionActive('bonus')) { - // Abort if extension bonus is not active +} elseif ((!isExtensionActive('bonus')) || (!isExtensionActive('other'))) { + // Abort if extension bonus/other are not active return FALSE; } diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index 1e35fec142..f10b19f755 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -44,8 +44,8 @@ if (!defined('__SECURITY')) { if ((isResetModeEnabled()) || (!isHtmlOutputMode())) { // Skip here return FALSE; -} elseif (!isExtensionActive('user')) { - // Abort here if extension user is not active +} elseif ((!isExtensionActive('user')) || (!isExtensionActive('other'))) { + // Abort here if extension user/other are not active return FALSE; } @@ -218,8 +218,8 @@ if (!SQL_HASZERONUMS($result_main)) { } // END - switch } // END - if - // Is there reached the maximum to send mails? || (getConfig('max_send') >= $GLOBALS['pool_cnt']) - //* DEBUG: */ debugOutput('*L:'.__LINE__.'/'.$GLOBALS['pool_cnt'].'>='.$mailData['target_send'].'/'.getConfig('max_send').'>='.$GLOBALS['pool_cnt'].'/'.$lastSentId.'!='.$mailData['id'].'*'); + // Is there reached the maximum to send mails? || (getMaxSend() >= $GLOBALS['pool_cnt']) + //* DEBUG: */ debugOutput('*L:'.__LINE__.'/'.$GLOBALS['pool_cnt'].'>='.$mailData['target_send'].'/'.getMaxSend().'>='.$GLOBALS['pool_cnt'].'/'.$lastSentId.'!='.$mailData['id'].'*'); if ((($GLOBALS['pool_cnt'] >= $mailData['target_send'])) && ($lastSentId != $mailData['id'])) { // Prepare content $content = array( @@ -263,7 +263,7 @@ if (!SQL_HASZERONUMS($result_main)) { break; } // Is there send maximum mails? - elseif (($GLOBALS['pool_cnt'] >= getConfig('max_send')) || ($count2 >= getConfig('max_send'))) { + elseif (($GLOBALS['pool_cnt'] >= getMaxSend()) || ($count2 >= getMaxSend())) { // There are some mails left to send for next round, so we reset the status back to NEW (=still not fully delivered) $add = ''; if ($GLOBALS['pool_cnt'] <= $mailData['target_send']) $add = ',`target_send`=`target_send`-' . $GLOBALS['pool_cnt']; diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index 1ddfd1145b..6e41821cd2 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -1667,7 +1667,7 @@ function isAdminNotificationEnabled () { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = (getConfig('admin_notify') == 'Y'); + $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('other', '0.3.0')) && (getConfig('admin_notify') == 'Y')); } // END - if // Return cache @@ -2213,18 +2213,6 @@ function getOneDay () { return $GLOBALS[__FUNCTION__]; } -// "Getter" for activate_xchange -function getActivateXchange () { - // Is there cache? - if (!isset($GLOBALS[__FUNCTION__])) { - // Determine it - $GLOBALS[__FUNCTION__] = getConfig('activate_xchange'); - } // END - if - - // Return cache - return $GLOBALS[__FUNCTION__]; -} - // "Getter" for img_type function getImgType () { // Is there cache? @@ -2249,18 +2237,6 @@ function getCodeLength () { return $GLOBALS[__FUNCTION__]; } -// "Getter" for least_cats -function getLeastCats () { - // Is there cache? - if (!isset($GLOBALS[__FUNCTION__])) { - // Determine it - $GLOBALS[__FUNCTION__] = getConfig('least_cats'); - } // END - if - - // Return cache - return $GLOBALS[__FUNCTION__]; -} - // "Getter" for pass_len function getPassLen () { // Is there cache? @@ -2333,18 +2309,6 @@ function getLastMonthly () { return $GLOBALS[__FUNCTION__]; } -// "Getter" for max_send -function getMaxSend () { - // Is there cache? - if (!isset($GLOBALS[__FUNCTION__])) { - // Determine it - $GLOBALS[__FUNCTION__] = getConfig('max_send'); - } // END - if - - // Return cache - return $GLOBALS[__FUNCTION__]; -} - // "Getter" for mails_page function getMailsPage () { // Is there cache? @@ -2549,30 +2513,6 @@ function getTitleMiddle () { return $GLOBALS[__FUNCTION__]; } -// Getter for 'check_double_email' -function getCheckDoubleEmail () { - // Is the cache entry set? - if (!isset($GLOBALS[__FUNCTION__])) { - // No, so determine it - $GLOBALS[__FUNCTION__] = getConfig('check_double_email'); - } // END - if - - // Return cached entry - return $GLOBALS[__FUNCTION__]; -} - -// Checks whether 'check_double_email' is 'Y' -function isCheckDoubleEmailEnabled () { - // Is the cache entry set? - if (!isset($GLOBALS[__FUNCTION__])) { - // No, so determine it - $GLOBALS[__FUNCTION__] = (getCheckDoubleEmail() == 'Y'); - } // END - if - - // Return cached entry - return $GLOBALS[__FUNCTION__]; -} - // Getter for 'display_home_in_index' function getDisplayHomeInIndex () { // Is the cache entry set? diff --git a/install/tables.sql b/install/tables.sql index a2af6a821d..2f8f6f6af5 100644 --- a/install/tables.sql +++ b/install/tables.sql @@ -34,18 +34,7 @@ CREATE TABLE `{?_MYSQL_PREFIX?}_config` ( `pass_len` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5, `points_register` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `points_ref` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, - `least_cats` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5, - `check_double_email` ENUM('Y','N') NOT NULL DEFAULT 'Y', - `admin_notify` ENUM('Y','N') NOT NULL DEFAULT 'Y', `url_tlock` BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400, - `max_tlength` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1000, - `autosend_active` ENUM('Y','N') NOT NULL DEFAULT 'N', - `max_send` TINYINT(3) UNSIGNED NOT NULL DEFAULT 100, - `auto_purge` TINYINT(3) UNSIGNED NOT NULL DEFAULT 14, - `auto_purge_active` ENUM('Y','N') NOT NULL DEFAULT 'Y', - `last_daily` VARCHAR(10) NOT NULL DEFAULT '0', - `unconfirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100, - `profile_lock` BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400, `online_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1800, `mad_timestamp` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `mad_count` BIGINT(20) UNSIGNED NOT NULL, @@ -53,9 +42,6 @@ CREATE TABLE `{?_MYSQL_PREFIX?}_config` ( `patch_ctime` VARCHAR(10) NOT NULL DEFAULT '0', `guest_stats` ENUM('MEMBERS','MODULES','INACTIVE') NOT NULL DEFAULT 'MEMBERS', `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5, - `activate_xchange` BIGINT(20) UNSIGNED NOT NULL DEFAULT 100, - `display_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y', - `ip_timeout` BIGINT(20) UNSIGNED NOT NULL DEFAULT 86400, `allow_direct_pay` ENUM('Y','N') NOT NULL DEFAULT 'N', PRIMARY KEY (`config`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT 'Configuration'; diff --git a/templates/de/html/admin/admin_config_autopurge.tpl b/templates/de/html/admin/admin_config_autopurge.tpl index 2489aacc1c..ffab6fa1a7 100644 --- a/templates/de/html/admin/admin_config_autopurge.tpl +++ b/templates/de/html/admin/admin_config_autopurge.tpl @@ -10,7 +10,7 @@
-
$content[ap_inactive_selection]
+
{%template,ConfigurationYesNoSelectionBox=ap_inactive_selection%}
@@ -29,7 +29,7 @@
-
$content[ap_unconfirmed_selection]
+
{%template,ConfigurationYesNoSelectionBox=ap_unconfirmed_selection%}
@@ -43,7 +43,7 @@
-
$content[ap_tasks_selection]
+
{%template,ConfigurationYesNoSelectionBox=ap_tasks_selection%}
@@ -67,7 +67,7 @@
-
$content[ap_notify_del_mails]
+
{%template,ConfigurationYesNoSelectionBox=ap_notify_del_mails%}
@@ -76,7 +76,7 @@
-
$content[ap_del_mails_selection]
+
{%template,ConfigurationYesNoSelectionBox=ap_del_mails_selection%}
@@ -104,17 +104,17 @@
-
$content[ap_notify_inactive]
+
{%template,ConfigurationYesNoSelectionBox=ap_notify_inactive%}
-
$content[ap_notify_unconfirmed]
+
{%template,ConfigurationYesNoSelectionBox=ap_notify_unconfirmed%}
-
$content[ap_notify_tasks]
+
{%template,ConfigurationYesNoSelectionBox=ap_notify_tasks%}
diff --git a/templates/de/html/admin/admin_config_order.tpl b/templates/de/html/admin/admin_config_order.tpl index 5168a0b2b0..57e00955ad 100644 --- a/templates/de/html/admin/admin_config_order.tpl +++ b/templates/de/html/admin/admin_config_order.tpl @@ -27,16 +27,16 @@ {--ADMIN_CONFIG_ORDER_MEMBER_LEGEND--}
- +
- +
- +
- +
@@ -105,6 +105,13 @@
+ +
+ +
+ {%template,ConfigurationYesNoSelectionBox=autosend_member_mails%} +
+