From 84dd2fecd5b013cf6f4c4e7dee8b0d470b6a5f5c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 22 Jan 2013 21:24:57 +0000 Subject: [PATCH] Rewrote reset and some extensions: - Rewrote script reset that weekly and monthly are now separated out from daily functions - Rewrote ext-profile/order to handle their own configuration entries (were all in ext-other) - Moved large 'update' block for ext-order out to inc/extensions/order/mode-update.php - TODOs.txt updated --- .gitattributes | 4 + DOCS/TODOs.txt | 27 +- inc/config-functions.php | 2 +- inc/config-local.php.dist | 4 +- inc/daily/daily_ | 2 +- inc/daily/daily_100_bonus.php | 2 +- inc/daily/daily_autopurge.php | 2 +- inc/daily/daily_beg.php | 2 +- inc/daily/daily_birthday.php | 2 +- inc/daily/daily_bonus.php | 2 +- inc/daily/daily_doubler.php | 2 +- inc/daily/daily_earning.php | 2 +- inc/daily/daily_holiday.php | 2 +- inc/daily/daily_order.php | 2 +- inc/daily/daily_profile.php | 2 +- inc/daily/daily_surfbar.php | 2 +- inc/daily/daily_user.php | 2 +- inc/daily/daily_user_subids.php | 2 +- inc/daily/daily_yoomedia.php | 2 +- inc/extensions/bonus/mode-update.php | 2 +- inc/extensions/ext-order.php | 297 +-------------- inc/extensions/ext-profile.php | 25 +- inc/extensions/ext-sql_patches.php | 4 +- inc/extensions/order/.htaccess | 1 + inc/extensions/order/mode-update.php | 346 ++++++++++++++++++ inc/extensions/sponsor/mode-setup.php | 2 +- inc/extensions/sql_patches/mode-update.php | 35 +- inc/extensions/user/mode-update.php | 2 +- inc/filter-functions.php | 12 +- inc/filters.php | 130 +++++-- inc/functions.php | 38 +- inc/language/order_de.php | 1 + inc/language/other_de.php | 6 - inc/language/profile_de.php | 13 +- inc/libs/profile_functions.php | 8 +- inc/mails/beg_mails.php | 2 +- inc/mails/bonus_mails.php | 2 +- inc/modules/admin/what-config_other.php | 6 - inc/modules/admin/what-config_profile.php | 73 ++++ inc/modules/admin/what-list_beg.php | 4 +- inc/modules/admin/what-list_bonus.php | 4 +- inc/monthly/monthly_ | 2 +- inc/monthly/monthly_beg.php | 2 +- inc/monthly/monthly_bonus.php | 2 +- inc/monthly/monthly_newsletter.php | 2 +- inc/monthly/monthly_surfbar.php | 2 +- inc/weekly/weekly_ | 2 +- inc/weekly/weekly_surfbar.php | 2 +- inc/wrapper-functions.php | 94 ++++- install/tables.sql | 6 +- .../de/html/admin/admin_config_order.tpl | 7 + .../de/html/admin/admin_config_other.tpl | 39 -- .../de/html/admin/admin_config_profile.tpl | 52 +++ 53 files changed, 806 insertions(+), 486 deletions(-) create mode 100644 inc/extensions/order/.htaccess create mode 100644 inc/extensions/order/mode-update.php create mode 100644 inc/modules/admin/what-config_profile.php create mode 100644 templates/de/html/admin/admin_config_profile.tpl diff --git a/.gitattributes b/.gitattributes index 8072e2256f..95c965aeac 100644 --- a/.gitattributes +++ b/.gitattributes @@ -250,6 +250,8 @@ inc/extensions/ext-yacy.php svneol=native#text/plain inc/extensions/ext-yoomedia.php svneol=native#text/plain 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/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 @@ -563,6 +565,7 @@ inc/modules/admin/what-config_order.php svneol=native#text/plain inc/modules/admin/what-config_other.php svneol=native#text/plain inc/modules/admin/what-config_payouts.php svneol=native#text/plain inc/modules/admin/what-config_points.php svneol=native#text/plain +inc/modules/admin/what-config_profile.php svneol=native#text/plain inc/modules/admin/what-config_proxy.php svneol=native#text/plain inc/modules/admin/what-config_rallye_prices.php svneol=native#text/plain inc/modules/admin/what-config_refback.php svneol=native#text/plain @@ -1281,6 +1284,7 @@ templates/de/html/admin/admin_config_payouts.tpl svneol=native#text/plain templates/de/html/admin/admin_config_payouts_row.tpl svneol=native#text/plain templates/de/html/admin/admin_config_point_settings.tpl svneol=native#text/plain templates/de/html/admin/admin_config_points.tpl svneol=native#text/plain +templates/de/html/admin/admin_config_profile.tpl svneol=native#text/plain templates/de/html/admin/admin_config_proxy.tpl svneol=native#text/plain templates/de/html/admin/admin_config_refback.tpl svneol=native#text/plain templates/de/html/admin/admin_config_refid.tpl svneol=native#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 3c9593516c..821c7cc5fa 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -14,7 +14,7 @@ ./inc/email-functions.php:209:// @TODO $rawUserId is currently unused ./inc/expression-functions.php:173:// @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again ./inc/expression-functions.php:46: // @TODO is escapeQuotes() enough for strings with single/double quotes? -./inc/extensions/bonus/mode-update.php:43:// @TODO Remove double tabs +./inc/extensions/bonus/mode-update.php:43:// @TODO Remove double tabs from all lines ./inc/extensions/ext-html_mail.php:136: // @TODO Move these arrays into config ./inc/extensions/ext-menu.php:52: // @TODO Convert menu-Id to one coding-standard. admin(edit|_add) => admin_menu_(edit|add), mem(edit|_add) => (edit|add)_(admin|guest|member)_menu ./inc/extensions/ext-newsletter.php:218: // @TODO Move these into configuration @@ -58,22 +58,23 @@ ./inc/extensions/network/mode-setup.php:47: * @TODO Xijide: Lead/Sale (together) unsupported (no target URL) * ./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/sponsor/mode-setup.php:43:// @TODO Remove double tabs -./inc/extensions/sql_patches/mode-update.php:43:// @TODO Remove double-tabs -./inc/extensions/user/mode-update.php:43:// @TODO Remove double tabs +./inc/extensions/order/mode-update.php:43:// @TODO Remove double-tab 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 ./inc/filter/blacklist_filter.php:63: // @TODO Insert log entry ./inc/filter/bonus_filter.php:56: // @TODO This query isn't right, it will only update if the user was for a longer time away! ./inc/filter/cache_filter.php:94: // @TODO This should be rewritten not to load the cache file for just checking if it is there for save removal. ./inc/filter/forced_filter.php:73: // @TODO This part is unfinished -./inc/filter-functions.php:117: // @TODO Remove this forced removal after a year or so -./inc/filters.php:1320: // @TODO No banner found, output some default banner +./inc/filter-functions.php:119: // @TODO Remove this forced removal after a year or so +./inc/filters.php:1380: // @TODO No banner found, output some default banner ./inc/functions.php:1131: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ? ./inc/functions.php:1217: // @TODO Are these convertions still required? ./inc/functions.php:1238:// @TODO Rewrite this function to use readFromFile() and writeToFile() -./inc/functions.php:1847: // @TODO Find a way to cache this -./inc/functions.php:1951: // @TODO This is still very static, rewrite it somehow -./inc/functions.php:2155: // @TODO Rename column data_type to e.g. mail_status -./inc/functions.php:2505:// @TODO cacheFiles is not yet supported +./inc/functions.php:1865: // @TODO Find a way to cache this +./inc/functions.php:1969: // @TODO This is still very static, rewrite it somehow +./inc/functions.php:2173: // @TODO Rename column data_type to e.g. mail_status +./inc/functions.php:2523:// @TODO cacheFiles is not yet supported ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter ./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 @@ -85,7 +86,7 @@ ./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:69: // @TODO Find better text +./inc/language/order_de.php:70: // @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 @@ -217,8 +218,8 @@ ./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:3197: // @TODO Find a way to not use direct module comparison -./inc/wrapper-functions.php:524:// @TODO Do some more sanity check here +./inc/wrapper-functions.php:3275: // @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 ./mailid.php:160: // @TODO Rewrite this to a filter diff --git a/inc/config-functions.php b/inc/config-functions.php index d284b5eabd..25f80bc989 100644 --- a/inc/config-functions.php +++ b/inc/config-functions.php @@ -56,7 +56,7 @@ function initConfig () { // 'DEFAULT_SALT_LENGTH' => 40, // 'DEBUG_MODE' => 'N', // 'DEBUG_HOURLY' => 'N', - // 'DEBUG_RESET' => 'N', + // 'DEBUG_DAILY' => 'N', // 'DEBUG_MONTHLY' => 'N', // 'DEBUG_WEEKLY' => 'N', // 'DEBUG_REGEX' => 'N', diff --git a/inc/config-local.php.dist b/inc/config-local.php.dist index 49063403bf..b77e105b42 100644 --- a/inc/config-local.php.dist +++ b/inc/config-local.php.dist @@ -92,8 +92,8 @@ setConfigEntry('DEBUG_TEMPLATE_CACHE', 'N'); // CFG: DEBUG-HOURLY (comment in to test hourly reset, comment out to not test) //setConfigEntry('DEBUG_HOURLY', 'Y'); -// CFG: DEBUG-RESET (comment in to test daily reset, comment out to not test) -//setConfigEntry('DEBUG_RESET', 'Y'); +// CFG: DEBUG-DAILY (comment in to test daily reset, comment out to not test) +//setConfigEntry('DEBUG_DAILY', 'Y'); // CFG: DEBUG-WEEKLY (comment in to test weekly reset, comment out to not test) //setConfigEntry('DEBUG_WEEKLY', 'Y'); diff --git a/inc/daily/daily_ b/inc/daily/daily_ index 9dc6242bd7..a513ac847c 100644 --- a/inc/daily/daily_ +++ b/inc/daily/daily_ @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('')) { diff --git a/inc/daily/daily_100_bonus.php b/inc/daily/daily_100_bonus.php index e62ffbb9f0..b52693eb1d 100644 --- a/inc/daily/daily_100_bonus.php +++ b/inc/daily/daily_100_bonus.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('bonus')) { diff --git a/inc/daily/daily_autopurge.php b/inc/daily/daily_autopurge.php index 61ef29aa0c..77f5077590 100644 --- a/inc/daily/daily_autopurge.php +++ b/inc/daily/daily_autopurge.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('autopurge')) { diff --git a/inc/daily/daily_beg.php b/inc/daily/daily_beg.php index 5970927f95..19eafa3c50 100644 --- a/inc/daily/daily_beg.php +++ b/inc/daily/daily_beg.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('beg')) { diff --git a/inc/daily/daily_birthday.php b/inc/daily/daily_birthday.php index a4de24302c..7085425d84 100644 --- a/inc/daily/daily_birthday.php +++ b/inc/daily/daily_birthday.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode return; } elseif (!isExtensionActive('birthday')) { diff --git a/inc/daily/daily_bonus.php b/inc/daily/daily_bonus.php index ac7c83c3ab..c3c1423fbb 100644 --- a/inc/daily/daily_bonus.php +++ b/inc/daily/daily_bonus.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('bonus')) { diff --git a/inc/daily/daily_doubler.php b/inc/daily/daily_doubler.php index b6a81caa24..87b965a915 100644 --- a/inc/daily/daily_doubler.php +++ b/inc/daily/daily_doubler.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif ((!isExtensionActive('doubler')) || (getDoublerSendMode() != 'RESET')) { diff --git a/inc/daily/daily_earning.php b/inc/daily/daily_earning.php index ca7c19ef3c..98d024449b 100644 --- a/inc/daily/daily_earning.php +++ b/inc/daily/daily_earning.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('earning')) { diff --git a/inc/daily/daily_holiday.php b/inc/daily/daily_holiday.php index 4f759d7710..b72ac9c9ee 100644 --- a/inc/daily/daily_holiday.php +++ b/inc/daily/daily_holiday.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || ((!isResetModeEnabled()) && (getConfig('holiday_mode') == 'RESET'))) { +} elseif ((!isHtmlOutputMode()) || ((!isDailyResetEnabled()) && (getConfig('holiday_mode') == 'RESET'))) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('holiday')) { diff --git a/inc/daily/daily_order.php b/inc/daily/daily_order.php index 2789b2b6ed..0a7f977fbe 100644 --- a/inc/daily/daily_order.php +++ b/inc/daily/daily_order.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('order')) { diff --git a/inc/daily/daily_profile.php b/inc/daily/daily_profile.php index 4fdda8ba0d..6b97f616f2 100644 --- a/inc/daily/daily_profile.php +++ b/inc/daily/daily_profile.php @@ -39,7 +39,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('profile')) { diff --git a/inc/daily/daily_surfbar.php b/inc/daily/daily_surfbar.php index 9d9790a4eb..d211d2e285 100644 --- a/inc/daily/daily_surfbar.php +++ b/inc/daily/daily_surfbar.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('surfbar')) { diff --git a/inc/daily/daily_user.php b/inc/daily/daily_user.php index ec4fc49acf..7971612654 100644 --- a/inc/daily/daily_user.php +++ b/inc/daily/daily_user.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif ((!isExtensionActive('sql_patches')) || (!isExtensionActive('user'))) { diff --git a/inc/daily/daily_user_subids.php b/inc/daily/daily_user_subids.php index 84df36e3f0..395c879a3f 100644 --- a/inc/daily/daily_user_subids.php +++ b/inc/daily/daily_user_subids.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionInstalledAndNewer('user', '0.5.8')) { diff --git a/inc/daily/daily_yoomedia.php b/inc/daily/daily_yoomedia.php index d2ecafdbcd..b1916a16dd 100644 --- a/inc/daily/daily_yoomedia.php +++ b/inc/daily/daily_yoomedia.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isDailyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('yoomedia')) { diff --git a/inc/extensions/bonus/mode-update.php b/inc/extensions/bonus/mode-update.php index 3e9e3a29be..ab752f4b1b 100644 --- a/inc/extensions/bonus/mode-update.php +++ b/inc/extensions/bonus/mode-update.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { die(); } // END - if -// @TODO Remove double tabs +// @TODO Remove double tabs from all lines switch (getCurrentExtensionVersion()) { case '0.1.6': // SQL queries for v0.1.6 // Update notes (these will be set as task text!) diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index f6ad5bd84e..77f9ac1016 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.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,299 +79,6 @@ switch (getExtensionMode()) { break; case 'update': // Update an extension - switch (getCurrentExtensionVersion()) { - case '0.1.0': // SQL queries for v0.1 - 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!) - setExtensionUpdateNotes("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig."); - break; - - case '0.1.1': // SQL queries for v0.1.1 - addExtensionAddTableColumnSql('user_data', 'mail_orders', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); - - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Maximale Mailbuchung vervollständigt (Admin-Bereich und im Buchungsformular selber)."); - break; - - case '0.1.3': // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Maximale Mailbuchungen repariert (werden nun hochgezählt und bei täglichem Reset auf 0 gesetzt)."); - break; - - case '0.1.4': // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Dummy-Datenfeld wird wieder gelöscht, um Probleme zu vermeiden. Fehlende Spalte mail_order korregiert auf mail_orders."); - break; - - case '0.1.5': // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); - 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("Problem mit Speicherung der Einstellungen beseitigt."); - break; - - case '0.1.9': // SQL queries for v0.1.9 - // 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.0': // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Seit Patch 340 überflüssige HTML-Tags entfernt."); - break; - - case '0.2.1': // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Templates member_frameset-back.tpl und member_frameset-send.tpl nach member_order_back.tpl und member_order_send.tpl umbenannt."); - break; - - case '0.2.2': // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Es wird nun überprüft ob auch genügend Empfänger eingegeben worden sind und ob auch genügend empfangsbereit sind."); - break; - - case '0.2.3': // SQL queries for v0.2.3 - 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"); - break; - - case '0.2.4': // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Anzahl mindestens einszustellende Empfänger wird nun auch angezeigt."); - break; - - case '0.2.5': // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Speicherung der Einstellungen klappt."); - break; - - case '0.2.6': // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der nötigen {?POINTS?} die maximale Anzahl von Usern in der Kategorie gewählt und -nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User hätte nicht genügend {?POINTS?} auf dem Konto. Ein Rechenbeispiel: -
    -
  1. Das Mitglied wählt eine Kategorie XYZ mit maximal 15 Empfängern aus.
  2. -
  3. Es stellt die Mailart "3 {?POINTS?} Kosten / Mail" ein.
  4. -
  5. Es hat aber nur {?POINTS?} für 10 Empfänger und gibt 10 ein.
  6. -
  7. Das Script hatte bis zu dieser Version 3 {?POINTS?} * 15 = 45 {?POINTS?} gerechnet, hat das Mitglied mehr oder gleich 45 {?POINTS?}, fiehl dieser Fehler nicht - auf.
  8. -
  9. Hatte es aber, wie hier im Beispiel 31 {?POINTS?}, konnte es nicht mehr buchen.
  10. -
  11. Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.
  12. -
"); - break; - - case '0.2.7': // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler mit __MIN_VALUE behoben."); - break; - - case '0.2.8': // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Konstantenproblem beseitigt."); - break; - - case '0.2.9': // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Problem mit nicht funktionierenden Mailbuchungen beseitigt."); - break; - - case '0.3.0': // SQL queries for v0.3.0 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Basis-Modul order.php abgesichert, wenn Erweiterung nicht aktiviert ist."); - break; - - case '0.3.1': // SQL queries for v0.3.1 - 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."); - break; - - case '0.3.2': // SQL queries for v0.3.2 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich."); - break; - - case '0.3.3': // SQL queries for v0.3.3 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Unter Einstellungen - Mailbuchungsseite war immer die Tabellenspalte Mitgliedsnummer ausgewählt."); - break; - - case '0.3.4': // SQL queries for v0.3.4 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Dateiamenskonflikt zwischen den Erweiterungen support und order behoben."); - break; - - case '0.3.5': // SQL queries for v0.3.5 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war max_mails, die durch das Mitglieder veränderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde."); - break; - - case '0.3.6': // SQL queries for v0.3.6 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Im Modul order (inc/modules/order.php) wurde fehlerhafterweise die Erweiterung beg getestet."); - break; - - case '0.3.7': // SQL queries for v0.3.7 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."); - break; - - case '0.3.8': // SQL queries for v0.3.8 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Mailbuchungsseite korregiert."); - break; - - case '0.3.9': // SQL queries for v0.3.9 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Erneuten Fehler in Mailbuchungsseite behoben."); - break; - - case '0.4.0': // SQL queries for v0.4.0 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("{?POINTS?}-Abzug klappt wieder. Danke an Andreman!"); - break; - - case '0.4.1': // SQL queries for v0.4.1 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); - break; - - case '0.4.2': // SQL queries for v0.4.2 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); - break; - - case '0.4.3': // SQL queries for v0.4.3 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Neue Urlaubsschaltung mit integriert."); - break; - - case '0.4.4': // SQL queries for v0.4.4 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Ein WHERE `ext_active`='Y' tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt."); - break; - - case '0.4.5': // SQL queries for v0.4.5 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); - break; - - case '0.4.6': // SQL queries for v0.4.6 - addMemberMenuSql('order', NULL, 'Mailbuchungen', 3); - addMemberMenuSql('order', 'order2', 'Framekiller-Mails', 2); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='order',`title`='Klick-Mails',`sort`=1 WHERE `what`='order' LIMIT 1"); - - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); - break; - - case '0.4.7': // SQL queries for v0.4.7 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); - break; - - case '0.4.8': // SQL queries for v0.4.8 - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1"); - - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben."); - break; - - case '0.4.9': // SQL queries for v0.4.9 - 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."); - break; - - case '0.5.0': // SQL queries for v0.5.0 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Nicht mehr gültiges Update."); - break; - - case '0.5.1': // SQL queries for v0.5.1 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Nicht mehr gültiges Update."); - break; - - case '0.5.2': // SQL queries for v0.5.2 - addConfigDropSql('test_text'); - addConfigDropSql('test_subj'); - 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."); - break; - - case '0.5.3': // SQL queries for v0.5.3 - addExtensionAddTableColumnSql('user_points', 'order_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); - addExtensionAddTableColumnSql('user_points', 'locked_order_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); - - // This update depends on ext-user - addExtensionDependency('user'); - - // Register filters for gathering points - registerFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', FALSE, TRUE, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', FALSE, TRUE, isExtensionDryRun()); - - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Weiteres Verwendungszwecke "Werbeguthaben" hinzugefügt (verschoben von ext-user) und neue Filter zum Zurückliefern des Werbeguthabens hinzugefügt."); - break; - - case '0.5.4': // SQL queries for v0.5.4 - // Register filter for handling locked points - registerFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', FALSE, TRUE, isExtensionDryRun()); - - // Register filter for all column names - registerFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', FALSE, TRUE, isExtensionDryRun()); - - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Filter für gesperrtes Werbeguthaben hinzugefügt."); - break; - - case '0.5.5': // SQL queries for v0.5.5 - // Register filter - registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', FALSE, TRUE, isExtensionDryRun()); - - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Filter für gesperrtes Werbeguthaben hinzugefügt."); - break; - - case '0.5.6': // SQL queries for v0.5.6 - // Register filter - registerFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', FALSE, TRUE, isExtensionDryRun()); - - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Filter für Spaltenname des gesperrten Werbeguthabens hinzugefügt."); - break; - - case '0.5.7': // SQL queries for v0.5.7 - addDropTableSql('url_blacklist'); - - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Tabelle für URL-Sperrliste gelöscht (nach ext-blacklist verschoben)."); - break; - } // END - switch break; case 'modify': // When the extension got modified diff --git a/inc/extensions/ext-profile.php b/inc/extensions/ext-profile.php index 9a83b7ad2f..614a19a993 100644 --- a/inc/extensions/ext-profile.php +++ b/inc/extensions/ext-profile.php @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.0.9'); +setThisExtensionVersion('0.1.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')); +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')); switch (getExtensionMode()) { case 'setup': // Do stuff when installation is running @@ -54,7 +54,7 @@ switch (getExtensionMode()) { case 'remove': // Do stuff when removing extension // SQL commands to run - addExtensionSql(''); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_profile'"); break; case 'activate': // Do stuff when admin activates this extension @@ -91,7 +91,7 @@ switch (getExtensionMode()) { case '0.0.5': // SQL queries for v0.0.5 // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Profilaktualisierungsmails werden nur dann ausgesendet, wenn profile_update und prof_reupdate > 0 sind."); + setExtensionUpdateNotes("Profilaktualisierungsmails werden nur dann ausgesendet, wenn profile_update und resend_profile_update > 0 sind."); break; case '0.0.6': // SQL queries for v0.0.6 @@ -113,7 +113,20 @@ switch (getExtensionMode()) { // Update notes (these will be set as task text!) setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); break; - } + + case '0.1.0': // SQL queries for v0.1.0 + // 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('resend_profile_update', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 172800'); + + // Admin menu + addAdminMenuSql('setup','config_profile','Mitgliedsprofile','Einstellungen für Mitgliedprofile.',14); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Tabellenspalten aus Konfiguration in diese Erweiterung verschoben und umbenannt."); + break; + } // END - switch break; case 'modify': // When the extension got modified @@ -128,7 +141,7 @@ switch (getExtensionMode()) { default: // Unknown extension mode reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; -} +} // END - switch // [EOF] ?> diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 7a35a45857..d20ef4055d 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.9.7'); +setThisExtensionVersion('0.9.8'); // 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', '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', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0', '0.9.1', '0.9.2', '0.9.3', '0.9.4', '0.9.5', '0.9.6', '0.9.7')); +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', '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', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0', '0.9.1', '0.9.2', '0.9.3', '0.9.4', '0.9.5', '0.9.6', '0.9.7', '0.9.8')); // Keep this extension always active! setExtensionAlwaysActive('Y'); diff --git a/inc/extensions/order/.htaccess b/inc/extensions/order/.htaccess new file mode 100644 index 0000000000..3a42882788 --- /dev/null +++ b/inc/extensions/order/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/inc/extensions/order/mode-update.php b/inc/extensions/order/mode-update.php new file mode 100644 index 0000000000..c87577fa2f --- /dev/null +++ b/inc/extensions/order/mode-update.php @@ -0,0 +1,346 @@ +mail_order korregiert auf mail_orders."); + break; + + case '0.1.5': // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + 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("Problem mit Speicherung der Einstellungen beseitigt."); + break; + + case '0.1.9': // SQL queries for v0.1.9 + // 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.0': // SQL queries for v0.2.0 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Seit Patch 340 überflüssige HTML-Tags entfernt."); + break; + + case '0.2.1': // SQL queries for v0.2.1 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Templates member_frameset-back.tpl und member_frameset-send.tpl nach member_order_back.tpl und member_order_send.tpl umbenannt."); + break; + + case '0.2.2': // SQL queries for v0.2.2 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Es wird nun überprüft ob auch genügend Empfänger eingegeben worden sind und ob auch genügend empfangsbereit sind."); + break; + + case '0.2.3': // SQL queries for v0.2.3 + 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"); + break; + + case '0.2.4': // SQL queries for v0.2.4 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Anzahl mindestens einszustellende Empfänger wird nun auch angezeigt."); + break; + + case '0.2.5': // SQL queries for v0.2.5 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Speicherung der Einstellungen klappt."); + break; + + case '0.2.6': // SQL queries for v0.2.6 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der nötigen {?POINTS?} die maximale Anzahl von Usern in der Kategorie gewählt und +nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User hätte nicht genügend {?POINTS?} auf dem Konto. Ein Rechenbeispiel: +
    +
  1. Das Mitglied wählt eine Kategorie XYZ mit maximal 15 Empfängern aus.
  2. +
  3. Es stellt die Mailart "3 {?POINTS?} Kosten / Mail" ein.
  4. +
  5. Es hat aber nur {?POINTS?} für 10 Empfänger und gibt 10 ein.
  6. +
  7. Das Script hatte bis zu dieser Version 3 {?POINTS?} * 15 = 45 {?POINTS?} gerechnet, hat das Mitglied mehr oder gleich 45 {?POINTS?}, fiehl dieser Fehler nicht + auf.
  8. +
  9. Hatte es aber, wie hier im Beispiel 31 {?POINTS?}, konnte es nicht mehr buchen.
  10. +
  11. Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.
  12. +
"); + break; + + case '0.2.7': // SQL queries for v0.2.7 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehler mit __MIN_VALUE behoben."); + break; + + case '0.2.8': // SQL queries for v0.2.8 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Konstantenproblem beseitigt."); + break; + + case '0.2.9': // SQL queries for v0.2.9 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Problem mit nicht funktionierenden Mailbuchungen beseitigt."); + break; + + case '0.3.0': // SQL queries for v0.3.0 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Basis-Modul order.php abgesichert, wenn Erweiterung nicht aktiviert ist."); + break; + + case '0.3.1': // SQL queries for v0.3.1 + 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."); + break; + + case '0.3.2': // SQL queries for v0.3.2 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich."); + break; + + case '0.3.3': // SQL queries for v0.3.3 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Unter Einstellungen - Mailbuchungsseite war immer die Tabellenspalte Mitgliedsnummer ausgewählt."); + break; + + case '0.3.4': // SQL queries for v0.3.4 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Dateiamenskonflikt zwischen den Erweiterungen support und order behoben."); + break; + + case '0.3.5': // SQL queries for v0.3.5 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war max_mails, die durch das Mitglieder veränderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde."); + break; + + case '0.3.6': // SQL queries for v0.3.6 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Im Modul order (inc/modules/order.php) wurde fehlerhafterweise die Erweiterung beg getestet."); + break; + + case '0.3.7': // SQL queries for v0.3.7 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert."); + break; + + case '0.3.8': // SQL queries for v0.3.8 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Mailbuchungsseite korregiert."); + break; + + case '0.3.9': // SQL queries for v0.3.9 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Erneuten Fehler in Mailbuchungsseite behoben."); + break; + + case '0.4.0': // SQL queries for v0.4.0 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("{?POINTS?}-Abzug klappt wieder. Danke an Andreman!"); + break; + + case '0.4.1': // SQL queries for v0.4.1 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); + break; + + case '0.4.2': // SQL queries for v0.4.2 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4."); + break; + + case '0.4.3': // SQL queries for v0.4.3 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Neue Urlaubsschaltung mit integriert."); + break; + + case '0.4.4': // SQL queries for v0.4.4 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Ein WHERE `ext_active`='Y' tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt."); + break; + + case '0.4.5': // SQL queries for v0.4.5 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden."); + break; + + case '0.4.6': // SQL queries for v0.4.6 + addMemberMenuSql('order', NULL, 'Mailbuchungen', 3); + addMemberMenuSql('order', 'order2', 'Framekiller-Mails', 2); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='order',`title`='Klick-Mails',`sort`=1 WHERE `what`='order' LIMIT 1"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut."); + break; + + case '0.4.7': // SQL queries for v0.4.7 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + break; + + case '0.4.8': // SQL queries for v0.4.8 + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben."); + break; + + case '0.4.9': // SQL queries for v0.4.9 + 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."); + break; + + case '0.5.0': // SQL queries for v0.5.0 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Nicht mehr gültiges Update."); + break; + + case '0.5.1': // SQL queries for v0.5.1 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Nicht mehr gültiges Update."); + break; + + case '0.5.2': // SQL queries for v0.5.2 + addConfigDropSql('test_text'); + addConfigDropSql('test_subj'); + 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."); + break; + + case '0.5.3': // SQL queries for v0.5.3 + addExtensionAddTableColumnSql('user_points', 'order_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); + addExtensionAddTableColumnSql('user_points', 'locked_order_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); + + // This update depends on ext-user + addExtensionDependency('user'); + + // Register filters for gathering points + registerFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', FALSE, TRUE, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Weiteres Verwendungszwecke "Werbeguthaben" hinzugefügt (verschoben von ext-user) und neue Filter zum Zurückliefern des Werbeguthabens hinzugefügt."); + break; + + case '0.5.4': // SQL queries for v0.5.4 + // Register filter for handling locked points + registerFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', FALSE, TRUE, isExtensionDryRun()); + + // Register filter for all column names + registerFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', FALSE, TRUE, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter für gesperrtes Werbeguthaben hinzugefügt."); + break; + + case '0.5.5': // SQL queries for v0.5.5 + // Register filter + registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', FALSE, TRUE, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter für gesperrtes Werbeguthaben hinzugefügt."); + break; + + case '0.5.6': // SQL queries for v0.5.6 + // Register filter + registerFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', FALSE, TRUE, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Filter für Spaltenname des gesperrten Werbeguthabens hinzugefügt."); + break; + + case '0.5.7': // SQL queries for v0.5.7 + addDropTableSql('url_blacklist'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Tabelle für URL-Sperrliste gelöscht (nach ext-blacklist verschoben)."); + break; + + case '0.5.8': // SQL queries for v0.5.8 + 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)."); + break; + } // END - switch + +// [EOF] +?> diff --git a/inc/extensions/sponsor/mode-setup.php b/inc/extensions/sponsor/mode-setup.php index 083eeb3492..50fe1cee3c 100644 --- a/inc/extensions/sponsor/mode-setup.php +++ b/inc/extensions/sponsor/mode-setup.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { die(); } // END - if -// @TODO Remove double tabs +// @TODO Remove double tabs from all lines // Try to make it depend on repair addExtensionDependency('repair'); diff --git a/inc/extensions/sql_patches/mode-update.php b/inc/extensions/sql_patches/mode-update.php index ca9b7a9e61..c362157f38 100644 --- a/inc/extensions/sql_patches/mode-update.php +++ b/inc/extensions/sql_patches/mode-update.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { die(); } // END - if -// @TODO Remove double-tabs +// @TODO Remove double tabs from all lines switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 addAdminMenuSql('setup', 'config_extensions', 'Erweitungsmanagement', 'Alle Einstellungen am Erweiterungsmanagement.', 10); @@ -445,8 +445,8 @@ INDEX (`admin_id`)", break; case '0.4.5': // SQL queries for v0.4.5 - addConfigAddSql('last_month', 'CHAR(2) NOT NULL DEFAULT 00'); - addConfigAddSql('last_week', 'CHAR(2) NOT NULL DEFAULT 00'); + addConfigAddSql('last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); + addConfigAddSql('last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Täglichen/wöchentlichen/monatlichen Reset verbessert."); @@ -689,15 +689,15 @@ INDEX (`ip`)", break; case '0.7.5': // SQL queries for v0.7.5 - addConfigAddSql('last_hour', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); + addConfigAddSql('last_hourly', '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)."); break; case '0.7.6': // SQL queries for v0.7.6 - addConfigChangeSql('last_month', 'last_month', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); - addConfigChangeSql('last_week', 'last_week', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); + 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'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Spaltentyp fuer kleine Zahlen sollten auch z.B. TINYINT sein."); @@ -918,22 +918,17 @@ PRIMARY KEY (`server_name_id`) // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt, der die Standard-Referral-Id für SQL-Befehle ausschliesst."); break; - } // END - switch - break; - - case 'modify': // When the extension got modified - break; - - case 'test': // For testing purposes - break; - case 'init': // Do stuff when extension is initialized - break; + case '0.9.8': // SQL queries for v0.9.8 + addConfigChangeSql('last_hour' , 'last_hourly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); + addConfigChangeSql('last_update', 'last_daily' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); + addConfigChangeSql('last_week' , 'last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); + addConfigChangeSql('last_month' , 'last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00'); - default: // Unknown extension mode - reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); - break; -} // END - switch + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Spalten umbenannt, damit die Namen (Verwendung) nun eindeutiger sind."); + break; + } // END - switch // [EOF] ?> diff --git a/inc/extensions/user/mode-update.php b/inc/extensions/user/mode-update.php index 0e882f21b7..bbe1d6c903 100644 --- a/inc/extensions/user/mode-update.php +++ b/inc/extensions/user/mode-update.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { die(); } // END - if -// @TODO Remove double tabs +// @TODO Remove double tabs from all lines switch (getCurrentExtensionVersion()) { case '0.1.0': // SQL queries for v0.1 addConfigAddSql('user_limit', 'INT(7) UNSIGNED NOT NULL DEFAULT 20'); diff --git a/inc/filter-functions.php b/inc/filter-functions.php index 19d95e504b..a15900887c 100644 --- a/inc/filter-functions.php +++ b/inc/filter-functions.php @@ -113,6 +113,8 @@ ORDER BY registerFilter(__FUNCTION__, __LINE__, 'init', 'CHECK_REPOSITORY_REVISION'); registerFilter(__FUNCTION__, __LINE__, 'init', 'RUN_HOURLY_RESET'); registerFilter(__FUNCTION__, __LINE__, 'init', 'RUN_DAILY_RESET'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'RUN_WEEKLY_RESET'); + registerFilter(__FUNCTION__, __LINE__, 'init', 'RUN_MONTHLY_RESET'); registerFilter(__FUNCTION__, __LINE__, 'init', 'TRIGGER_SENDING_POOL'); // @TODO Remove this forced removal after a year or so unregisterFilter(__FUNCTION__, __LINE__, 'init', 'DETERMINE_USERNAME', TRUE); @@ -175,8 +177,14 @@ ORDER BY // Do hourly reset stuff, keep this entry first in this chain: registerFilter(__FUNCTION__, __LINE__, 'hourly', 'RUN_HOURLY_INCLUDES'); - // Do reset stuff, keep this entry first in this chain: - registerFilter(__FUNCTION__, __LINE__, 'reset', 'RUN_RESET_INCLUDES'); + // Do daily stuff, keep this entry first in this chain: + registerFilter(__FUNCTION__, __LINE__, 'daily', 'RUN_DAILY_INCLUDES'); + + // Do weekly stuff, keep this entry first in this chain: + registerFilter(__FUNCTION__, __LINE__, 'weekly', 'RUN_WEEKLY_INCLUDES'); + + // Do monthly stuff, keep this entry first in this chain: + registerFilter(__FUNCTION__, __LINE__, 'monthly', 'RUN_MONTHLY_INCLUDES'); // Remove extension registerFilter(__FUNCTION__, __LINE__, 'extension_remove', 'REMOVE_EXTENSION'); diff --git a/inc/filters.php b/inc/filters.php index bd34939676..e1784f4691 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -583,67 +583,97 @@ function FILTER_RUN_HOURLY_INCLUDES () { // Is the reset set or old sql_patches? if (((!isHourlyResetEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.7.5'))) && (isHtmlOutputMode())) { // Then abort here - reportBug(__FUNCTION__, __LINE__, 'Cannot run reset! enabled='.intval(isHourlyResetEnabled()).',ext_newer[sql_patches:0.7.5]='.intval(isExtensionInstalledAndNewer('sql_patches', '0.7.5')).' Please report this bug. Thanks'); + reportBug(__FUNCTION__, __LINE__, 'Cannot run hourly reset! enabled='.intval(isHourlyResetEnabled()).',ext='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks'); } // END - if - // Get more hourly reset scripts - setIncludePool('hourly', getArrayFromDirectory('inc/hourly/', 'hourly_')); + // Is the config entry set? + if (isExtensionInstalledAndNewer('sql_patches', '0.7.5')) { + // Get more hourly reset scripts + setIncludePool('hourly', getArrayFromDirectory('inc/hourly/', 'hourly_')); - // Update database - if ((!isConfigEntrySet('DEBUG_HOURLY')) || (!isDebugHourlyEnabled())) { - updateConfiguration('last_hour', getHour()); - } // END - if + // Update database + if ((!isConfigEntrySet('DEBUG_HOURLY')) || (!isDebugHourlyEnabled())) { + updateConfiguration('last_hourly', getHour()); + } // END - if - // Run the filter - runFilterChain('load_includes', 'hourly'); + // Run the filter + runFilterChain('load_includes', 'hourly'); + } // END - if } -// Load more reset scripts -function FILTER_RUN_RESET_INCLUDES () { +// Load more daily scripts +function FILTER_RUN_DAILY_INCLUDES () { // Is the reset set or old sql_patches? - if (((!isResetModeEnabled()) || (!isExtensionInstalled('sql_patches'))) && (isHtmlOutputMode())) { + if (((!isDailyResetEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) && (isHtmlOutputMode())) { // Then abort here - reportBug(__FUNCTION__, __LINE__, 'Cannot run reset! enabled='.intval(isResetModeEnabled()).',ext='.intval(isExtensionInstalled('sql_patches')).' Please report this bug. Thanks'); + reportBug(__FUNCTION__, __LINE__, 'Cannot run daily reset! enabled='.intval(isDailyResetEnabled()).',ext='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks'); } // END - if // Get more daily reset scripts - setIncludePool('reset', getArrayFromDirectory('inc/daily/', 'daily_')); + setIncludePool('daily', getArrayFromDirectory('inc/daily/', 'daily_')); // Update configuration if this reset is not being debugged - if (!isDebugResetEnabled()) { - updateConfiguration('last_update', 'UNIX_TIMESTAMP()'); + if (!isDebugDailyEnabled()) { + updateConfiguration('last_daily', getDay()); + } // END - if + + // Run the filter + runFilterChain('load_includes', 'daily'); +} + +// Load more weeklt scripts +function FILTER_RUN_WEEKLY_INCLUDES () { + // Is the reset set or old sql_patches? + if (((!isWeeklyResetDebugEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) && (isHtmlOutputMode())) { + // Then abort here + reportBug(__FUNCTION__, __LINE__, 'Cannot run weekly reset! enabled='.intval(isWeeklyResetDebugEnabled()).',ext='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks'); } // END - if // Is the config entry set? if (isExtensionInstalledAndNewer('sql_patches', '0.4.2')) { // Has it changed? - if (((isConfigEntrySet('last_week')) && (getConfig('last_week') != getWeek())) || (isWeeklyResetDebugEnabled())) { + if (((isConfigEntrySet('last_weekly')) && (getLastWeekly() != getWeek())) || (isWeeklyResetDebugEnabled())) { // Include weekly reset scripts - mergeIncludePool('reset', getArrayFromDirectory('inc/weekly/', 'weekly_')); + setIncludePool('weekly', getArrayFromDirectory('inc/weekly/', 'weekly_')); // Update configuration if this reset is not being debugged if (!isWeeklyResetDebugEnabled()) { - updateConfiguration('last_week', getWeek()); + updateConfiguration('last_weekly', getWeek()); } // END - if } // END - if + // Run the filter + runFilterChain('load_includes', 'weekly'); + } // END - if +} + +// Load more monthly scripts +function FILTER_RUN_MONTHLY_INCLUDES () { + // Is the reset set or old sql_patches? + if (((!isMonthlyResetDebugEnabled()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) && (isHtmlOutputMode())) { + // Then abort here + reportBug(__FUNCTION__, __LINE__, 'Cannot run monthly reset! enabled='.intval(isMonthlyResetDebugEnabled()).',ext='.intval(isExtensionInstalledAndNewer('sql_patches', '0.9.8')).' Please report this bug. Thanks'); + } // END - if + + // Is the config entry set? + if (isExtensionInstalledAndNewer('sql_patches', '0.4.2')) { // Create current month mark $currMonth = getMonth(); // Has it changed? - if ((getLastMonth() != $currMonth) || (isMonthlyResetDebugEnabled())) { + if ((getLastMonthly() != $currMonth) || (isMonthlyResetDebugEnabled())) { // Include monthly reset scripts - mergeIncludePool('reset', getArrayFromDirectory('inc/monthly/', 'monthly_')); + setIncludePool('monthly', getArrayFromDirectory('inc/monthly/', 'monthly_')); // Update configuration if this reset is not being debugged if (!isMonthlyResetDebugEnabled()) { - updateConfiguration('last_month', $currMonth); + updateConfiguration('last_monthly', $currMonth); } // END - if } // END - if } // END - if // Run the filter - runFilterChain('load_includes', 'reset'); + runFilterChain('load_includes', 'monthly'); } // Filter for removing the given extension @@ -792,7 +822,9 @@ function FILTER_TRIGGER_SENDING_POOL () { // Filter for checking and updating SVN revision function FILTER_CHECK_REPOSITORY_REVISION () { // Only execute this filter if installed and all config entries are there - if ((!isInstalled()) || (!isConfigEntrySet('patch_level'))) return; + if ((!isInstalled()) || (!isConfigEntrySet('patch_level'))) { + return; + } // END - if // Check for patch level differences between database and current hard-coded if ((getCurrentRepositoryRevision() > getConfig('patch_level')) || (getConfig('patch_level') == 'CURRENT_REPOSITORY_REVISION') || (getConfig('patch_ctime') == 'UNIX_TIMES')) { @@ -803,31 +835,59 @@ function FILTER_CHECK_REPOSITORY_REVISION () { } // END - if } +// Filter for running hourly reset +function FILTER_RUN_HOURLY_RESET () { + // Only execute this filter if installed + if ((isInstallationPhase()) || (!isInstalled()) || (!isAdminRegistered()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) { + return; + } // END - if + + // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D + if (((getLastHourly() != getHour()) || (isDebugHourlyEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('setup')) && (!isCssOutputMode())) { + // Tell every module we are in reset-mode! + doHourly(); + } // END - if +} + // Filter for running daily reset function FILTER_RUN_DAILY_RESET () { // Only execute this filter if installed - if ((isInstallationPhase()) || (!isInstalled()) || (!isAdminRegistered()) || (!isExtensionInstalled('sql_patches'))) { + if ((isInstallationPhase()) || (!isInstalled()) || (!isAdminRegistered()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) { return; } // END - if // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D - if (((getDay(getConfig('last_update')) != getDay()) || (isDebugResetEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('setup')) && (!isCssOutputMode())) { + if (((getLastDaily() != getDay()) || (isDebugDailyEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('setup')) && (!isCssOutputMode())) { // Tell every module we are in reset-mode! - doReset(); + doDaily(); } // END - if } -// Filter for running hourly reset -function FILTER_RUN_HOURLY_RESET () { +// Filter for running weekly reset +function FILTER_RUN_WEEKLY_RESET () { // Only execute this filter if installed - if ((isInstallationPhase()) || (!isInstalled()) || (!isAdminRegistered()) || (!isExtensionInstalledAndNewer('sql_patches', '0.7.5'))) { + if ((isInstallationPhase()) || (!isInstalled()) || (!isAdminRegistered()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) { return; } // END - if // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D - if ((((isConfigEntrySet('last_hour')) && (getConfig('last_hour') != getHour())) || (isDebugHourlyEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('setup')) && (!isCssOutputMode())) { + if (((getLastWeekly() != getWeek()) || (isDebugWeeklyEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('setup')) && (!isCssOutputMode())) { // Tell every module we are in reset-mode! - doHourly(); + doWeekly(); + } // END - if +} + +// Filter for running monthly reset +function FILTER_RUN_MONTHLY_RESET () { + // Only execute this filter if installed + if ((isInstallationPhase()) || (!isInstalled()) || (!isAdminRegistered()) || (!isExtensionInstalledAndNewer('sql_patches', '0.9.8'))) { + return; + } // END - if + + // Shall we run the reset scripts? If a day has changed, maybe also a week/month has changed... Simple! :D + if (((getLastMonthly() != getMonth()) || (isDebugMonthlyEnabled())) && (!isInstallationPhase()) && (isAdminRegistered()) && (!isGetRequestElementSet('setup')) && (!isCssOutputMode())) { + // Tell every module we are in reset-mode! + doMonthly(); } // END - if } @@ -885,14 +945,14 @@ function FILTER_INIT_RANDOM_NUMBER () { // Update module counter function FILTER_COUNT_MODULE () { - // Is installation phase? - if (isInstallationPhase()) { + // Is installation phase or no admin registered? + if ((isInstallationPhase()) || (!isInstalled()) || (!isAdminRegistered())) { // Then don't count any modules return; } // END - if //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getModule()=' . getModule() . ' - ENTERED!'); - // Do count all other modules but not accesses on CSS file css.php! + // Count module click SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `clicks`=`clicks`+1 WHERE `module`='%s' LIMIT 1", array(getModule()), __FUNCTION__, __LINE__); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getModule()=' . getModule() . ',SQL_AFFECTEDROWS()=' . SQL_AFFECTEDROWS() . ' - EXIT!'); diff --git a/inc/functions.php b/inc/functions.php index ef0c2f1b8e..8470a3a239 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -1628,16 +1628,7 @@ function addNewBonusMail ($data, $mode = '', $output = TRUE) { } } -// Enables the reset mode and runs it -function doReset () { - // Enable the reset mode - $GLOBALS['reset_enabled'] = TRUE; - - // Run filters - runFilterChain('reset'); -} - -// Enables the reset mode (hourly, weekly and monthly) and runs it +// Enables the hourly reset mode and runs it function doHourly () { // Enable the hourly reset mode $GLOBALS['hourly_enabled'] = TRUE; @@ -1646,6 +1637,33 @@ function doHourly () { runFilterChain('hourly'); } +// Enables the daily reset mode and runs it +function doDaily () { + // Enable the reset mode + $GLOBALS['daily_enabled'] = TRUE; + + // Run filters + runFilterChain('daily'); +} + +// Enables the weekly reset mode and runs it +function doWeekly () { + // Enable the reset mode + $GLOBALS['weekly_enabled'] = TRUE; + + // Run filters + runFilterChain('weekly'); +} + +// Enables the monthly reset mode and runs it +function doMonthly () { + // Enable the reset mode + $GLOBALS['monthly_enabled'] = TRUE; + + // Run filters + runFilterChain('monthly'); +} + // Shuts down the mailer (e.g. closing database link, flushing output/filters, etc.) function doShutdown () { // Call the filter chain 'shutdown' diff --git a/inc/language/order_de.php b/inc/language/order_de.php index 04eabde296..a40f0c1975 100644 --- a/inc/language/order_de.php +++ b/inc/language/order_de.php @@ -55,6 +55,7 @@ addMessages(array( 'ADMIN_CONFIG_CHECK_EMAIL_TEXT' => "Sind URLs im Werbetext erlaubt?", '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 - 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 35cbd7ebfb..34c8c28251 100644 --- a/inc/language/other_de.php +++ b/inc/language/other_de.php @@ -45,21 +45,15 @@ addMessages(array( '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_LOCK_PROFILE_TIME' => "Sperrzeit des Mitgliedprofiles nach Änderung (0 = Keine Sperrzeit)", '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_SEND_UPDATE' => "Mail zur Erneurung des Profiles senden?", 'ADMIN_CONFIG_SENDING_TITLE' => "Versand-Optionen", 'ADMIN_CONFIG_NOTIFY_TITLE' => "Benachrichtigungsoptionen", 'ADMIN_CONFIG_TIMEOUT_TITLE' => "Time-out Optionen", - 'ADMIN_CONFIG_PROFILE_TIME_TITLE' => "Zeitenangaben für Mitgliederprofile", - 'ADMIN_CONFIG_PROFILE_UPDATE' => "Profilaktualisierungsinterval (0 = Keine Erinnerung aussenden)", - 'ADMIN_CONFIG_PROFILE_REUPDATE' => "Erneute Aussendung der Mail (0 = Keine Erinnerung aussenden)", 'ADMIN_CONFIG_CODE_LENGTH' => "Länge des grafischen Codes im Best.-Frame (0 = Nur Button anklicken)", 'ADMIN_CODE_LENGTH_NOTICE' => "(Zeichenanzahl)", 'ADMIN_CONFIG_ACTIVATE_EXCHANGE' => "Automatisches Freischalten des {?mt_word2?}, wenn x Mitglieder empfangsbereit sind. 0 = Funktion abschalten", - 'ADMIN_CONFIG_ZIPCODE_ACTIVE' => "Versand nach Postleitzahl (PLZ) erlauben?", 'ADMIN_CONFIG_POINTS_WORD' => "Währung Ihres Tausches (Klammlose, Wernis, Primera, FuCo, etc.)", 'ADMIN_CONFIG_MAX_COMMA' => "Angezeigte Stellen hinter dem Komma", 'ADMIN_CONFIG_CSS_PHP' => "Sollen die CSS-Dateien direkt ausgegeben werden oder von css.php angezeigt werden?", diff --git a/inc/language/profile_de.php b/inc/language/profile_de.php index c8c667e215..a04355abfd 100644 --- a/inc/language/profile_de.php +++ b/inc/language/profile_de.php @@ -42,8 +42,19 @@ if (!defined('__SECURITY')) { // Language definitions addMessages(array( - // Subject lines + // Admin - configuration + 'ADMIN_CONFIG_PROFILE_TITLE' => "Einstellungen zu den Mitgliedsprofilen", + 'ADMIN_CONFIG_LOCK_PROFILE_TIME' => "Sperrzeit des Mitgliedprofiles nach Änderung (0 = Keine Sperrzeit)", + 'ADMIN_CONFIG_PROFILE_TIME_TITLE' => "Zeitenangaben für Mitgliederprofile", + 'ADMIN_CONFIG_PROFILE_UPDATE' => "Profilaktualisierungsinterval (0 = Keine Erinnerung aussenden)", + 'ADMIN_CONFIG_PROFILE_REUPDATE' => "Erneute Aussendung der Mail (0 = Keine Erinnerung aussenden)", + 'ADMIN_CONFIG_PROFILE_NOTICE' => "Hinweise: Derzeit keine für diese Einstellungen vorhanden.", + 'ADMIN_CONFIG_SEND_PROFILE_UPDATE' => "Mail zur Erneurung des Profiles senden?", + + // Member - subject lines 'MEMBER_PROFILE_OUTDATED_SUBJECT' => "Haben Sie Neuigkeiten für uns?", + + // Member - general 'MEMBER_PROFILE_NEVER_CHANGED' => "Sie haben noch nie eine Änderung durchgeführt.", )); diff --git a/inc/libs/profile_functions.php b/inc/libs/profile_functions.php index 6394642c17..196cebc47b 100644 --- a/inc/libs/profile_functions.php +++ b/inc/libs/profile_functions.php @@ -68,12 +68,12 @@ function getResendProfileUpdate () { return $GLOBALS[__FUNCTION__]; } -// Getter for send_prof_update -function getSendProfUpdate () { +// Getter for send_profile_update +function getSendProfileUpdate () { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = getConfig('send_prof_update'); + $GLOBALS[__FUNCTION__] = getConfig('send_profile_update'); } // END - if // Return cache @@ -85,7 +85,7 @@ function isSendProfileUpdateEnabled() { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = (getSendProfUpdate() == 'Y'); + $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('profile', '0.1.0')) && (getSendProfileUpdate() == 'Y')); } // END - if // Return cache diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index 97cd5205a7..7c5217a3d9 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -47,7 +47,7 @@ if (!defined('__SECURITY')) { } // Create timemark from saved month -$mark = mktime(0, 0, 0, getLastMonth(), getDay(), getYear()); +$mark = mktime(0, 0, 0, getLastMonthly(), getDay(), getYear()); $sql = ''; $mode = ''; // Shall I sent activation or deactivation mail? diff --git a/inc/mails/bonus_mails.php b/inc/mails/bonus_mails.php index ef465e5c1c..4cab32d50b 100644 --- a/inc/mails/bonus_mails.php +++ b/inc/mails/bonus_mails.php @@ -47,7 +47,7 @@ if (!defined('__SECURITY')) { } // Create timemark from saved month -$mark = mktime(0, 0, 0, getLastMonth(), getDay(), getYear()); +$mark = mktime(0, 0, 0, getLastMonthly(), getDay(), getYear()); $sql = ''; $mode = ''; // Shall I sent activation or deactivation mail? diff --git a/inc/modules/admin/what-config_other.php b/inc/modules/admin/what-config_other.php index 8b27babbde..3c45ba9720 100644 --- a/inc/modules/admin/what-config_other.php +++ b/inc/modules/admin/what-config_other.php @@ -49,8 +49,6 @@ if (isFormSent('save_config')) { setPostRequestElement('online_timeout' , createEpocheTimeFromSelections('online_timeout' , postRequestArray())); setPostRequestElement('url_tlock' , createEpocheTimeFromSelections('url_tlock' , postRequestArray())); setPostRequestElement('profile_lock' , createEpocheTimeFromSelections('profile_lock' , postRequestArray())); - setPostRequestElement('profile_update' , createEpocheTimeFromSelections('profile_update' , postRequestArray())); - setPostRequestElement('resend_profile_update', createEpocheTimeFromSelections('resend_profile_update', postRequestArray())); // Online-Timeout shall be > 0 or your database will crow and crow and crow... if (!isPostRequestElementSet('online_timeout')) { unsetPostRequestElement('ok'); } @@ -58,8 +56,6 @@ if (isFormSent('save_config')) { // Chedck other timestamps (which can be zero!) if (!isPostRequestElementSet('profile_lock')) { unsetPostRequestElement('ok'); } if (!isPostRequestElementSet('url_tlock')) { unsetPostRequestElement('ok'); } - if (!isPostRequestElementSet('profile_update')) { unsetPostRequestElement('ok'); } - if (!isPostRequestElementSet('resend_profile_update')) { unsetPostRequestElement('ok'); } // Check other settings if (!isPostRequestElementSet('max_send')) { unsetPostRequestElement('ok'); } @@ -75,8 +71,6 @@ if (isFormSent('save_config')) { $content['online_timeout'] = createConfigurationTimeSelections('online_timeout' , 'ms'); $content['url_tlock'] = createConfigurationTimeSelections('url_tlock' , 'WDh'); $content['profile_lock'] = createConfigurationTimeSelections('profile_lock' , 'WDh'); - $content['profile_update'] = createConfigurationTimeSelections('profile_update' , 'YM'); - $content['profile_reupdate'] = createConfigurationTimeSelections('resend_profile_update', 'MWD'); // 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_profile.php b/inc/modules/admin/what-config_profile.php new file mode 100644 index 0000000000..5ffec86acf --- /dev/null +++ b/inc/modules/admin/what-config_profile.php @@ -0,0 +1,73 @@ + diff --git a/inc/modules/admin/what-list_beg.php b/inc/modules/admin/what-list_beg.php index 48f249efbc..0b543c1c1d 100644 --- a/inc/modules/admin/what-list_beg.php +++ b/inc/modules/admin/what-list_beg.php @@ -48,7 +48,7 @@ if (isBegRallyeEnabled()) { if (isPostRequestElementSet('withdraw')) { // Okay, let's prepare... $curr = padLeftZero(getMonth() - 1); - updateConfiguration('last_month', $curr); + updateConfiguration('last_monthly', $curr); displayMessage('{--ADMIN_BEG_WITHDRAW_PREPARED--}'); } // END - if @@ -114,7 +114,7 @@ ORDER BY $content['total_points'] = $total; // Check if we need to display form or not with manuel withdraw - if (getLastMonth() == getMonth()) { + if (getLastMonthly() == getMonth()) { // Load form $content['withdraw_form'] = loadTemplate('admin_list_beg_form', TRUE); } else { diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index f4c804f6e6..ee0a4fba8c 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -48,7 +48,7 @@ if (isBonusRallyeActive()) { if (isPostRequestElementSet('withdraw')) { // Okay, let's prepare... $curr = padLeftZero(getMonth() - 1); - updateConfiguration('last_month', $curr); + updateConfiguration('last_monthly', $curr); displayMessage('{--ADMIN_BONUS_WITHDRAW_PREPARED--}'); } // END - if @@ -124,7 +124,7 @@ ORDER BY $content['total_points'] = $total; // Check if we need to display form or not with manuel withdraw - if (getLastMonth() == getMonth()) { + if (getLastMonthly() == getMonth()) { // Load form $content['withdraw_form'] = loadTemplate('admin_list_bonus_form', TRUE); } else { diff --git a/inc/monthly/monthly_ b/inc/monthly/monthly_ index a6cd3a91d7..9fcaee60c5 100644 --- a/inc/monthly/monthly_ +++ b/inc/monthly/monthly_ @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (isMonthlyResetEnabled())) { // Do not execute when script is in non-HTML mode or no hourly reset return; } elseif (!isExtensionActive('')) { diff --git a/inc/monthly/monthly_beg.php b/inc/monthly/monthly_beg.php index 0d6dd424bd..62d017396f 100644 --- a/inc/monthly/monthly_beg.php +++ b/inc/monthly/monthly_beg.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isMonthlyResetEnabled())) { // Do not execute when script is in non-HTML mode or no hourly reset return; } elseif ((!isExtensionActive('beg')) || (!isBegRallyeEnabled())) { diff --git a/inc/monthly/monthly_bonus.php b/inc/monthly/monthly_bonus.php index eb640a1bac..90ceed68ab 100644 --- a/inc/monthly/monthly_bonus.php +++ b/inc/monthly/monthly_bonus.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isMonthlyResetEnabled())) { // Do not execute when script is in non-HTML mode or no hourly reset return; } elseif (!isExtensionActive('bonus')) { diff --git a/inc/monthly/monthly_newsletter.php b/inc/monthly/monthly_newsletter.php index 58a1aabd41..ab4ee44398 100644 --- a/inc/monthly/monthly_newsletter.php +++ b/inc/monthly/monthly_newsletter.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isMonthlyResetEnabled())) { // Do not execute when script is in non-HTML mode or no hourly reset return; } elseif (!isExtensionActive('newsletter')) { diff --git a/inc/monthly/monthly_surfbar.php b/inc/monthly/monthly_surfbar.php index ce88cf5204..74bb6ba98b 100644 --- a/inc/monthly/monthly_surfbar.php +++ b/inc/monthly/monthly_surfbar.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isMonthlyResetEnabled())) { // Do not execute when script is in non-HTML mode or no hourly reset return; } elseif (!isExtensionActive('surfbar')) { diff --git a/inc/weekly/weekly_ b/inc/weekly/weekly_ index b7b17bb69a..533d6f7d08 100644 --- a/inc/weekly/weekly_ +++ b/inc/weekly/weekly_ @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isWeeklyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('')) { diff --git a/inc/weekly/weekly_surfbar.php b/inc/weekly/weekly_surfbar.php index 07fe708c01..c4bc6b798f 100644 --- a/inc/weekly/weekly_surfbar.php +++ b/inc/weekly/weekly_surfbar.php @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) { +} elseif ((!isHtmlOutputMode()) || (!isWeeklyResetEnabled())) { // Do not execute when script is in non-HTML mode or no daily reset return; } elseif (!isExtensionActive('surfbar')) { diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index ad43853728..1ddfd1145b 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -389,10 +389,28 @@ function isHourlyResetEnabled () { return ((isset($GLOBALS['hourly_enabled'])) && ($GLOBALS['hourly_enabled'] === TRUE)); } -// Checks whether the reset mode is active +// Checks whether the daily reset mode is active +function isDailyResetEnabled () { + // Now simply check it + return ((isset($GLOBALS['daily_enabled'])) && ($GLOBALS['daily_enabled'] === TRUE)); +} + +// Checks whether the weekly reset mode is active +function isWeeklyResetEnabled () { + // Now simply check it + return ((isset($GLOBALS['weekly_enabled'])) && ($GLOBALS['weekly_enabled'] === TRUE)); +} + +// Checks whether the monthly reset mode is active +function isMonthlyResetEnabled () { + // Now simply check it + return ((isset($GLOBALS['monthly_enabled'])) && ($GLOBALS['monthly_enabled'] === TRUE)); +} + +// Checks whether one of the reset modes is enabled function isResetModeEnabled () { // Now simply check it - return ((isset($GLOBALS['reset_enabled'])) && ($GLOBALS['reset_enabled'] === TRUE)); + return ((isHourlyResetEnabled()) || (isDailyResetEnabled()) || (isWeeklyResetEnabled()) || (isMonthlyResetEnabled())); } // Checks whether the debug mode is enabled @@ -419,12 +437,36 @@ function isDebugHourlyEnabled () { return $GLOBALS[__FUNCTION__]; } -// Checks whether the debug reset is enabled -function isDebugResetEnabled () { +// Checks whether the debug daily is enabled +function isDebugDailyEnabled () { + // Is cache set? + if (!isset($GLOBALS[__FUNCTION__])) { + // Simply check it + $GLOBALS[__FUNCTION__] = ((isConfigEntrySet('DEBUG_DAILY')) && (getConfig('DEBUG_DAILY') == 'Y')); + } // END - if + + // Return it + return $GLOBALS[__FUNCTION__]; +} + +// Checks whether the debug weekly is enabled +function isDebugWeeklyEnabled () { + // Is cache set? + if (!isset($GLOBALS[__FUNCTION__])) { + // Simply check it + $GLOBALS[__FUNCTION__] = ((isConfigEntrySet('DEBUG_WEEKLY')) && (getConfig('DEBUG_WEEKLY') == 'Y')); + } // END - if + + // Return it + return $GLOBALS[__FUNCTION__]; +} + +// Checks whether the debug monthly is enabled +function isDebugMonthlyEnabled () { // Is cache set? if (!isset($GLOBALS[__FUNCTION__])) { // Simply check it - $GLOBALS[__FUNCTION__] = ((isConfigEntrySet('DEBUG_RESET')) && (getConfig('DEBUG_RESET') == 'Y')); + $GLOBALS[__FUNCTION__] = ((isConfigEntrySet('DEBUG_MONTHLY')) && (getConfig('DEBUG_MONTHLY') == 'Y')); } // END - if // Return it @@ -2243,12 +2285,48 @@ function getAdminMenu () { return $GLOBALS[__FUNCTION__]; } -// "Getter" for last_month -function getLastMonth () { +// "Getter" for last_hourly +function getLastHourly () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('last_hourly'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for last_daily +function getLastDaily () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('last_daily'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for last_weekly +function getLastWeekly () { + // Is there cache? + if (!isset($GLOBALS[__FUNCTION__])) { + // Determine it + $GLOBALS[__FUNCTION__] = getConfig('last_weekly'); + } // END - if + + // Return cache + return $GLOBALS[__FUNCTION__]; +} + +// "Getter" for last_monthly +function getLastMonthly () { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = getConfig('last_month'); + $GLOBALS[__FUNCTION__] = getConfig('last_monthly'); } // END - if // Return cache diff --git a/install/tables.sql b/install/tables.sql index 377eb78972..a2af6a821d 100644 --- a/install/tables.sql +++ b/install/tables.sql @@ -43,21 +43,17 @@ CREATE TABLE `{?_MYSQL_PREFIX?}_config` ( `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_update` VARCHAR(10) NOT NULL DEFAULT '0', + `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, - `profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT 15768000, - `send_prof_update` ENUM('Y','N') NOT NULL DEFAULT 'Y', - `resend_profile_update` BIGINT(20) UNSIGNED NOT NULL DEFAULT 172800, `patch_level` VARCHAR(100) NOT NULL DEFAULT '0', `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, - `order_multi_page` ENUM('Y','N') NOT NULL DEFAULT 'Y', `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', diff --git a/templates/de/html/admin/admin_config_order.tpl b/templates/de/html/admin/admin_config_order.tpl index 3157100795..5168a0b2b0 100644 --- a/templates/de/html/admin/admin_config_order.tpl +++ b/templates/de/html/admin/admin_config_order.tpl @@ -64,6 +64,13 @@ + +
+ +
+ {%template,ConfigurationYesNoSelectionBox=order_multi_page%} +
+
diff --git a/templates/de/html/admin/admin_config_other.tpl b/templates/de/html/admin/admin_config_other.tpl index d8c640bd93..5a6fb65044 100644 --- a/templates/de/html/admin/admin_config_other.tpl +++ b/templates/de/html/admin/admin_config_other.tpl @@ -187,15 +187,6 @@ - - - {--ADMIN_CONFIG_ZIPCODE_ACTIVE--} - - - {%template,ConfigurationYesNoSelectionBox=order_multi_page%} - - - {--ADMIN_CONFIG_AUTOSEND_ACTIVE--} @@ -211,15 +202,6 @@ - - - {--ADMIN_CONFIG_SEND_UPDATE--} - - - {%template,ConfigurationYesNoSelectionBox=send_prof_update%} - - - {--ADMIN_CONFIG_NOTIFY_ADMIN--} @@ -245,27 +227,6 @@ $content[url_tlock] - - - {--ADMIN_CONFIG_PROFILE_TIME_TITLE--} - - - - - {--ADMIN_CONFIG_LOCK_PROFILE_TIME--}: - $content[profile_lock] - - - - {--ADMIN_CONFIG_PROFILE_UPDATE--}: - $content[profile_update] - - - - {--ADMIN_CONFIG_PROFILE_REUPDATE--}: - $content[profile_reupdate] - - {--ADMIN_CONFIG_SQL_TITLE--} diff --git a/templates/de/html/admin/admin_config_profile.tpl b/templates/de/html/admin/admin_config_profile.tpl new file mode 100644 index 0000000000..4fa7866193 --- /dev/null +++ b/templates/de/html/admin/admin_config_profile.tpl @@ -0,0 +1,52 @@ +
+{%form,formMethodPost=modules.php?module=admin&what=config_other%} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ {--ADMIN_CONFIG_PROFILE_TITLE--} +
+ {--ADMIN_CONFIG_SEND_PROFILE_UPDATE--} + + {%template,ConfigurationYesNoSelectionBox=send_profile_update%} +
+ {--ADMIN_CONFIG_PROFILE_TIME_TITLE--} +
{--ADMIN_CONFIG_LOCK_PROFILE_TIME--}:$content[profile_lock]
{--ADMIN_CONFIG_PROFILE_UPDATE--}:$content[profile_update]
{--ADMIN_CONFIG_PROFILE_REUPDATE--}:$content[profile_reupdate]
+{%form_close%} +
+ +
+ {--ADMIN_CONFIG_PROFILE_NOTICE--} +
-- 2.39.5