Rewrote reset and some extensions:
authorRoland Häder <roland@mxchange.org>
Tue, 22 Jan 2013 21:24:57 +0000 (21:24 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 22 Jan 2013 21:24:57 +0000 (21:24 +0000)
- 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

53 files changed:
.gitattributes
DOCS/TODOs.txt
inc/config-functions.php
inc/config-local.php.dist
inc/daily/daily_
inc/daily/daily_100_bonus.php
inc/daily/daily_autopurge.php
inc/daily/daily_beg.php
inc/daily/daily_birthday.php
inc/daily/daily_bonus.php
inc/daily/daily_doubler.php
inc/daily/daily_earning.php
inc/daily/daily_holiday.php
inc/daily/daily_order.php
inc/daily/daily_profile.php
inc/daily/daily_surfbar.php
inc/daily/daily_user.php
inc/daily/daily_user_subids.php
inc/daily/daily_yoomedia.php
inc/extensions/bonus/mode-update.php
inc/extensions/ext-order.php
inc/extensions/ext-profile.php
inc/extensions/ext-sql_patches.php
inc/extensions/order/.htaccess [new file with mode: 0644]
inc/extensions/order/mode-update.php [new file with mode: 0644]
inc/extensions/sponsor/mode-setup.php
inc/extensions/sql_patches/mode-update.php
inc/extensions/user/mode-update.php
inc/filter-functions.php
inc/filters.php
inc/functions.php
inc/language/order_de.php
inc/language/other_de.php
inc/language/profile_de.php
inc/libs/profile_functions.php
inc/mails/beg_mails.php
inc/mails/bonus_mails.php
inc/modules/admin/what-config_other.php
inc/modules/admin/what-config_profile.php [new file with mode: 0644]
inc/modules/admin/what-list_beg.php
inc/modules/admin/what-list_bonus.php
inc/monthly/monthly_
inc/monthly/monthly_beg.php
inc/monthly/monthly_bonus.php
inc/monthly/monthly_newsletter.php
inc/monthly/monthly_surfbar.php
inc/weekly/weekly_
inc/weekly/weekly_surfbar.php
inc/wrapper-functions.php
install/tables.sql
templates/de/html/admin/admin_config_order.tpl
templates/de/html/admin/admin_config_other.tpl
templates/de/html/admin/admin_config_profile.tpl [new file with mode: 0644]

index 8072e2256f209daff0bd33db0c7b13e97cdcb7a4..95c965aeac22ab8df6256082468e3f5c64c4848c 100644 (file)
@@ -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
index 3c9593516cb41fbfdf113ae466cb40da7aac4dc5..821c7cc5fa704c1704bf25ce27465fd0236672b1 100644 (file)
@@ -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
 ./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
 ./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
index d284b5eabd691bff3cc24bb260ff3f74935802cd..25f80bc98908ac444cb917908579426931318a17 100644 (file)
@@ -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',
index 49063403bf76f1aa7f1132b77c4dd57551aed981..b77e105b424a3d572fc8c27d6b2cb6ae45b08d2c 100644 (file)
@@ -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');
index 9dc6242bd7ebc126f03c9cfe5fda8a044bed483f..a513ac847c92f996da5cb25ba1a95bb210ea0522 100644 (file)
@@ -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('')) {
index e62ffbb9f057e861500a9b63f8c3c4db8cbfd0a9..b52693eb1d37687d2a90442aa1867b8253eb24bd 100644 (file)
@@ -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')) {
index 61ef29aa0cdecb61dc5fd24a5f2f972aa9d1925b..77f50775900a4a41012fa64897fc69854a56b732 100644 (file)
@@ -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')) {
index 5970927f954e54010146cf7c42ad69592a8c37a1..19eafa3c502a8f94d420db32aa2b01d9d80c7f30 100644 (file)
@@ -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')) {
index a4de24302ce2160e2166331c9558590a6d5bf78d..7085425d84012bf1f72eed49f5d0d3f849b36756 100644 (file)
@@ -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')) {
index ac7c83c3ab63183a07b9adaddd77f41f8ec94b0d..c3c1423fbbdb6cbade8f5de79def2a581d6b3eb7 100644 (file)
@@ -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')) {
index b6a81caa24d9c7a3ff9201d4f1b68b07e6768426..87b965a91542127615cc4c556fb8725dd31c546f 100644 (file)
@@ -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')) {
index ca7c19ef3cb01eddff1c97d4abd085b90ba741aa..98d024449b9b9572142f866102d9a78c0f9916a5 100644 (file)
@@ -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')) {
index 4f759d7710745af94a141b5ee7fbe5d3e42f6cac..b72ac9c9eece9e6b43f6a16e216ea0d3272d8f3d 100644 (file)
@@ -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')) {
index 2789b2b6ed8007c7f340ae3d2a1057c93f6a7768..0a7f977fbea50ac6c0b0f2a00588036815b05aa1 100644 (file)
@@ -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')) {
index 4fdda8ba0d6939334d5e05c4dc05546e176f07ca..6b97f616f237ecd8429867e8348ff2b8aba8b4ce 100644 (file)
@@ -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')) {
index 9d9790a4eb103b4b1a83def629109451f30d2f70..d211d2e285e63412758b220f6a9d918f237230fa 100644 (file)
@@ -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')) {
index ec4fc49acf6db0684ed9ec24dc8d08174905ff3a..797161265454311ea72adb05162c1804159f95b2 100644 (file)
@@ -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'))) {
index 84df36e3f0f05bc63853bb2ed916691dab96a895..395c879a3f31f833c484d33e95e96e3a43b92c2f 100644 (file)
@@ -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')) {
index d2ecafdbcd33463fb9a1b093894c40429d46ac07..b1916a16dd2bd7ee41178ceafbb593227a50486f 100644 (file)
@@ -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')) {
index 3e9e3a29be272808cce17fad1e95fe0e56003443..ab752f4b1b65982e8165f598a6777fd6b8f6405d 100644 (file)
@@ -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!)
index f6ad5bd84e38120fab9b04a40ba649210b0d8592..77f9ac1016f10d9218b120b0760ef7288d32c39b 100644 (file)
@@ -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&auml;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&auml;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&auml;hlt und bei t&auml;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&ouml;scht, um Probleme zu vermeiden. Fehlende Spalte <span class=\"bad\">mail_order</span> korregiert auf <span class=\"bad\">mail_orders</span>.");
-                               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&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;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 <strong>Patch 340</strong> &uuml;berfl&uuml;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 <u>member_frameset-back.tpl</u> und <u>member_frameset-send.tpl</u> nach <u>member_order_back.tpl</u> und <u>member_order_send.tpl</u> 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 &uuml;berpr&uuml;ft ob auch gen&uuml;gend Empf&auml;nger eingegeben worden sind und ob auch gen&uuml;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&auml;nger pro Mailbuchung einstellbar. Standard: 10 Empf&auml;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&auml;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&ouml;tigen {?POINTS?} die maximale Anzahl von Usern in der Kategorie gew&auml;hlt und
-nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User h&auml;tte nicht gen&uuml;gend {?POINTS?} auf dem Konto. Ein Rechenbeispiel:
-<ol>
-  <li>Das Mitglied w&auml;hlt eine Kategorie XYZ mit maximal 15 Empf&auml;ngern aus.</li>
-  <li>Es stellt die Mailart <u>&quot;3 {?POINTS?} Kosten / Mail&quot;</u> ein.</li>
-  <li>Es hat aber nur {?POINTS?} f&uuml;r 10 Empf&auml;nger und gibt 10 ein.</li>
-  <li>Das Script hatte bis zu dieser Version 3 {?POINTS?} * <u>15</u> = 45 {?POINTS?} gerechnet, hat das Mitglied mehr oder gleich 45 {?POINTS?}, fiehl dieser Fehler nicht
-  auf.</li>
-  <li>Hatte es aber, wie hier im Beispiel 31 {?POINTS?}, konnte es nicht mehr buchen.</li>
-  <li>Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.</li>
-</ol>");
-                               break;
-
-                       case '0.2.7': // SQL queries for v0.2.7
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Fehler mit <u>__MIN_VALUE</u> 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 <strong>order.php</strong> 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&uuml;hrlich.");
-                               break;
-
-                       case '0.3.3': // SQL queries for v0.3.3
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Unter <strong>Einstellungen - Mailbuchungsseite</strong> war immer die Tabellenspalte <strong>Mitgliedsnummer</strong> ausgew&auml;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 <strong>support</strong> und <strong>order</strong> 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 <strong>max_mails</strong>, die durch das Mitglieder ver&auml;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 (<strong>inc/modules/order.php</strong>) wurde fehlerhafterweise die Erweiterung <strong>beg</strong> 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 <strong>WHERE &#96;ext_active&#96;='Y'</strong> 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&uuml;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&uuml; 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&uuml;punkt &quot;Mailbuchungsseite&quot; nach &quot;Mailbuchung&quot; 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&ouml;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&uuml;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&uuml;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 &quot;Werbeguthaben&quot; hinzugef&uuml;gt (verschoben von ext-user) und neue Filter zum Zur&uuml;ckliefern des Werbeguthabens hinzugef&uuml;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&uuml;r gesperrtes Werbeguthaben hinzugef&uuml;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&uuml;r gesperrtes Werbeguthaben hinzugef&uuml;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&uuml;r Spaltenname des gesperrten Werbeguthabens hinzugef&uuml;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&uuml;r URL-Sperrliste gel&ouml;scht (nach <strong>ext-blacklist</strong> verschoben).");
-                               break;
-               } // END - switch
                break;
 
        case 'modify': // When the extension got modified
index 9a83b7ad2f5d6521de0dec5c726ed02d97f57924..614a19a9936edb317fe635fab8fbd4569f450981 100644 (file)
@@ -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 <u>profile_update</u> und <u>prof_reupdate</u> &gt; 0 sind.");
+                               setExtensionUpdateNotes("Profilaktualisierungsmails werden nur dann ausgesendet, wenn <u>profile_update</u> und <u>resend_profile_update</u> &gt; 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&uuml;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]
 ?>
index 7a35a45857a520206288ecf37976ed4e77c6f644..d20ef4055d0ed432629af1ab0b1bc3e5f832836d 100644 (file)
@@ -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 (file)
index 0000000..3a42882
--- /dev/null
@@ -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 (file)
index 0000000..c87577f
--- /dev/null
@@ -0,0 +1,346 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 01/22/2013 *
+ * ===================                          Last change: 01/22/2013 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : mode-update.php                                  *
+ * -------------------------------------------------------------------- *
+ * Short description : Swapped out order system for PRO version         *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Ausgelagertes Buchungssytem fuer PRO-Version     *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+       die();
+} // END - if
+
+// @TODO Remove double-tab from all lines
+               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&auml;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&auml;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&auml;hlt und bei t&auml;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&ouml;scht, um Probleme zu vermeiden. Fehlende Spalte <span class=\"bad\">mail_order</span> korregiert auf <span class=\"bad\">mail_orders</span>.");
+                               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&uuml;punkte im Gast-/Mitgliedsbereich k&ouml;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 <strong>Patch 340</strong> &uuml;berfl&uuml;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 <u>member_frameset-back.tpl</u> und <u>member_frameset-send.tpl</u> nach <u>member_order_back.tpl</u> und <u>member_order_send.tpl</u> 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 &uuml;berpr&uuml;ft ob auch gen&uuml;gend Empf&auml;nger eingegeben worden sind und ob auch gen&uuml;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&auml;nger pro Mailbuchung einstellbar. Standard: 10 Empf&auml;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&auml;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&ouml;tigen {?POINTS?} die maximale Anzahl von Usern in der Kategorie gew&auml;hlt und
+nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User h&auml;tte nicht gen&uuml;gend {?POINTS?} auf dem Konto. Ein Rechenbeispiel:
+<ol>
+  <li>Das Mitglied w&auml;hlt eine Kategorie XYZ mit maximal 15 Empf&auml;ngern aus.</li>
+  <li>Es stellt die Mailart <u>&quot;3 {?POINTS?} Kosten / Mail&quot;</u> ein.</li>
+  <li>Es hat aber nur {?POINTS?} f&uuml;r 10 Empf&auml;nger und gibt 10 ein.</li>
+  <li>Das Script hatte bis zu dieser Version 3 {?POINTS?} * <u>15</u> = 45 {?POINTS?} gerechnet, hat das Mitglied mehr oder gleich 45 {?POINTS?}, fiehl dieser Fehler nicht
+  auf.</li>
+  <li>Hatte es aber, wie hier im Beispiel 31 {?POINTS?}, konnte es nicht mehr buchen.</li>
+  <li>Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.</li>
+</ol>");
+                               break;
+
+                       case '0.2.7': // SQL queries for v0.2.7
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Fehler mit <u>__MIN_VALUE</u> 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 <strong>order.php</strong> 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&uuml;hrlich.");
+                               break;
+
+                       case '0.3.3': // SQL queries for v0.3.3
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Unter <strong>Einstellungen - Mailbuchungsseite</strong> war immer die Tabellenspalte <strong>Mitgliedsnummer</strong> ausgew&auml;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 <strong>support</strong> und <strong>order</strong> 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 <strong>max_mails</strong>, die durch das Mitglieder ver&auml;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 (<strong>inc/modules/order.php</strong>) wurde fehlerhafterweise die Erweiterung <strong>beg</strong> 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 <strong>WHERE &#96;ext_active&#96;='Y'</strong> 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&uuml;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&uuml; 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&uuml;punkt &quot;Mailbuchungsseite&quot; nach &quot;Mailbuchung&quot; 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&ouml;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&uuml;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&uuml;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 &quot;Werbeguthaben&quot; hinzugef&uuml;gt (verschoben von ext-user) und neue Filter zum Zur&uuml;ckliefern des Werbeguthabens hinzugef&uuml;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&uuml;r gesperrtes Werbeguthaben hinzugef&uuml;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&uuml;r gesperrtes Werbeguthaben hinzugef&uuml;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&uuml;r Spaltenname des gesperrten Werbeguthabens hinzugef&uuml;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&uuml;r URL-Sperrliste gel&ouml;scht (nach <strong>ext-blacklist</strong> 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&uuml;gt (vorher: allgemeine <strong>tables.sql</strong>).");
+                               break;
+               } // END - switch
+
+// [EOF]
+?>
index 083eeb3492a241549f8aca07b2903692f225fb14..50fe1cee3ce6d04dbd0e2d88f868987d5a869f26 100644 (file)
@@ -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');
 
index ca9b7a9e61dbe7450f847a70eadd70e4f393c379..c362157f383f10c8d9ea1e84374810ea59fab517 100644 (file)
@@ -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&auml;glichen/w&ouml;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&uuml;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&uuml;gt, der die Standard-Referral-Id f&uuml;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]
 ?>
index 0e882f21b7d7852ced6fc8d05829f1b7b762c3cd..bbe1d6c903beac416727c9b9dcd430850105af7a 100644 (file)
@@ -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');
index 19d95e504bb874553eab155b279d322afcea64d7..a15900887ca212241ca460c020c74a2ed594b826 100644 (file)
@@ -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');
index bd34939676611f5f3afaca6767b2a9377c70923c..e1784f4691065f5af74fff932051b5538f47d158 100644 (file)
@@ -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!');
index ef0c2f1b8ed2c4b2eeee9a9352007dcbc932043e..8470a3a239eb2e7a8ad3fb77d7b07849db039426 100644 (file)
@@ -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'
index 04eabde2963e0b62a7fe0f75cc3cd48b2ed58631..a40f0c1975412838095760b83a7463b0e2f8538b 100644 (file)
@@ -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&auml;ngern wirkt sich nur auf kleinere Buchungen - mit weniger Empf&auml;nger als maximal m&ouml;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",
index 35cbd7ebfb6af22c86a06f060259b31a8b1a2e91..34c8c2825197789381527384e77a6a393da81a38 100644 (file)
@@ -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 &Auml;nderung (0 = Keine Sperrzeit)",
        'ADMIN_CONFIG_AUTOSEND_ACTIVE' => "Ist der Auto-Versand aktiviert?",
        'ADMIN_CONFIG_NOTIFY_ADMIN' => "Benachrichtigung bei Profil&auml;nderung?",
        'ADMIN_CONFIG_MAX_ONLINETIME' => "Timeout f&uuml;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&uuml;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&auml;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&auml;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?",
index c8c667e215442c410861e020c7eca46cf410c3a0..a04355abfd221a35cd4d7ae0d2fd85cfe9ab5846 100644 (file)
@@ -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 &Auml;nderung (0 = Keine Sperrzeit)",
+       'ADMIN_CONFIG_PROFILE_TIME_TITLE' => "Zeitenangaben f&uuml;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' => "<strong>Hinweise:</strong> <em>Derzeit keine f&uuml;r diese Einstellungen vorhanden.</em>",
+       'ADMIN_CONFIG_SEND_PROFILE_UPDATE' => "Mail zur Erneurung des Profiles senden?",
+
+       // Member - subject lines
        'MEMBER_PROFILE_OUTDATED_SUBJECT' => "Haben Sie Neuigkeiten f&uuml;r uns?",
+
+       // Member - general
        'MEMBER_PROFILE_NEVER_CHANGED' => "Sie haben noch nie eine &Auml;nderung durchgef&uuml;hrt.",
 ));
 
index 6394642c17c0428e5bb9b3cd4d45fbe7210a078f..196cebc47b4986dd03ecec609aaeae1424de2d47 100644 (file)
@@ -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
index 97cd5205a735a0d1c65ed4258a1de768f4f894bf..7c5217a3d94838e09f61d24685ee9353784f3c0f 100644 (file)
@@ -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?
index ef465e5c1c573fa970a20a66d8de374df0d7f4dd..4cab32d50b64124bf35a62fc095018aa4a2481c7 100644 (file)
@@ -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?
index 8b27babbde07b2e8e57ff641e67b488cd5d2c680..3c45ba9720ff5a4c130a2011c3b06e3763cde8c1 100644 (file)
@@ -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 (file)
index 0000000..5ffec86
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL                                Start: 10/11/2003 *
+ * ===================                          Last change: 09/21/2004 *
+ *                                                                      *
+ * -------------------------------------------------------------------- *
+ * File              : what-config_other.php                            *
+ * -------------------------------------------------------------------- *
+ * Short description : basic settings                                   *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung  : Grund Einstellungen                              *
+ * -------------------------------------------------------------------- *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
+ *                                                                      *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or    *
+ * (at your option) any later version.                                  *
+ *                                                                      *
+ * This program is distributed in the hope that it will be useful,      *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of       *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
+ * GNU General Public License for more details.                         *
+ *                                                                      *
+ * You should have received a copy of the GNU General Public License    *
+ * along with this program; if not, write to the Free Software          *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,               *
+ * MA  02110-1301  USA                                                  *
+ ************************************************************************/
+
+// Some security stuff...
+if ((!defined('__SECURITY')) || (!isAdmin())) {
+       die();
+} // END - if
+
+// Add description as navigation point
+addYouAreHereLink('admin', __FILE__);
+
+// Stop saving data if one input field is !isset
+if (isFormSent('save_config')) {
+       // Calculate stamps and set calculated stamps
+       setPostRequestElement('profile_lock'         , createEpocheTimeFromSelections('profile_lock'         , postRequestArray()));
+       setPostRequestElement('profile_update'       , createEpocheTimeFromSelections('profile_update'       , postRequestArray()));
+       setPostRequestElement('resend_profile_update', createEpocheTimeFromSelections('resend_profile_update', postRequestArray()));
+
+       // Check other timestamps (which can be zero!)
+       if (!isPostRequestElementSet('profile_lock'))          { unsetPostRequestElement('ok'); }
+       if (!isPostRequestElementSet('profile_update'))        { unsetPostRequestElement('ok'); }
+       if (!isPostRequestElementSet('resend_profile_update')) { unsetPostRequestElement('ok'); }
+} // END - if
+
+if (isFormSent('save_config')) {
+       // Update stamps directly
+       adminSaveSettingsFromPostData();
+} else {
+       // Time selection boxes
+       $content['profile_lock']     = createConfigurationTimeSelections('profile_lock'         , 'WDh');
+       $content['profile_update']   = createConfigurationTimeSelections('profile_update'       , 'YM');
+       $content['profile_reupdate'] = createConfigurationTimeSelections('resend_profile_update', 'MWD');
+
+       // Load template
+       loadTemplate('admin_config_profile', FALSE, $content);
+}
+
+// [EOF]
+?>
index 48f249efbc8c8fb01cb13bc23e74ef63dfb8a632..0b543c1c1d6d02b350dcbd01fd48c324e9aeefa0 100644 (file)
@@ -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 {
index f4c804f6e615e29dd41b51d9db13fa37076c51b1..ee0a4fba8cbe2e0279528e8f8517299613f89d17 100644 (file)
@@ -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 {
index a6cd3a91d7a8619ab928a405957f90befb0fdc42..9fcaee60c5a4fd89a30821cd486542e0c687d3a5 100644 (file)
@@ -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('')) {
index 0d6dd424bdc0aa30dedc16992a6fa9ab826201de..62d017396f93445259f05d156e38cae40ab6ed27 100644 (file)
@@ -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())) {
index eb640a1bac8ae30cfbc5c5092b7702a69aa5c710..90ceed68abe10a93bd7845b4d9e0b09ae8a3f626 100644 (file)
@@ -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')) {
index 58a1aabd418310235984f1c3cd1cc37b3b3aeb87..ab4ee4439807b3b09ccd73a6840e121c6589576e 100644 (file)
@@ -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')) {
index ce88cf52041173b53489859e6c9a49b89f31bd67..74bb6ba98b94eb4a999d15ae9605798232a34730 100644 (file)
@@ -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')) {
index b7b17bb69ade1725297b39da26f9e46f33cd5660..533d6f7d086cc0a90a5cb09e1c5c6b101c73bbd8 100644 (file)
@@ -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('')) {
index 07fe708c018dfc978df835ddb6f7801584adf3cd..c4bc6b798f3944fc528a1b83377a63d6e357351a 100644 (file)
@@ -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')) {
index ad438537284caee8426dee8900fe0f69baef1b08..1ddfd1145b21ead490b752f6fae9532ab8c9154b 100644 (file)
@@ -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
index 377eb78972dd82a13691e48d94bc7b211ee4f1f3..a2af6a821dc27e3e7c958c35a04741b75571c534 100644 (file)
@@ -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',
index 31571007956df28203a0f4dffd10d4bbe5cb68fc..5168a0b2b003e6a7984fe0c20f69ff50d8447565 100644 (file)
                                </select>
                        </div>
                </div>
+
+               <div class="table_row">
+                       <label class="admin_label" for="order_multi_page">{--ADMIN_CONFIG_ORDER_MULTI_PAGE--}</label>
+                       <div align="center">
+                               {%template,ConfigurationYesNoSelectionBox=order_multi_page%}
+                       </div>
+               </div>
        </fieldset>
 
        <fieldset id="config_order_selection_fields">
index d8c640bd938ec6caed64aa60cf8c9e1711fd4fae..5a6fb650442f224d551efe39d7133a29fae16952 100644 (file)
                </td>
        </tr>
 
-       <tr>
-               <td align="right">
-                       {--ADMIN_CONFIG_ZIPCODE_ACTIVE--}
-               </td>
-               <td align="center">
-                       {%template,ConfigurationYesNoSelectionBox=order_multi_page%}
-               </td>
-       </tr>
-
        <tr>
                <td class="bottom" align="right">
                        {--ADMIN_CONFIG_AUTOSEND_ACTIVE--}
                </td>
        </tr>
 
-       <tr>
-               <td align="right">
-                       {--ADMIN_CONFIG_SEND_UPDATE--}
-               </td>
-               <td align="center">
-                       {%template,ConfigurationYesNoSelectionBox=send_prof_update%}
-               </td>
-       </tr>
-
        <tr>
                <td class="bottom" align="right">
                        {--ADMIN_CONFIG_NOTIFY_ADMIN--}
                <td class="bottom">$content[url_tlock]</td>
        </tr>
 
-       <tr>
-               <td colspan="2" align="center" class="table_header bottom">
-                       <strong>{--ADMIN_CONFIG_PROFILE_TIME_TITLE--}</strong>
-               </td>
-       </tr>
-
-       <tr>
-               <td align="right">{--ADMIN_CONFIG_LOCK_PROFILE_TIME--}:</td>
-               <td>$content[profile_lock]</td>
-       </tr>
-
-       <tr>
-               <td align="right">{--ADMIN_CONFIG_PROFILE_UPDATE--}:</td>
-               <td>$content[profile_update]</td>
-       </tr>
-
-       <tr>
-               <td class="bottom" align="right">{--ADMIN_CONFIG_PROFILE_REUPDATE--}:</td>
-               <td class="bottom">$content[profile_reupdate]</td>
-       </tr>
-
        <tr>
                <td colspan="2" align="center" class="table_header bottom">
                        <strong>{--ADMIN_CONFIG_SQL_TITLE--}</strong>
diff --git a/templates/de/html/admin/admin_config_profile.tpl b/templates/de/html/admin/admin_config_profile.tpl
new file mode 100644 (file)
index 0000000..4fa7866
--- /dev/null
@@ -0,0 +1,52 @@
+<div align="center">
+{%form,formMethodPost=modules.php?module=admin&amp;what=config_other%}
+<table border="0" cellspacing="0" cellpadding="0" class="table dashed">
+       <tr>
+               <td colspan="2" align="center" class="table_header bottom">
+                       <strong>{--ADMIN_CONFIG_PROFILE_TITLE--}</strong>
+               </td>
+       </tr>
+
+       <tr>
+               <td class="bottom" align="right">
+                       {--ADMIN_CONFIG_SEND_PROFILE_UPDATE--}
+               </td>
+               <td class="bottom" align="center">
+                       {%template,ConfigurationYesNoSelectionBox=send_profile_update%}
+               </td>
+       </tr>
+
+       <tr>
+               <td colspan="2" align="center" class="table_header bottom">
+                       <strong>{--ADMIN_CONFIG_PROFILE_TIME_TITLE--}</strong>
+               </td>
+       </tr>
+
+       <tr>
+               <td align="right">{--ADMIN_CONFIG_LOCK_PROFILE_TIME--}:</td>
+               <td>$content[profile_lock]</td>
+       </tr>
+
+       <tr>
+               <td align="right">{--ADMIN_CONFIG_PROFILE_UPDATE--}:</td>
+               <td>$content[profile_update]</td>
+       </tr>
+
+       <tr>
+               <td class="bottom" align="right">{--ADMIN_CONFIG_PROFILE_REUPDATE--}:</td>
+               <td class="bottom">$content[profile_reupdate]</td>
+       </tr>
+
+       <tr>
+               <td colspan="2" align="center" class="table_footer">
+                       <input type="reset" class="form_reset" value="{--CLEAR_FORM--}" />
+                       <input type="submit" class="form_submit" name="save_config" value="{--SAVE_SETTINGS--}" />
+               </td>
+       </tr>
+</table>
+{%form_close%}
+</div>
+
+<div class="notice">
+       {--ADMIN_CONFIG_PROFILE_NOTICE--}
+</div>