From: Roland Häder Date: Wed, 21 Jul 2010 01:55:44 +0000 (+0000) Subject: Moved doTemplateFooBar() down (to match with other include files) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8ec82aa8ce39be68e4087a26f9763b86fc124ed4;p=mailer.git Moved doTemplateFooBar() down (to match with other include files) --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index 5be000cebf..1c009db1b8 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -71,8 +71,8 @@ ./inc/libs/rallye_functions.php:911: // Load count @TODO Can't we rewrite this to our API? ./inc/libs/refback_functions.php:61: // @TODO Try to rewrite the following unset() ./inc/libs/register_functions.php:292: // @TODO Rewrite these all to a single filter -./inc/libs/register_functions.php:365: // @TODO Rewrite this to a filter -./inc/libs/register_functions.php:372: // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable +./inc/libs/register_functions.php:362: // @TODO Rewrite this to a filter +./inc/libs/register_functions.php:369: // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable ./inc/libs/surfbar_functions.php:1540: // @TODO This can be somehow rewritten ./inc/libs/surfbar_functions.php:712:// @TODO Can't we use our new expression language instead of this ugly code? ./inc/libs/surfbar_functions.php:953: // @TODO Invalid salt should be refused @@ -181,13 +181,13 @@ ./inc/reset/reset_beg.php:51:// @TODO This should be converted in a daily beg rallye ./inc/reset/reset_birthday.php:91: // @TODO 4 is hard-coded here, should we move it out in config? ./inc/revision-functions.php:153:// @TODO Please describe this function -./inc/template-functions.php:1168: // @TODO This can be easily moved out after the merge from EL branch to this is complete -./inc/template-functions.php:1201: // @TODO Add a little more infos here -./inc/template-functions.php:1489:// @TODO Lame description for this function -./inc/template-functions.php:1508: // @TODO Move this in a filter -./inc/template-functions.php:295: // @TODO Remove this sanity-check if all is fine -./inc/template-functions.php:608:// @TODO $simple/$constants are deprecated -./inc/template-functions.php:635: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates +./inc/template-functions.php:1132: // @TODO This can be easily moved out after the merge from EL branch to this is complete +./inc/template-functions.php:1165: // @TODO Add a little more infos here +./inc/template-functions.php:1453:// @TODO Lame description for this function +./inc/template-functions.php:1472: // @TODO Move this in a filter +./inc/template-functions.php:261: // @TODO Remove this sanity-check if all is fine +./inc/template-functions.php:572:// @TODO $simple/$constants are deprecated +./inc/template-functions.php:599: // @TODO Do only use $content and deprecate $GLOBALS and $DATA in templates ./inc/wrapper-functions.php:127:// @TODO Implement $compress ./inc/wrapper-functions.php:134:// @TODO Implement $decompress ./inc/wrapper-functions.php:455:// @TODO Do some more sanity check here diff --git a/inc/functions.php b/inc/functions.php index 740dccbd1b..296f031e70 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -2389,9 +2389,9 @@ function makeDatabaseUserId ($userid) { return $userid; } -////////////////////////////////////////////////// -// AUTOMATICALLY RE-GENERATED MISSING FUNCTIONS // -////////////////////////////////////////////////// +//----------------------------------------------------------------------------- +// Automatically re-created functions, all taken from user comments on www.php.net +//----------------------------------------------------------------------------- // if (!function_exists('html_entity_decode')) { // Taken from documentation on www.php.net diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index cc99398621..362597d312 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -621,9 +621,9 @@ function getAdminLastFailure ($adminId) { return $data['last_failure']; } -//***************************************************************************** -// Below only filter functions -//***************************************************************************** +//----------------------------------------------------------------------------- +// Filter Functions +//----------------------------------------------------------------------------- // Filter for adding extra data to the query function FILTER_ADD_EXTRA_SQL_DATA ($add = '') { diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index fae8d5f93f..155196386b 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -269,9 +269,9 @@ function purgeExpiredTurboBonus() { } // END - if } -/////////////////////////////////////////////////////////////////////////////// -// Only filter functions -/////////////////////////////////////////////////////////////////////////////// +//----------------------------------------------------------------------------- +// Filter Functions +//----------------------------------------------------------------------------- // Filter for adding login bonus to the user's account function FILTER_ADD_LOGIN_BONUS () { @@ -312,9 +312,9 @@ LIMIT 1', } } -/////////////////////////////////////////////////////////////////////////////// -// Wrapper functions // -/////////////////////////////////////////////////////////////////////////////// +//----------------------------------------------------------------------------- +// Wrapper Functions +//----------------------------------------------------------------------------- // Determines wether the "bonus rallye" is active function isBonusRallyeActive () { diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 97c6216650..36fa9eb37e 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -319,10 +319,7 @@ function doRegistration () { $countryData = bigintval(postRequestParameter('country_code')); } // END - if - ////////////////////////////// - // Create user's account... // - ////////////////////////////// - // + // Create user's account... SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_data` (`gender`, `surname`, `family`, `street_nr`,%s, `zip`, `city`, `email`, `birth_day`, `birth_month`, `birth_year`, `password`, `max_mails`, `receive_mails`, `refid`, `status`, `user_hash`, `REMOTE_ADDR`, `joined`, `last_update`".$GLOBALS['register_sql_columns'].") diff --git a/inc/libs/theme_functions.php b/inc/libs/theme_functions.php index 1fcbd84415..2b82becd18 100644 --- a/inc/libs/theme_functions.php +++ b/inc/libs/theme_functions.php @@ -302,9 +302,9 @@ function getThemeId ($name) { return $id; } -/////////////////////////////////////////////////////////////////////////////// +//----------------------------------------------------------------------------- // Only filter functions -/////////////////////////////////////////////////////////////////////////////// +//----------------------------------------------------------------------------- // Filter for generic handling of theme change function FILTER_HANDLE_THEME_CHANGE () { diff --git a/inc/mysql-connect.php b/inc/mysql-connect.php index e18c8cec12..8243597d66 100644 --- a/inc/mysql-connect.php +++ b/inc/mysql-connect.php @@ -132,10 +132,6 @@ if ((!isInstalling()) && (!isInstallationPhase())) { addFatalMessage(__FILE__, __LINE__, '{--MYSQL_DATA_MISSING--}'); } } else { - /////////////////////////////////////////////////// - // Include neccessary functions for installation // - /////////////////////////////////////////////////// - // Default output is 'direct' for HTML output setConfigEntry('OUTPUT_MODE', 'direct'); diff --git a/inc/template-functions.php b/inc/template-functions.php index 8f1a88c2dc..7134e1f0f2 100644 --- a/inc/template-functions.php +++ b/inc/template-functions.php @@ -82,40 +82,6 @@ function fixEmptyContentToDashes ($str) { return $str; } -// Color-switch helper function -function doTemplateColorSwitch ($template, $clear = false, $return = true) { - // Is it there? - if (!isset($GLOBALS['color_switch'][$template])) { - // Initialize it - initTemplateColorSwitch($template); - } elseif ($clear === false) { - // Switch color if called from loadTemplate() - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SWITCH:' . $template); - $GLOBALS['color_switch'][$template] = 3 - $GLOBALS['color_switch'][$template]; - } // END - if - - // Return CSS class name - if ($return === true) { - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'RETURN:' . $template . '=' . $GLOBALS['color_switch'][$template]); - return 'switch_sw' . $GLOBALS['color_switch'][$template]; - } // END - if -} - -// Helper function for extension registration link -function doTemplateExtensionRegistrationLink ($template, $dummy, $ext_name) { - // Default is all productive - $OUT = '{--ADMIN_REGISTER_EXTENSION--}'; - - // Is the given extension non-productive? - if (!isExtensionProductive($ext_name)) { - // Non-productive code - $OUT = '{--ADMIN_EXTENSION_IS_NON_PRODUCTIVE_LINK--}'; - } // END - if - - // Return code - return $OUT; -} - // Init color switch function initTemplateColorSwitch ($template) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'INIT:' . $template); @@ -314,9 +280,7 @@ function loadTemplate ($template, $return = false, $content = array()) { $basePath = sprintf("%stemplates/%s/html/", getPath(), getLanguage()); $extraPath = detectExtraTemplatePath($template);; - //////////////////////// - // Generate file name // - //////////////////////// + // Generate FQFN $FQFN = $basePath . $extraPath . $template . '.tpl'; // Does the special template exists? @@ -1700,5 +1664,43 @@ function fixNullEmptyToDashes ($str, $num) { return $return; } +//----------------------------------------------------------------------------- +// Template Helper Functions +//----------------------------------------------------------------------------- + +// Color-switch helper function +function doTemplateColorSwitch ($template, $clear = false, $return = true) { + // Is it there? + if (!isset($GLOBALS['color_switch'][$template])) { + // Initialize it + initTemplateColorSwitch($template); + } elseif ($clear === false) { + // Switch color if called from loadTemplate() + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SWITCH:' . $template); + $GLOBALS['color_switch'][$template] = 3 - $GLOBALS['color_switch'][$template]; + } // END - if + + // Return CSS class name + if ($return === true) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'RETURN:' . $template . '=' . $GLOBALS['color_switch'][$template]); + return 'switch_sw' . $GLOBALS['color_switch'][$template]; + } // END - if +} + +// Helper function for extension registration link +function doTemplateExtensionRegistrationLink ($template, $dummy, $ext_name) { + // Default is all productive + $OUT = '{--ADMIN_REGISTER_EXTENSION--}'; + + // Is the given extension non-productive? + if (!isExtensionProductive($ext_name)) { + // Non-productive code + $OUT = '{--ADMIN_EXTENSION_IS_NON_PRODUCTIVE_LINK--}'; + } // END - if + + // Return code + return $OUT; +} + // [EOF] ?>