From c0c6d5d58bdecd22bdcf7dfe5b24bec69e1810c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 22 Jan 2013 23:27:13 +0000 Subject: [PATCH] Rewrote script to use more EL, introduced wrappers for sending pool: - Introduced wrapper function getPaymentTime() and getPaymentPayment() and used both in EL code instead of PHP script - Added new function library "pool-functions.php" - Rewrote reading emails from "pool" table - Rewrote updating of "pool data" - TODOs.txt updated --- .gitattributes | 1 + DOCS/TODOs.txt | 28 ++-- inc/libs/network_functions.php | 24 ++-- inc/libs/surfbar_functions.php | 2 +- inc/modules/admin/what-del_email.php | 13 +- .../what-list_network_array_translation.php | 2 +- .../what-list_network_request_params.php | 2 +- inc/modules/admin/what-list_network_types.php | 2 +- inc/modules/admin/what-unlock_emails.php | 51 ++----- inc/modules/frametester.php | 8 +- inc/modules/member/what-unconfirmed.php | 5 +- inc/modules/order.php | 28 +--- inc/mysql-connect.php | 1 + inc/mysql-manager.php | 17 ++- inc/pool-functions.php | 130 ++++++++++++++++++ inc/pool/pool-user.php | 37 ++--- inc/purge/purge-general.php | 3 +- mailid.php | 6 +- .../emails/member/member_order_accepted.tpl | 12 +- .../de/emails/member/member_order_deleted.tpl | 15 +- .../de/emails/member/member_order_normal.tpl | 4 + .../emails/member/member_order_rejected.tpl | 9 ++ .../emails/member/member_user_pool_normal.tpl | 4 +- .../html/member/member_mail_normal_active.tpl | 2 +- .../html/member/member_mail_normal_admin.tpl | 2 +- .../member/member_mail_normal_deleted.tpl | 2 +- .../de/html/member/member_mail_normal_new.tpl | 2 +- .../html/member/member_mail_normal_send.tpl | 2 +- .../html/member/member_mail_normal_temp.tpl | 2 +- .../html/select/select_network_type_box.tpl | 2 +- 30 files changed, 262 insertions(+), 156 deletions(-) create mode 100644 inc/pool-functions.php diff --git a/.gitattributes b/.gitattributes index 95c965aeac..5bfeb9730b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -856,6 +856,7 @@ inc/phpmailer/phpdoc/media/stylesheet.css svneol=native#text/css inc/phpmailer/test/phpmailer_test.php svneol=native#text/plain inc/phpmailer/test/phpunit.php svneol=native#text/plain inc/phpmailer/test/test.png -text svneol=unset#image/png +inc/pool-functions.php svneol=native#text/plain inc/pool-update.php svneol=native#text/plain inc/pool/.htaccess svneol=native#text/plain inc/pool/pool- svneol=native#text/plain diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 2d24e2bd77..cc00330e31 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -144,7 +144,7 @@ ./inc/modules/admin/what-bonus.php:46:// @TODO Unused at the moment ./inc/modules/admin/what-config_points.php:90: // @TODO Rewrite these two lines for new user_points columns (e.g. locked_order_points) with a filter ./inc/modules/admin/what-config_register.php:79: // @TODO Move this HTML code into a template -./inc/modules/admin/what-del_email.php:57: // @TODO Unused: cat_id +./inc/modules/admin/what-del_email.php:51: // @TODO Unused: cat_id ./inc/modules/admin/what-edit_user.php:18: * @TODO Add support for ext-country * ./inc/modules/admin/what-email_stats.php:46:// @TODO Unused at the moment ./inc/modules/admin/what-extensions.php:366: // @TODO Rewrite this to a filter @@ -173,10 +173,10 @@ ./inc/modules/admin/what-mem_add.php:124: // @TODO This can be somehow rewritten to a function ./inc/modules/admin/what-mem_add.php:63: // @TODO Cant this be rewritten? ./inc/modules/admin/what-mem_add.php:79: // @TODO This can be somehow rewritten to a function -./inc/modules/admin/what-unlock_emails.php:93: // @TODO Rewrite these if-blocks to a filter +./inc/modules/admin/what-unlock_emails.php:78: // @TODO Rewrite these if-blocks to a filter ./inc/modules/admin/what-usage.php:89: // @TODO This code is double, see loadTemplate() and loadEmailTemplate() in functions.php ./inc/modules/admin/what-usr_online.php:49: // @TODO Add a filter for sponsor -./inc/modules/frametester.php:95: // @TODO Rewrite this somehow +./inc/modules/frametester.php:91: // @TODO Rewrite this somehow ./inc/modules/guest/what-beg.php:51:// @TODO No more needed? define('__BEG_USERID_TIMEOUT', createFancyTime(getBegUseridTimeout())); ./inc/modules/guest/what-mediadata.php:188:// @TODO Rewrite all these if-blocks to filters ./inc/modules/guest/what-mediadata.php:67: // @TODO Find a better formular than this one @@ -196,18 +196,20 @@ ./inc/modules/member/what-rallyes.php:99: // @TODO Reactivate this: $content['admin'] = '' . $content['login'] . ''; ./inc/modules/member/what-reflinks.php:52:// @TODO Move this into a filter ./inc/modules/member/what-transfer.php:128: // @TODO Rewrite this to a filter -./inc/modules/member/what-unconfirmed.php:177: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() -./inc/modules/member/what-unconfirmed.php:244: // @TODO cat_id is unused -./inc/modules/member/what-unconfirmed.php:247: // @TODO This 'userid' cannot be saved because of encapsulated EL code -./inc/modules/order.php:78: // @TODO Unused: 2,4 -./inc/mysql-manager.php:1498: // @TODO Rewrite these lines to a filter -./inc/mysql-manager.php:1522: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:1838: // @TODO Rewrite this to a filter -./inc/mysql-manager.php:2006: // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided -./inc/mysql-manager.php:2129: // @TODO Used generic 'userid' here -./inc/mysql-manager.php:2350:// @TODO cacheFiles is not yet supported +./inc/modules/member/what-unconfirmed.php:130: // @TODO This call cannot be saved as EL code cannot be "framed" in other EL code +./inc/modules/member/what-unconfirmed.php:174: // @TODO Try to rewrite this to $content = SQL_FETCHARRAY() +./inc/modules/member/what-unconfirmed.php:241: // @TODO cat_id is unused +./inc/modules/member/what-unconfirmed.php:244: // @TODO This 'userid' cannot be saved because of encapsulated EL code +./inc/modules/order.php:71: // @TODO Unused: timestamp +./inc/mysql-manager.php:1509: // @TODO Rewrite these lines to a filter +./inc/mysql-manager.php:1533: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:1849: // @TODO Rewrite this to a filter +./inc/mysql-manager.php:2017: // @TODO If we can rewrite the EL sub-system to support more than one parameter, this call_user_func_array() can be avoided +./inc/mysql-manager.php:2140: // @TODO Used generic 'userid' here +./inc/mysql-manager.php:2361:// @TODO cacheFiles is not yet supported ./inc/mysql-manager.php:408: // @TODO Try to rewrite this to one or more functions ./inc/mysql-manager.php:44:// @TODO Can we cache this? +./inc/pool-functions.php:44:// @TODO "Hook" ext-html_mail into this to allow column `html_msg` ./inc/revision-functions.php:168:// @TODO This function does also set and get in 'cache_array' ./inc/template-functions.php:1048: // @TODO