Moved template helpers out of regular functions
authorRoland Häder <roland@mxchange.org>
Sun, 25 Nov 2012 00:10:09 +0000 (00:10 +0000)
committerRoland Häder <roland@mxchange.org>
Sun, 25 Nov 2012 00:10:09 +0000 (00:10 +0000)
DOCS/TODOs.txt
inc/email-functions.php

index 331f588e2ffd7e04f2a8a89eaf7adc1f6732497d..a00ba0561457b3873571e7c9176ad0f94f5a7173 100644 (file)
@@ -9,7 +9,7 @@
 ./inc/daily/daily_beg.php:52:// @TODO This should be converted in a daily beg rallye
 ./inc/daily/daily_birthday.php:99:                     // @TODO 4 is hard-coded here, should we move it out in config?
 ./inc/email-functions.php:109: * @TODO Rewrite this to an extension 'smtp'
-./inc/email-functions.php:227:// @TODO $rawUserId is currently unused
+./inc/email-functions.php:205:// @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/ext-html_mail.php:136:                // @TODO Move these arrays into config
 ./inc/functions.php:1102:                      // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ?
 ./inc/functions.php:1188:                      // @TODO Are these convertions still required?
 ./inc/functions.php:1209:// @TODO Rewrite this function to use readFromFile() and writeToFile()
-./inc/functions.php:1817:      // @TODO Find a way to cache this
-./inc/functions.php:1922:      // @TODO This is still very static, rewrite it somehow
-./inc/functions.php:2126:      // @TODO Rename column data_type to e.g. mail_status
-./inc/functions.php:2476:// @TODO cacheFiles is not yet supported
+./inc/functions.php:1814:      // @TODO Find a way to cache this
+./inc/functions.php:1919:      // @TODO This is still very static, rewrite it somehow
+./inc/functions.php:2123:      // @TODO Rename column data_type to e.g. mail_status
+./inc/functions.php:2473:// @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:402:       // @TODO Comparing with DEFAULT_MAIN_TITLE doesn't work
index 1bd2e4e7d74a3cce2e565a3874d4648738c174a9..43cedae31ec08752a2b3822293ea4bd630296379 100644 (file)
@@ -201,28 +201,6 @@ function sendAdminNotification ($subject, $templateName, $content = array(), $us
        }
 }
 
-// ----------------------------------------------------------------------------
-//                           Template helper functions
-// ----------------------------------------------------------------------------
-
-// Helper function to add extra headers to text mails
-function doTemplateAddExtraTextMailHeaders ($templateName, $clear, $extraHeaders = '') {
-       // Run the header through the filter
-       $extraHeaders = runFilterChain('add_extra_text_mail_headers', $extraHeaders);
-
-       // And return it
-       return $extraHeaders;
-}
-
-// Helper function to add extra headers to HTML mails
-function doTemplateAddExtraHtmlMailHeaders ($templateName, $clear, $extraHeaders = '') {
-       // Run the header through the filter
-       $extraHeaders = runFilterChain('add_extra_html_mail_headers', $extraHeaders);
-
-       // And return it
-       return $extraHeaders;
-}
-
 // Send mails for del/edit/lock build modes
 // @TODO $rawUserId is currently unused
 function sendGenericBuildMails ($mode, $tableName, $content, $id, $subjectPart = '', $userIdColumn = array('userid'), $rawUserId = array('userid')) {
@@ -271,5 +249,27 @@ function sendGenericBuildMails ($mode, $tableName, $content, $id, $subjectPart =
        }
 }
 
+// ----------------------------------------------------------------------------
+//                           Template helper functions
+// ----------------------------------------------------------------------------
+
+// Helper function to add extra headers to text mails
+function doTemplateAddExtraTextMailHeaders ($templateName, $clear, $extraHeaders = '') {
+       // Run the header through the filter
+       $extraHeaders = runFilterChain('add_extra_text_mail_headers', $extraHeaders);
+
+       // And return it
+       return $extraHeaders;
+}
+
+// Helper function to add extra headers to HTML mails
+function doTemplateAddExtraHtmlMailHeaders ($templateName, $clear, $extraHeaders = '') {
+       // Run the header through the filter
+       $extraHeaders = runFilterChain('add_extra_html_mail_headers', $extraHeaders);
+
+       // And return it
+       return $extraHeaders;
+}
+
 // [EOF]
 ?>