Moved doTemplateFooBar() down (to match with other include files)
authorRoland Häder <roland@mxchange.org>
Wed, 21 Jul 2010 01:55:44 +0000 (01:55 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 21 Jul 2010 01:55:44 +0000 (01:55 +0000)
DOCS/TODOs.txt
inc/functions.php
inc/libs/admins_functions.php
inc/libs/bonus_functions.php
inc/libs/register_functions.php
inc/libs/theme_functions.php
inc/mysql-connect.php
inc/template-functions.php

index 5be000cebf65fede2d53dc2fa6018c95a4907b4a..1c009db1b871456bc316d2ec3484d6a0790d3313 100644 (file)
@@ -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/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
 ./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
 ./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/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
 ./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
index 740dccbd1b16e3fce38a15ff94224465a0662e8f..296f031e7027a767dc33f3234d622f4d03c5f976 100644 (file)
@@ -2389,9 +2389,9 @@ function makeDatabaseUserId ($userid) {
        return $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
 //
 if (!function_exists('html_entity_decode')) {
        // Taken from documentation on www.php.net
index cc99398621c5041a0b847dfdcf9056fcb428c1c8..362597d312c9bdeacfa106793d7f4d1ccc2beffe 100644 (file)
@@ -621,9 +621,9 @@ function getAdminLastFailure ($adminId) {
        return $data['last_failure'];
 }
 
        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 = '') {
 
 // Filter for adding extra data to the query
 function FILTER_ADD_EXTRA_SQL_DATA ($add = '') {
index fae8d5f93f7497ba7b524e315922c80cffef51fc..155196386b1743194dacf46a1c0588440a6c615e 100644 (file)
@@ -269,9 +269,9 @@ function purgeExpiredTurboBonus() {
        } // END - if
 }
 
        } // END - if
 }
 
-///////////////////////////////////////////////////////////////////////////////
-//                              Only filter functions
-///////////////////////////////////////////////////////////////////////////////
+//-----------------------------------------------------------------------------
+//                                Filter Functions
+//-----------------------------------------------------------------------------
 
 // Filter for adding login bonus to the user's account
 function FILTER_ADD_LOGIN_BONUS () {
 
 // 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 () {
 
 // Determines wether the "bonus rallye" is active
 function isBonusRallyeActive () {
index 97c6216650a967671876b9d477c9931ee1013c01..36fa9eb37eef60e61b7b7efaa1e5851b64f67c1b 100644 (file)
@@ -319,10 +319,7 @@ function doRegistration () {
                $countryData = bigintval(postRequestParameter('country_code'));
        } // END - if
 
                $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'].")
        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'].")
index 1fcbd844159cced2e35038206ee509bb4a980539..2b82becd18b9b73726e549b96f075eb0b30f139a 100644 (file)
@@ -302,9 +302,9 @@ function getThemeId ($name) {
        return $id;
 }
 
        return $id;
 }
 
-///////////////////////////////////////////////////////////////////////////////
+//-----------------------------------------------------------------------------
 //                              Only filter functions
 //                              Only filter functions
-///////////////////////////////////////////////////////////////////////////////
+//-----------------------------------------------------------------------------
 
 // Filter for generic handling of theme change
 function FILTER_HANDLE_THEME_CHANGE () {
 
 // Filter for generic handling of theme change
 function FILTER_HANDLE_THEME_CHANGE () {
index e18c8cec126d799f2a042497a424bc603f193e16..8243597d6629cef12ed24e8bb615e0c7d14ee839 100644 (file)
@@ -132,10 +132,6 @@ if ((!isInstalling()) && (!isInstallationPhase())) {
                addFatalMessage(__FILE__, __LINE__, '{--MYSQL_DATA_MISSING--}');
        }
 } else {
                addFatalMessage(__FILE__, __LINE__, '{--MYSQL_DATA_MISSING--}');
        }
 } else {
-       ///////////////////////////////////////////////////
-       // Include neccessary functions for installation //
-       ///////////////////////////////////////////////////
-
        // Default output is 'direct' for HTML output
        setConfigEntry('OUTPUT_MODE', 'direct');
 
        // Default output is 'direct' for HTML output
        setConfigEntry('OUTPUT_MODE', 'direct');
 
index 8f1a88c2dc4a520cc5ce0eb3fd79eaf6336db5ca..7134e1f0f2ef68e9ff05e9271d7c37e63153ff8d 100644 (file)
@@ -82,40 +82,6 @@ function fixEmptyContentToDashes ($str) {
        return $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 = '<a title="{--ADMIN_REGISTER_EXTENSION_TITLE--}" href="{%url=modules.php?module=admin&amp;what=extensions&amp;reg_ext=' . $ext_name . '%}">{--ADMIN_REGISTER_EXTENSION--}</a>';
-
-       // Is the given extension non-productive?
-       if (!isExtensionProductive($ext_name)) {
-               // Non-productive code
-               $OUT = '<em style="cursor:help" class="admin_note" title="{%message,ADMIN_EXTENSION_IS_NON_PRODUCTIVE_LINK_TITLE=' . $ext_name . '%}">{--ADMIN_EXTENSION_IS_NON_PRODUCTIVE_LINK--}</em>';
-       } // END - if
-
-       // Return code
-       return $OUT;
-}
-
 // Init color switch
 function initTemplateColorSwitch ($template) {
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'INIT:' . $template);
 // 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);;
 
                $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?
                $FQFN = $basePath . $extraPath . $template . '.tpl';
 
                // Does the special template exists?
@@ -1700,5 +1664,43 @@ function fixNullEmptyToDashes ($str, $num) {
        return $return;
 }
 
        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 = '<a title="{--ADMIN_REGISTER_EXTENSION_TITLE--}" href="{%url=modules.php?module=admin&amp;what=extensions&amp;reg_ext=' . $ext_name . '%}">{--ADMIN_REGISTER_EXTENSION--}</a>';
+
+       // Is the given extension non-productive?
+       if (!isExtensionProductive($ext_name)) {
+               // Non-productive code
+               $OUT = '<em style="cursor:help" class="admin_note" title="{%message,ADMIN_EXTENSION_IS_NON_PRODUCTIVE_LINK_TITLE=' . $ext_name . '%}">{--ADMIN_EXTENSION_IS_NON_PRODUCTIVE_LINK--}</em>';
+       } // END - if
+
+       // Return code
+       return $OUT;
+}
+
 // [EOF]
 ?>
 // [EOF]
 ?>