From 72ac9f672704438aabc4f4bada7f5c3b40499f1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 20 Dec 2009 20:51:31 +0000 Subject: [PATCH] Several fixes/improvements: - Networks are now sorted by short name (in what=list_networks and selection box) - Fix for auto-purging members - 'Der Werbepartner.cc added with basic data. - TODOs.txt updated --- .gitattributes | 1 + DOCS/TODOs.txt | 8 +++++--- inc/autopurge/purge-inact.php | 3 ++- inc/extensions/ext-network.php | 6 ++++++ inc/functions.php | 10 ++++++++-- inc/libs/network_functions.php | 6 +++--- inc/modules/admin/what-list_networks.php | 2 +- templates/de/html/select/select_network_option.tpl | 1 + 8 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 templates/de/html/select/select_network_option.tpl diff --git a/.gitattributes b/.gitattributes index 1d525ea34e..67d78ae2d0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1617,6 +1617,7 @@ templates/de/html/runtime_fatal_row.tpl -text templates/de/html/runtime_fatal_table.tpl -text templates/de/html/select/.htaccess -text templates/de/html/select/select_network_box.tpl -text +templates/de/html/select/select_network_option.tpl -text templates/de/html/show_bonus.tpl -text templates/de/html/show_bonus_footer.tpl -text templates/de/html/show_bonus_header.tpl -text diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index fc09fc44d7..6127752181 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -2,6 +2,7 @@ ### DO NOT EDIT THIS FILE. ### ./beg.php:172: // @TODO Opps, what is missing here??? ./birthday_confirm.php:93: // @TODO Try to rewrite the following unset() +./inc/autopurge/purge-inact.php:56: // @TODO Rewrite these if() blocks to a filter ./inc/cache/config-local.php:125:// @TODO Rewrite the following three constants, somehow... ./inc/classes/cachesystem.class.php:467: // @TODO Add support for more types which break in last else-block ./inc/config-functions.php:143: // @TODO Make this all better... :-/ @@ -25,7 +26,8 @@ ./inc/extensions/ext-network.php:34: * @TODO paid4ad: Waiting for approval * ./inc/extensions/ext-network.php:35: * @TODO secash: Traffic * ./inc/extensions/ext-network.php:36: * @TODO ultraPROMO: Traffic * -./inc/extensions/ext-network.php:89: // @TODO network_type_handle is an internal name and needs documentation +./inc/extensions/ext-network.php:37: * @TODO Der Werbepartner.cc: Has click/banner URL in API response * +./inc/extensions/ext-network.php:90: // @TODO network_type_handle is an internal name and needs documentation ./inc/extensions/ext-newsletter.php:215: // @TODO Move these into configuration ./inc/extensions/ext-rallye.php:330: // @TODO Move this code into rallye_functions.php ./inc/extensions/ext-rallye.php:93: // @TODO Fix config_rallye_prices to list_rallye_prices @@ -46,7 +48,7 @@ ./inc/functions.php:2700:// @TODO Rewrite this function to use readFromFile() and writeToFile() ./inc/functions.php:3579:// @TODO Lame description for this function ./inc/functions.php:3601: // @TODO Move this in a filter -./inc/functions.php:3719: // @TODO This is still very static, rewrite it somehow +./inc/functions.php:3725: // @TODO This is still very static, rewrite it somehow ./inc/functions.php:473: // @TODO Do only use $content, not $DATA or raw variables ./inc/functions.php:543: // @TODO Extension 'msg' does not exist ./inc/functions.php:612:// @TODO Rewrite this to an extension 'smtp' @@ -148,7 +150,7 @@ ./inc/modules/admin/what-refbanner.php:144: // @TODO Rewritings: alt->alternate,cnt->counter,clx->clicks in template ./inc/modules/admin/what-unlock_emails.php:88: // @TODO Rewrite these if-blocks to a filter ./inc/modules/admin/what-unlock_sponsor.php:191: // @TODO Rewritings: remote->remote_addr, created->sponsor_created in template -./inc/modules/admin/what-usage.php:87: // @TODO This code is double, see LOAD_TEMPLATE and loadEmailTemplate in functions.php +./inc/modules/admin/what-usage.php:87: // @TODO This code is double, see loadTemplate() and loadEmailTemplate() in functions.php ./inc/modules/admin/what-usr_online.php:50: // @TODO Add a filter for sponsor ./inc/modules/guest/what-beg.php:59:// @TODO No more needed? define('__BEG_UID_TIMEOUT', createFancyTime(getConfig('beg_userid_timeout'))); ./inc/modules/guest/what-confirm.php:112: // @TODO Try to rewrite the following unset() diff --git a/inc/autopurge/purge-inact.php b/inc/autopurge/purge-inact.php index b4b9ae067f..9bdfb6bb6c 100644 --- a/inc/autopurge/purge-inact.php +++ b/inc/autopurge/purge-inact.php @@ -53,6 +53,7 @@ if (getConfig('autopurge_inactive') == 'Y') { initSqls(); // Init exclusion list + // @TODO Rewrite these if() blocks to a filter $EXCLUDE_LIST = ''; if (getConfig('def_refid') > 0) { $EXCLUDE_LIST = " AND d.userid != ".getConfig('def_refid'); @@ -64,7 +65,7 @@ if (getConfig('autopurge_inactive') == 'Y') { if (isExtensionActive('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_userid').""; // Check for new holiday extension - if (getExtensionVersion('holiday') >= '0.1.3') { + if (isExtensionInstalledAndNewer('holiday', '0.1.3')) { // Include only users with no active holiday $EXCLUDE_LIST .= " AND d.`holiday_active`='N'"; } // END - if diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index b3335819a2..9c4480bdcf 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -34,6 +34,7 @@ * @TODO paid4ad: Waiting for approval * * @TODO secash: Traffic * * @TODO ultraPROMO: Traffic * + * @TODO Der Werbepartner.cc: Has click/banner URL in API response * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * @@ -250,6 +251,7 @@ PRIMARY KEY (`network_reload_id`) ('megad', 'Mega-Ad', 'http://www.mega-ad.de/?ref=303', '|', '|', 'GET', 'WINDOWS-1252'), ('power-promo', 'Power-Promo', 'http://www.power-promo.de?ref=1231', '|', '|', 'GET', 'WINDOWS-1252'), ('secash', 'SeCash', 'http://www.secash.de?ref=758', '|', '|', 'GET', 'WINDOWS-1252'), +('werbepartnercc', 'Der Werbepartner.cc', 'http://www.werbepartner.cc/sponsor/?ref=696', '|', '|', 'GET', 'WINDOWS-1252'), ('yoomedia', 'Yoo!Media Solutions', 'http://www.yoomedia.de?ref=1715', '|', '|', 'GET', 'WINDOWS-1252')"); // Network type handlers - A3H @@ -413,6 +415,8 @@ PRIMARY KEY (`network_reload_id`) (99, 16, 'textlink_view', 'http://www.secash.de/interface/', 'http://www.secash.de/codes/textlinkview.php?id=%ID%&bid=%CID%&aid=%SID%', NULL), (101, 16, 'textmail', 'http://www.secash.de/interface/', 'http://www.secash.de/codes/paidmail.php?id=%ID%&bid=%CID%&aid=%SID%', NULL)"); + // Network type handlers - Der Werbepartner.cc + // Network type handlers - Yoo!Media // Request parameters per type handler - A3H @@ -1246,6 +1250,8 @@ PRIMARY KEY (`network_reload_id`) (685, 16, 101, 'remain', 'uebrig', NULL), (686, 16, 101, 'min_stay', 'ma', NULL)"); + // Request parameters per type handler - Der Werbepartner.cc + // Request parameters per type handler - Yoo!Media // Fix empty defaults to NULL diff --git a/inc/functions.php b/inc/functions.php index c6739d34ed..9f1476473d 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -3686,7 +3686,7 @@ function sendModeMails ($mod, $modes) { } // Generates a 'selection box' from given array -function generateSelectionBoxFromArray ($options, $name, $optionValue, $optionContent) { +function generateSelectionBoxFromArray ($options, $name, $optionValue, $optionContent='') { // Start the output $OUT = '