Several code cleanups:
authorRoland Häder <roland@mxchange.org>
Mon, 11 Jul 2011 18:52:30 +0000 (18:52 +0000)
committerRoland Häder <roland@mxchange.org>
Mon, 11 Jul 2011 18:52:30 +0000 (18:52 +0000)
- Debug lines rewritten to use logDebugMessage() instead of plain print()
- Several calls of addFatalMessage() rewritten to debug_report_bug()
- $data in all filters renamed to $filterData
- Message id cleanup
- Other minor fixes/improvements
- TODOs.txt updated

35 files changed:
DOCS/TODOs.txt
inc/classes/cachesystem.class.php
inc/db/lib-mysql3.php
inc/extensions-functions.php
inc/filter/active_filter.php
inc/filter/admins_filter.php
inc/filter/bonus_filter.php
inc/filter/booking_filter.php
inc/filter/cache_filter.php
inc/filter/coupon_filter.php
inc/filter/mediadata_filter.php
inc/filter/online_filter.php
inc/filter/order_filter.php
inc/filter/other_filter.php
inc/filter/politician_stop_filter.php
inc/filter/rallye_filter.php
inc/filter/removeip_filter.php
inc/filter/surfbar_filter.php
inc/filter/theme_filter.php
inc/filter/timezone_filter.php
inc/filter/uberwach_filter.php
inc/filter/user_filter.php
inc/filters.php
inc/functions.php
inc/install-inc.php
inc/language/de.php
inc/language/surfbar_de.php
inc/libs/refback_functions.php
inc/libs/surfbar_functions.php
inc/libs/yoomedia_functions.php
inc/modules/admin/what-list_cats.php
inc/mysql-connect.php
inc/mysql-manager.php
inc/session-functions.php
inc/template-functions.php

index d17cf67b65cae042bb9a7175055760b6ea5bf649..4e633e84695a3f0d82fa9e6a5db82a049ec037a9 100644 (file)
@@ -55,9 +55,9 @@
 ./inc/functions.php:2200:      // @TODO Rename column data_type to e.g. mail_status
 ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
 ./inc/install-functions.php:57:        // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
 ./inc/functions.php:2200:      // @TODO Rename column data_type to e.g. mail_status
 ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter
 ./inc/install-functions.php:57:        // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestParameter('omode'), 0);
-./inc/language/de.php:1073:    // @TODO Rewrite these two constants
-./inc/language/de.php:1089:    // @TODO Rewrite these three constants
-./inc/language/de.php:763:// @TODO Are these constants longer used?
+./inc/language/de.php:1068:    // @TODO Rewrite these two constants
+./inc/language/de.php:1084:    // @TODO Rewrite these three constants
+./inc/language/de.php:760:// @TODO Are these constants longer used?
 ./inc/language-functions.php:255:      // @TODO These are all valid languages, again hard-coded
 ./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function.
 ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no       *
 ./inc/language-functions.php:255:      // @TODO These are all valid languages, again hard-coded
 ./inc/language-functions.php:44:// @TODO Rewrite all language constants to this function.
 ./inc/language/newsletter_de.php:13: * @TODO This language file is completely out-dated, please do no       *
 ./inc/libs/register_functions.php:367: // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
 ./inc/libs/sponsor_functions.php:159:                                  // @TODO Rewrite this to API function
 ./inc/libs/sponsor_functions.php:430:                  // @TODO Rewrite this to API function
 ./inc/libs/register_functions.php:367: // @TODO Wether the registration bonus should only be added to user directly or through referal system should be configurable
 ./inc/libs/sponsor_functions.php:159:                                  // @TODO Rewrite this to API function
 ./inc/libs/sponsor_functions.php:430:                  // @TODO Rewrite this to API function
-./inc/libs/surfbar_functions.php:1000: // @TODO Invalid salt should be refused
-./inc/libs/surfbar_functions.php:1081: // @TODO Try to rewrite the following unset()
-./inc/libs/surfbar_functions.php:1596:         // @TODO This can be somehow rewritten
-./inc/libs/surfbar_functions.php:711:// @TODO Can't we use our new expression language instead of this ugly code?
+./inc/libs/surfbar_functions.php:1018: // @TODO Invalid salt should be refused
+./inc/libs/surfbar_functions.php:1099: // @TODO Try to rewrite the following unset()
+./inc/libs/surfbar_functions.php:1614:         // @TODO This can be somehow rewritten
+./inc/libs/surfbar_functions.php:729:// @TODO Can't we use our new expression language instead of this ugly code?
 ./inc/libs/task_functions.php:247:             // @TODO These can be rewritten to filter
 ./inc/libs/task_functions.php:51:// @TODO Move all extension-dependent queries into filters
 ./inc/libs/theme_functions.php:93:     // @TODO Can't this be rewritten to an API function?
 ./inc/libs/task_functions.php:247:             // @TODO These can be rewritten to filter
 ./inc/libs/task_functions.php:51:// @TODO Move all extension-dependent queries into filters
 ./inc/libs/theme_functions.php:93:     // @TODO Can't this be rewritten to an API function?
 ./inc/template-functions.php:1077:                     // @TODO Deprecate this thing
 ./inc/template-functions.php:1170:     // @TODO This can be easily moved out after the merge from EL branch to this is complete
 ./inc/template-functions.php:1203:             // @TODO Add a little more infos here
 ./inc/template-functions.php:1077:                     // @TODO Deprecate this thing
 ./inc/template-functions.php:1170:     // @TODO This can be easily moved out after the merge from EL branch to this is complete
 ./inc/template-functions.php:1203:             // @TODO Add a little more infos here
-./inc/template-functions.php:1514:// @TODO Lame description for this function
-./inc/template-functions.php:1536:                     // @TODO Move this in a filter
+./inc/template-functions.php:1517:// @TODO Lame description for this function
+./inc/template-functions.php:1539:                     // @TODO Move this in a filter
 ./inc/template-functions.php:189:       * @TODO On some pages this is buggy
 ./inc/template-functions.php:266:              // @TODO Remove this sanity-check if all is fine
 ./inc/template-functions.php:594:// @TODO $simple/$constants are deprecated
 ./inc/template-functions.php:189:       * @TODO On some pages this is buggy
 ./inc/template-functions.php:266:              // @TODO Remove this sanity-check if all is fine
 ./inc/template-functions.php:594:// @TODO $simple/$constants are deprecated
index 05e488a6158f7392fb4a261fdb834c21113d1a0a..acf69a541067d475ec34b8097532a2a59d8129d7 100644 (file)
@@ -125,7 +125,7 @@ class CacheSystem {
                        $this->writeLine('<?php');
                } else {
                        // Cannot create file
                        $this->writeLine('<?php');
                } else {
                        // Cannot create file
-                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): {--CACHE_PROBLEMS_DETECTED');
+                       debug_report_bug(__METHOD__, __LINE__, 'Problems with cache directory detected, getStatusCode()=' . $this->getStatusCode());
                }
        }
 
                }
        }
 
@@ -226,7 +226,7 @@ class CacheSystem {
                        } // END - foreach
                } else {
                        // Cannot create file
                        } // END - foreach
                } else {
                        // Cannot create file
-                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): {--CACHE_PROBLEMS_DETECTED');
+                       debug_report_bug(__METHOD__, __LINE__, 'Problem with cache detected, no resource! pointer[]=' . gettype($this->pointer));
                }
        }
 
                }
        }
 
@@ -251,7 +251,7 @@ class CacheSystem {
                        // Remove pointer and status
                        unset($this->status[$this->name]);
                        $this->pointer = false;
                        // Remove pointer and status
                        unset($this->status[$this->name]);
                        $this->pointer = false;
-                       //* DEBUG: */ debugOutput(__METHOD__ . '(<font color="#0000aa">' . __LINE__.'</font>): '.$this->name.' - FINALIZED!');
+                       //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, 'name=' . $this->name . ' - FINALIZED!');
                } // END - if
        }
 
                } // END - if
        }
 
@@ -377,7 +377,7 @@ class CacheSystem {
                        } // END - if
                } else {
                        // Cannot write to cache!
                        } // END - if
                } else {
                        // Cannot write to cache!
-                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): {--CACHE_PROBLEMS_DETECTED');
+                       debug_report_bug(__METHOD__, __LINE__, 'Problem with cache detected: Unexpected status ' . $this->status[$this->name]);
                }
        }
 
                }
        }
 
@@ -401,7 +401,7 @@ class CacheSystem {
                        } // END - foreach
                } else {
                        // Cannot write array!
                        } // END - foreach
                } else {
                        // Cannot write array!
-                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): {--CACHE_PROBLEMS_DETECTED');
+                       debug_report_bug(__METHOD__, __LINE__, 'Problem with cache detected: pointer is not resource! pointer[]=' . gettype($this->pointer));
                }
        }
 
                }
        }
 
@@ -438,7 +438,7 @@ class CacheSystem {
                        } // END - if
                } else {
                        // Cannot write to cache!
                        } // END - if
                } else {
                        // Cannot write to cache!
-                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): {--CACHE_PROBLEMS_DETECTED');
+                       debug_report_bug(__METHOD__, __LINE__, 'Problem with cache detected: Unexpected status ' . $this->status[$this->name]);
                }
        }
 
                }
        }
 
@@ -457,10 +457,10 @@ class CacheSystem {
                                // Write cache line to file
                                $this->writeLine($this->rewriteEntry($ext_name, $ext_ver, 'version', true));
                        } // END - if
                                // Write cache line to file
                                $this->writeLine($this->rewriteEntry($ext_name, $ext_ver, 'version', true));
                        } // END - if
-                       //* DEBUG: */ debugOutput(__METHOD__ . '(<font color="#0000aa">' . __LINE__ . '</font>): '.$this->name.' - '.$ext_name.'='.$ext_ver);
+                       //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, 'name=' . $this->name . ',ext_name=' . $ext_name . ',ext_ver=' . $ext_ver);
                } else {
                        // Cannot create file
                } else {
                        // Cannot create file
-                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): {--CACHE_PROBLEMS_DETECTED');
+                       debug_report_bug(__METHOD__, __LINE__, 'Problem with cache detected: pointer is not resource! pointer[]=' . gettype($this->pointer));
                }
        }
 
                }
        }
 
index 03f3079edc7d89284f4ccb775c91db511b7490d7..975cefd78d94adab1f443c120fe78ebb36f29172 100644 (file)
@@ -216,7 +216,7 @@ function SQL_RESULT ($resource, $row, $field = '0') {
 // SQL connect
 function SQL_CONNECT ($host, $login, $password, $F, $L) {
        // Try to connect
 // SQL connect
 function SQL_CONNECT ($host, $login, $password, $F, $L) {
        // Try to connect
-       $linkResource = mysql_connect($host, $login, $password) or addFatalMessage(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error());
+       $linkResource = mysql_connect($host, $login, $password) or debug_report_bug(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error());
 
        // Set the link resource
        SQL_SET_LINK($linkResource);
 
        // Set the link resource
        SQL_SET_LINK($linkResource);
@@ -228,7 +228,7 @@ function SQL_SELECT_DB ($dbName, $F, $L) {
        if (!SQL_IS_LINK_UP()) return false;
 
        // Return the result
        if (!SQL_IS_LINK_UP()) return false;
 
        // Return the result
-       return mysql_select_db($dbName, SQL_GET_LINK()) or addFatalMessage(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error());
+       return mysql_select_db($dbName, SQL_GET_LINK()) or debug_report_bug(__FUNCTION__, __LINE__, $F . ' (' . $L . '):' . mysql_error());
 }
 
 // SQL close link
 }
 
 // SQL close link
@@ -239,8 +239,7 @@ function SQL_CLOSE ($F, $L) {
        } // END - if
 
        // Close database link and forget the link
        } // END - if
 
        // Close database link and forget the link
-       $close = mysql_close(SQL_GET_LINK())
-               or addFatalMessage(__FUNCTION__, __LINE__, $F . ' (' . $L . '):'.mysql_error());
+       $close = mysql_close(SQL_GET_LINK()) or debug_report_bug(__FUNCTION__, __LINE__, $F . ' (' . $L . '):'.mysql_error());
 
        // Close link
        SQL_SET_LINK(null);
 
        // Close link
        SQL_SET_LINK(null);
index acd902dd788a096aca1f2cfdc8e4696518934133..d1c46faf4268dd058cbff96565b9b3b3cff96954 100644 (file)
@@ -1349,19 +1349,19 @@ function initExtensionRuningUpdates () {
 
 // Getter for EXT_UPDATE_DEPENDS flag
 function getExtensionUpdateDependencies () {
 
 // Getter for EXT_UPDATE_DEPENDS flag
 function getExtensionUpdateDependencies () {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName());
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName());
        return $GLOBALS['ext_update_depends'][getCurrentExtensionName()];
 }
 
 // Getter for next iterator depency
 function getExtensionUpdateDependenciesIterator () {
        return $GLOBALS['ext_update_depends'][getCurrentExtensionName()];
 }
 
 // Getter for next iterator depency
 function getExtensionUpdateDependenciesIterator () {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName());
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName());
        return ($GLOBALS['ext_update_depends'][getCurrentExtensionName()][getExtensionUpdateIterator()]);
 }
 
 // Counter for extension update depencies
 function countExtensionUpdateDependencies () {
        return ($GLOBALS['ext_update_depends'][getCurrentExtensionName()][getExtensionUpdateIterator()]);
 }
 
 // Counter for extension update depencies
 function countExtensionUpdateDependencies () {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName());
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName());
        return count($GLOBALS['ext_update_depends'][getCurrentExtensionName()]);
 }
 
        return count($GLOBALS['ext_update_depends'][getCurrentExtensionName()]);
 }
 
@@ -1382,7 +1382,7 @@ function removeExtensionDependency ($ext_name) {
 
 // Init iterator for update depencies
 function initExtensionUpdateIterator () {
 
 // Init iterator for update depencies
 function initExtensionUpdateIterator () {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName());
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName());
        $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()] = '0';
 }
 
        $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()] = '0';
 }
 
@@ -1392,13 +1392,13 @@ function getExtensionUpdateIterator () {
        if (!isset($GLOBALS['ext_depend_iterator'][getCurrentExtensionName()])) initExtensionUpdateIterator();
 
        // Return it
        if (!isset($GLOBALS['ext_depend_iterator'][getCurrentExtensionName()])) initExtensionUpdateIterator();
 
        // Return it
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName().'/'.$GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName().'/'.$GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]);
        return $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()];
 }
 
 // Increments the update iterator
 function incrementExtensionUpdateIterator () {
        return $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()];
 }
 
 // Increments the update iterator
 function incrementExtensionUpdateIterator () {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName());
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName());
        $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]++;
 }
 
        $GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]++;
 }
 
index 7a7c1b248b599944747cc80508091c68a65c4669..02f058572bcc270fd7a67bcb257c16d9cd615d4a 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for adding link to "active list"
 } // END - if
 
 // Filter for adding link to "active list"
-function FILTER_ADD_LINK_ACTIVE_LIST ($data) {
+function FILTER_ADD_LINK_ACTIVE_LIST ($filterData) {
        // Is ext-active/online there?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((isExtensionActive('active')) && (isExtensionActive('online'))) {
        // Is ext-active/online there?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((isExtensionActive('active')) && (isExtensionActive('online'))) {
@@ -59,7 +59,7 @@ function FILTER_ADD_LINK_ACTIVE_LIST ($data) {
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 677f1d295b8d951952b2b769f57f15545084a4fe..d38acb9af7c467d8c16345e2b8f2eae52ea15b14 100644 (file)
@@ -55,14 +55,14 @@ function FILTER_ADD_EXTRA_SQL_DATA ($add = '') {
 }
 
 // Reset the login failures
 }
 
 // Reset the login failures
-function FILTER_RESET_ADMINS_LOGIN_FAILURES ($data) {
+function FILTER_RESET_ADMINS_LOGIN_FAILURES ($filterData) {
        // Store it in session
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        // Store it in session
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
-       setSession('mailer_admin_failures'    , getAdminLoginFailures($data['id']));
-       setSession('mailer_admin_last_failure', getAdminLastFailure($data['id']));
+       setSession('mailer_admin_failures'    , getAdminLoginFailures($filterData['id']));
+       setSession('mailer_admin_last_failure', getAdminLastFailure($filterData['id']));
 
        // Prepare update data
 
        // Prepare update data
-       $postData['login'][getCurrentAdminId()]          = $data['login'];
+       $postData['login'][getCurrentAdminId()]          = $filterData['login'];
        $postData['login_failures'][getCurrentAdminId()] = '0';
        $postData['last_failure'][getCurrentAdminId()]   = null;
 
        $postData['login_failures'][getCurrentAdminId()] = '0';
        $postData['last_failure'][getCurrentAdminId()]   = null;
 
@@ -74,14 +74,14 @@ function FILTER_RESET_ADMINS_LOGIN_FAILURES ($data) {
 
        // Return the data for further processing
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return the data for further processing
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // Count the login failure
 }
 
 // Count the login failure
-function FILTER_COUNT_ADMINS_LOGIN_FAILURE ($data) {
+function FILTER_COUNT_ADMINS_LOGIN_FAILURE ($filterData) {
        // Prepare update data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        // Prepare update data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
-       $postData['login'][getCurrentAdminId()]          = $data['login'];
+       $postData['login'][getCurrentAdminId()]          = $filterData['login'];
        $postData['login_failures'][getCurrentAdminId()] = '`login_failures`+1';
        $postData['last_failure'][getCurrentAdminId()]   = 'NOW()';
 
        $postData['login_failures'][getCurrentAdminId()] = '`login_failures`+1';
        $postData['last_failure'][getCurrentAdminId()]   = 'NOW()';
 
@@ -93,17 +93,17 @@ function FILTER_COUNT_ADMINS_LOGIN_FAILURE ($data) {
 
        // Return the data for further processing
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return the data for further processing
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // Rehashes the given plain admin password and stores it the database
 }
 
 // Rehashes the given plain admin password and stores it the database
-function FILTER_REHASH_ADMINS_PASSWORD ($data) {
+function FILTER_REHASH_ADMINS_PASSWORD ($filterData) {
        // Generate new hash
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        // Generate new hash
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
-       $newHash = generateHash($data['plain_pass']);
+       $newHash = generateHash($filterData['plain_pass']);
 
        // Prepare update data
 
        // Prepare update data
-       $postData['login'][getCurrentAdminId()]    = $data['login'];
+       $postData['login'][getCurrentAdminId()]    = $filterData['login'];
        $postData['password'][getCurrentAdminId()] = $newHash;
 
        // Change it in the admin
        $postData['password'][getCurrentAdminId()] = $newHash;
 
        // Change it in the admin
@@ -111,14 +111,14 @@ function FILTER_REHASH_ADMINS_PASSWORD ($data) {
 
        // Update cookie/session and data array
        setAdminMd5(encodeHashForCookie($newHash));
 
        // Update cookie/session and data array
        setAdminMd5(encodeHashForCookie($newHash));
-       $data['pass_hash'] = $newHash;
+       $filterData['pass_hash'] = $newHash;
 
        // Always make sure the cache is destroyed
        rebuildCache('admin');
 
        // Return the data for further processing
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Always make sure the cache is destroyed
        rebuildCache('admin');
 
        // Return the data for further processing
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index d4cf091b80c56faf4df7fa4a1b26906a9400160b..33c129033884fbc0bee24ff58572e4fa366332a0 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for adding login bonus to the user's account
 } // END - if
 
 // Filter for adding login bonus to the user's account
-function FILTER_ADD_LOGIN_BONUS ($data) {
+function FILTER_ADD_LOGIN_BONUS ($filterData) {
        // Is the user data valid?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isMember()) {
        // Is the user data valid?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isMember()) {
@@ -81,19 +81,21 @@ LIMIT 1',
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // Filter for generating admin mail links for bonus mails
 }
 
 // Filter for generating admin mail links for bonus mails
-function FILTER_GENERATE_BONUS_MAIL_LINKS ($data) {
+function FILTER_GENERATE_BONUS_MAIL_LINKS ($filterData) {
        // Is the type 'bid'?
        // Is the type 'bid'?
-       if ($data['type'] == 'bid') {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+       if ($filterData['type'] == 'bid') {
                // Load template
                // Load template
-               $data['__output'] .= loadTemplate('admin_links_bonus_mail', true, $data);
+               $filterData['__output'] .= loadTemplate('admin_links_bonus_mail', true, $filterData);
        } // END - if
 
        // Return data
        } // END - if
 
        // Return data
-       return $data;
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 1b88ed5f1647a8fe24a5c9a704b5d02538dd9b41..75e564c6286cb18a715a74499828d1ddfb44b326 100644 (file)
@@ -41,14 +41,14 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for adding booking record
 } // END - if
 
 // Filter for adding booking record
-function FILTER_ADD_BOOKING_RECORD ($data) {
+function FILTER_ADD_BOOKING_RECORD ($filterData) {
        // Add a record
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        // Add a record
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
-       addBookingRecord($data['subject'], $data['userid'], $data['points'], $data['mode']);
+       addBookingRecord($filterData['subject'], $filterData['userid'], $filterData['points'], $filterData['mode']);
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 704d3e8f3c74cfc56f15a313df6be84e01794093..c2facdbf999c3dd1384a1a3b2f0c5859c435fbbe 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Destroy the cache on extension changes
 } // END - if
 
 // Destroy the cache on extension changes
-function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
+function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($filterData) {
        // Return the data anyway if there is no cache extension
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isCacheInstanceValid()) {
        // Return the data anyway if there is no cache extension
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isCacheInstanceValid()) {
@@ -57,11 +57,11 @@ function FILTER_CACHE_DESTROY_ON_EXT_CHANGE ($data) {
 
        // Return it
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return it
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // Destroy the cache on changing admin
 }
 
 // Destroy the cache on changing admin
-function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($data) {
+function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($filterData) {
        // Skip this step if the cache instance is not there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isCacheInstanceValid()) {
        // Skip this step if the cache instance is not there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isCacheInstanceValid()) {
@@ -75,11 +75,11 @@ function FILTER_CACHE_DESTROY_ON_ADMIN_CHANGE ($data) {
 
        // Return the data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return the data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // Destroy all cache files
 }
 
 // Destroy all cache files
-function FILTER_CACHE_DESTROY_ALL ($data) {
+function FILTER_CACHE_DESTROY_ALL ($filterData) {
        // Skip this step if the cache instance is not there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isCacheInstanceValid()) {
        // Skip this step if the cache instance is not there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isCacheInstanceValid()) {
@@ -97,11 +97,11 @@ function FILTER_CACHE_DESTROY_ALL ($data) {
        } // END - foreach
 
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        } // END - foreach
 
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // Filter for purging 'filter' cache
 }
 
 // Filter for purging 'filter' cache
-function FILTER_CACHE_DESTROY_FILTER ($data) {
+function FILTER_CACHE_DESTROY_FILTER ($filterData) {
        // Skip this step if the cache instance is not there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((!isCacheInstanceValid()) || ((isConfigEntrySet('update_filter_usage')) && (getConfig('update_filter_usage') != 'Y'))) {
        // Skip this step if the cache instance is not there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((!isCacheInstanceValid()) || ((isConfigEntrySet('update_filter_usage')) && (getConfig('update_filter_usage') != 'Y'))) {
@@ -114,7 +114,7 @@ function FILTER_CACHE_DESTROY_FILTER ($data) {
        } // END - if
 
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        } // END - if
 
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 098c83ec8f68592b670cf31909542c2216a9ff46..4aa7b8e82f195ad21b8fd8fd2abe4eefc3f3ccea 100644 (file)
@@ -41,14 +41,14 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter to change column name for the right "points account"
 } // END - if
 
 // Filter to change column name for the right "points account"
-function FILTER_COUPON_CHANGE_POINTS_COLUMN_NAME ($data) {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+function FILTER_COUPON_CHANGE_POINTS_COLUMN_NAME ($filterData) {
        // Get the column name from extension's name and 'locked'
        // Get the column name from extension's name and 'locked'
-       $data['column'] = getPointsColumnNameFromExtensionNameLocked('coupon', $data['locked']);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+       $filterData['column'] = getPointsColumnNameFromExtensionNameLocked('coupon', $filterData['locked']);
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 54bc2c710ee76d81ecb60dc7ac49ec22d70abe32..4b28c25e3afbdf2933bc9af0938b59a42e356b7b 100644 (file)
@@ -41,14 +41,14 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for updating media data
 } // END - if
 
 // Filter for updating media data
-function FILTER_UPDATE_MEDIADATA_ENTRY ($data) {
+function FILTER_UPDATE_MEDIADATA_ENTRY ($filterData) {
        // Execute the filter function
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        // Execute the filter function
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
-       $data['added'] = ($data['added'] === true && updateMediadataEntry(array('total_points'), $data['mode'], $data['points']));
+       $filterData['added'] = ($filterData['added'] === true && updateMediadataEntry(array('total_points'), $filterData['mode'], $filterData['points']));
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 869e89f444be2cada73f481cebf4eb2bb5c7f87a..e438cc3651217d6361ccb8348d9bddfe2653cde8 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for updates/extends on the online list
 } // END - if
 
 // Filter for updates/extends on the online list
-function FILTER_UPDATE_ONLINE_LIST ($data) {
+function FILTER_UPDATE_ONLINE_LIST ($filterData) {
        // Do not update online list when extension is deactivated
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isExtensionActive('online', true)) {
        // Do not update online list when extension is deactivated
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isExtensionActive('online', true)) {
@@ -124,7 +124,7 @@ LIMIT 1",
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 87e17902ea587023230fffc782ad1c4555e0dd3a..1e508f73a5d5be5a310cea426d18825d44bb28d1 100644 (file)
@@ -41,15 +41,17 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for returning given user's order points
 } // END - if
 
 // Filter for returning given user's order points
-function FILTER_ORDER_POINTS ($data) {
+function FILTER_ORDER_POINTS ($filterData) {
        // Is ext-user installed and active?
        // Is ext-user installed and active?
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (isExtensionActive('user')) {
                // Get the points and add them to the existing
        if (isExtensionActive('user')) {
                // Get the points and add them to the existing
-               $data['points'] += countSumTotalData($data['userid'], 'user_points', 'order_points');
+               $filterData['points'] += countSumTotalData($filterData['userid'], 'user_points', 'order_points');
        } // END - if
 
        // Return the data for next filter
        } // END - if
 
        // Return the data for next filter
-       return $data;
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 029483e975e31e872749b4d5dcf533dbd4a2cb08..4bed3d6c868233e4fb0c91c5850337a2914f7345 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for debugging SQLs
 } // END - if
 
 // Filter for debugging SQLs
-function FILTER_DISPLAY_DEBUG_SQL ($data) {
+function FILTER_DISPLAY_DEBUG_SQL ($filterData) {
        // Shall we display SQL queries?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((isAdmin()) && (isDisplayDebugSqlEnabled()) && (!isGetRequestParameterSet('frame')) && ($GLOBALS['header_sent'] == 2)) {
        // Shall we display SQL queries?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((isAdmin()) && (isDisplayDebugSqlEnabled()) && (!isGetRequestParameterSet('frame')) && ($GLOBALS['header_sent'] == 2)) {
@@ -51,7 +51,7 @@ function FILTER_DISPLAY_DEBUG_SQL ($data) {
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 56ed51f16700e8f519f2f396d96f58da63903de2..c657bdba49c01f7f8fc154c95a0c39b62f270707 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for displaying politician_stop snippet
 } // END - if
 
 // Filter for displaying politician_stop snippet
-function FILTER_DISPLAY_POLITICIAN_STOP_SNIPPET ($data) {
+function FILTER_DISPLAY_POLITICIAN_STOP_SNIPPET ($filterData) {
        // Shall we include the politician_stop snippet?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((!isGetRequestParameterSet('frame')) && (isExtensionActive('politician_stop')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) {
        // Shall we include the politician_stop snippet?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((!isGetRequestParameterSet('frame')) && (isExtensionActive('politician_stop')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) {
@@ -51,7 +51,7 @@ function FILTER_DISPLAY_POLITICIAN_STOP_SNIPPET ($data) {
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 5e7d925e6caefe1f7aedc65d7cee8b491cabad4f..eddeca486d9af567a2111a27d1d0d8deb9e0a18f 100644 (file)
@@ -41,14 +41,14 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for extra-autpurge
 } // END - if
 
 // Filter for extra-autpurge
-function FILTER_RALLYE_EXTRA_AUTOPURGE ($data) {
+function FILTER_RALLYE_EXTRA_AUTOPURGE ($filterData) {
        // Check expired rallyes (hard-coded 3 days limit for displaying expired rallyes!)
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        purgeExpiredReferalRallyes();
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        // Check expired rallyes (hard-coded 3 days limit for displaying expired rallyes!)
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        purgeExpiredReferalRallyes();
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index 850038abb664b553a17810c12187fdd9063c03c5..35dd8d9080ad2f0db3360dc71f2740b0dba18e23 100644 (file)
@@ -41,13 +41,13 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for adding anonymity notice to the output stream
 } // END - if
 
 // Filter for adding anonymity notice to the output stream
-function FILTER_ADD_ANONYMITY_NOTICE ($data) {
+function FILTER_ADD_ANONYMITY_NOTICE ($filterData) {
        // Init content
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        // Init content
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
-       $content = $data;
+       $content = $filterData;
 
        // Extension removeip activated?
 
        // Extension removeip activated?
-       if ((isExtensionActive('removeip')) && (getConfig('removeip_' . strtolower($data['access_level']) . '_show') == 'Y')) {
+       if ((isExtensionActive('removeip')) && (getConfig('removeip_' . strtolower($filterData['access_level']) . '_show') == 'Y')) {
                // Add anoymity/privacy infos
                $content['content'] .= addAnonymityLevel() . "<br />\n";
        } // END - if
                // Add anoymity/privacy infos
                $content['content'] .= addAnonymityLevel() . "<br />\n";
        } // END - if
index 0bd4beb2620b0042a8d916458cc6e659d1951713..e0470d3f0a004ccc122fb866ed2602fc32148e23 100644 (file)
@@ -43,6 +43,7 @@ if (!defined('__SECURITY')) {
 // Filter for changing URL status
 function FILTER_SURFBAR_CHANGE_URL_STATUS ($filterData) {
        // Prepare content for notification routines
 // Filter for changing URL status
 function FILTER_SURFBAR_CHANGE_URL_STATUS ($filterData) {
        // Prepare content for notification routines
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        $filterData['data'][$filterData['url_id']]['url_userid']  = $filterData['data'][$filterData['url_id']]['url_userid'];
        $filterData['data'][$filterData['url_id']]['frametester'] = '{%pipe,generateFrametesterUrl=' . $filterData['data'][$filterData['url_id']]['url'] . '%}';
        $filterData['data'][$filterData['url_id']]['reward']      = '{%config,translateComma=surfbar_static_reward%}';
        $filterData['data'][$filterData['url_id']]['url_userid']  = $filterData['data'][$filterData['url_id']]['url_userid'];
        $filterData['data'][$filterData['url_id']]['frametester'] = '{%pipe,generateFrametesterUrl=' . $filterData['data'][$filterData['url_id']]['url'] . '%}';
        $filterData['data'][$filterData['url_id']]['reward']      = '{%config,translateComma=surfbar_static_reward%}';
@@ -61,23 +62,26 @@ function FILTER_SURFBAR_CHANGE_URL_STATUS ($filterData) {
        SURFBAR_NOTIFY_USER('url_' . strtolower($filterData['data'][$filterData['url_id']]['url_status']) . '_' . $filterData['new_status'], $filterData['data'][$filterData['url_id']]);
 
        // Return filter data
        SURFBAR_NOTIFY_USER('url_' . strtolower($filterData['data'][$filterData['url_id']]['url_status']) . '_' . $filterData['new_status'], $filterData['data'][$filterData['url_id']]);
 
        // Return filter data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        return $filterData;
 }
 
 // Filter for validating status
 function FILTER_SURFBAR_CHANGE_URL_VALIDATE_DATA ($filterData) {
        // Is the new status set?
        return $filterData;
 }
 
 // Filter for validating status
 function FILTER_SURFBAR_CHANGE_URL_VALIDATE_DATA ($filterData) {
        // Is the new status set?
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((!is_string($filterData['new_status'])) || (empty($filterData['new_status']))) {
                // Abort here, but fine!
        if ((!is_string($filterData['new_status'])) || (empty($filterData['new_status']))) {
                // Abort here, but fine!
-               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newStatus[' . gettype($filterData['new_status']) . ']=' . $filterData['new_status'] . ' - EXIT!');
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newStatus[' . gettype($filterData['new_status']) . ']=' . $filterData['new_status'] . ' - EXIT!');
                $filterData['abort'] = true;
                $filterData['abort'] = true;
-       } elseif ($data[$urlId]['url_status'] != $filterData['prev_status']) {
+       } elseif ($filterData[$urlId]['url_status'] != $filterData['prev_status']) {
                // Status is not like prevStatus
                // Status is not like prevStatus
-               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $data[$urlId]['url_status'] . '!=' . $filterData['prev_status'] . ' - EXIT!');
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $filterData[$urlId]['url_status'] . '!=' . $filterData['prev_status'] . ' - EXIT!');
                $filterData['abort'] = false;
        } // END - if
 
        // Return filter data
                $filterData['abort'] = false;
        } // END - if
 
        // Return filter data
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
        return $filterData;
 }
 
        return $filterData;
 }
 
index d969424337fd7e0160ff9858cc7a633acc3d5145..4c8de5c3085530221994d2ba62b44b0bb5f49c62 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for generic handling of theme change
 } // END - if
 
 // Filter for generic handling of theme change
-function FILTER_HANDLE_THEME_CHANGE ($data) {
+function FILTER_HANDLE_THEME_CHANGE ($filterData) {
        // Check if new theme is selcted
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((isPostRequestParameterSet('new_theme')) && (postRequestParameter('new_theme') != getCurrentTheme())) {
        // Check if new theme is selcted
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((isPostRequestParameterSet('new_theme')) && (postRequestParameter('new_theme') != getCurrentTheme())) {
@@ -63,12 +63,13 @@ function FILTER_HANDLE_THEME_CHANGE ($data) {
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // Filter for settings theme from user profile, must be executed only if FILTER_FETCH_USER_DATA() ran before
 }
 
 // Filter for settings theme from user profile, must be executed only if FILTER_FETCH_USER_DATA() ran before
-function FILTER_SET_USERS_THEME ($data) {
+function FILTER_SET_USERS_THEME ($filterData) {
        // Is the user data valid?
        // Is the user data valid?
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (!isMember()) {
                // Do only run for logged in members
                debug_report_bug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.');
        if (!isMember()) {
                // Do only run for logged in members
                debug_report_bug(__FUNCTION__, __LINE__, 'Please only run this filter for logged in users.');
@@ -79,7 +80,7 @@ function FILTER_SET_USERS_THEME ($data) {
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index aa4268ea1ac90d99185d6a040bd30c6949410789..699e4ce16be7b85d8d6f765ef4048668aacfd1bb 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for setting the timezone
 } // END - if
 
 // Filter for setting the timezone
-function FILTER_INIT_TIMEZONE ($data) {
+function FILTER_INIT_TIMEZONE ($filterData) {
        // Just set it if the required function is there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (function_exists('date_default_timezone_set')) {
        // Just set it if the required function is there
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if (function_exists('date_default_timezone_set')) {
@@ -51,7 +51,7 @@ function FILTER_INIT_TIMEZONE ($data) {
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index faa0fe165892b9165d8a15d16567d67bab5c0b41..cf733222e50bed7b39f8f09fa57b2d40c01a23e2 100644 (file)
@@ -41,7 +41,7 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for displaying uberwach snippet
 } // END - if
 
 // Filter for displaying uberwach snippet
-function FILTER_DISPLAY_UBERWACH_SNIPPET ($data) {
+function FILTER_DISPLAY_UBERWACH_SNIPPET ($filterData) {
        // Shall we include the uberwach snippet?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((!isGetRequestParameterSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) {
        // Shall we include the uberwach snippet?
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
        if ((!isGetRequestParameterSet('frame')) && (isExtensionActive('uberwach')) && (getModule() != 'admin') && ($GLOBALS['header_sent'] == 2)) {
@@ -51,7 +51,7 @@ function FILTER_DISPLAY_UBERWACH_SNIPPET ($data) {
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
 
        // Return data
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
-       return $data;
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index d0b8cdc5c4dbe760f484fc7ea0f11aa1a8e9dd78..71920260f0a84127b9a88d549b464cf953d75ab6 100644 (file)
@@ -41,12 +41,14 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Filter for returning given user's points
 } // END - if
 
 // Filter for returning given user's points
-function FILTER_USER_POINTS ($data) {
+function FILTER_USER_POINTS ($filterData) {
        // Get the points and add them to the existing
        // Get the points and add them to the existing
-       $data['points'] += countSumTotalData($content['userid'], 'user_points', 'points');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+       $filterData['points'] += countSumTotalData($content['userid'], 'user_points', 'points');
 
        // Return the data for next filter
 
        // Return the data for next filter
-       return $data;
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+       return $filterData;
 }
 
 // [EOF]
 }
 
 // [EOF]
index c6c27638b724cf956058d515ee9eff3dbf63457b..5a52b5e742e56957376780c0611d11f7872b7a0b 100644 (file)
@@ -54,7 +54,7 @@ function FILTER_FLUSH_FILTERS () {
        // Is a database link here and not in installation mode?
        if ((!SQL_IS_LINK_UP()) && (!isInstalling())) {
                // Abort here
        // Is a database link here and not in installation mode?
        if ((!SQL_IS_LINK_UP()) && (!isInstalling())) {
                // Abort here
-               addFatalMessage(__FUNCTION__, __LINE__, '{--FILTER_FLUSH_FAILED_NO_DATABASE--}');
+               debug_report_bug(__FUNCTION__, __LINE__, 'No database link is up. Cannot flush filters.');
                return false;
        } // END - if
 
                return false;
        } // END - if
 
@@ -137,7 +137,7 @@ function FILTER_CALL_HANDLER_LOGIN_FAILTURES ($data) {
        $content = $data;
 
        // Handle failed logins here if not in guest
        $content = $data;
 
        // Handle failed logins here if not in guest
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "type=".$data['type'].",action=".getAction().",what=".getWhat().",level=".$data['access_level']."<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'type=' . $data['type'] . ',action=' . getAction() . ',what=' . getWhat() . ',level=' . $data['access_level']);
        if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getIndexHome()))) && ($data['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.6')))) {
                // Handle failure
                $content['content'] .= handleLoginFailures($data['access_level']);
        if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getIndexHome()))) && ($data['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.6')))) {
                // Handle failure
                $content['content'] .= handleLoginFailures($data['access_level']);
index 6c44c5f1ca1ddb892f32356d4f6ec55cbb4eec8c..bb9301f583dab251416ae0c5890016fec60251c2 100644 (file)
@@ -105,7 +105,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
                // Is the webmaster!
                $toEmail = getWebmaster();
        }
                // Is the webmaster!
                $toEmail = getWebmaster();
        }
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "TO={$toEmail}<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'TO=' . $toEmail);
 
        // Check for PHPMailer or debug-mode
        if ((!checkPhpMailerUsage()) || (isDebugModeEnabled())) {
 
        // Check for PHPMailer or debug-mode
        if ((!checkPhpMailerUsage()) || (isDebugModeEnabled())) {
@@ -1569,7 +1569,7 @@ function rebuildCache ($cache, $inc = '', $force = false) {
                        // Is the include there?
                        if (isIncludeReadable($inc)) {
                                // And rebuild it from scratch
                        // Is the include there?
                        if (isIncludeReadable($inc)) {
                                // And rebuild it from scratch
-                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "inc={$inc} - LOADED!<br />");
+                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'inc=' . $inc . ' - LOADED!');
                                loadInclude($inc);
                        } else {
                                // Include not found
                                loadInclude($inc);
                        } else {
                                // Include not found
@@ -1744,7 +1744,7 @@ function shutdown () {
                SQL_CLOSE(__FUNCTION__, __LINE__);
        } elseif (!isInstallationPhase()) {
                // No database link
                SQL_CLOSE(__FUNCTION__, __LINE__);
        } elseif (!isInstallationPhase()) {
                // No database link
-               addFatalMessage(__FUNCTION__, __LINE__, '{--NO_DB_LINK_SHUTDOWN--}');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Database link is already down, while shutdown is running.');
        }
 
        // Stop executing here
        }
 
        // Stop executing here
@@ -1988,7 +1988,7 @@ function initCacheInstance () {
        // Did it work?
        if ($GLOBALS['cache_instance']->getStatusCode() != 'done') {
                // Failed to initialize cache sustem
        // Did it work?
        if ($GLOBALS['cache_instance']->getStatusCode() != 'done') {
                // Failed to initialize cache sustem
-               addFatalMessage(__FUNCTION__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): {--CACHE_CANNOT_INITIALIZE--}');
+               debug_report_bug(__FUNCTION__, __LINE__, 'Cache system returned with unexpected error. getStatusCode()=' . $GLOBALS['cache_instance']->getStatusCode());
        } // END - if
 }
 
        } // END - if
 }
 
index 681e7c14aa5bf0f802276cad573ab586cb6f0aad..18af33b97dc2d136af0e86564ce398ec2efe379f 100644 (file)
@@ -200,9 +200,11 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                                // You have submitted data then we have to reset the SQLs
                                initSqls();
 
                                // You have submitted data then we have to reset the SQLs
                                initSqls();
 
-                               // Restore PHPs error handler to prevent ours to handle errors,
-                               // e.g. failed connection attempts. We want to handle them on
-                               // our own.
+                               /*
+                                * Restore PHPs error handler to prevent ours to handle errors,
+                                * e.g. failed connection attempts. We want to handle them on
+                                * our own.
+                                */
                                restore_error_handler();
 
                                // Connect to database server
                                restore_error_handler();
 
                                // Connect to database server
@@ -215,7 +217,7 @@ if ((!isInstalled()) || (!isAdminRegistered())) {
                                                // Check for dumps
                                                if ((!isFileReadable(postRequestParameter('spath') . 'install/tables.sql')) || (!isFileReadable(postRequestParameter('spath') . 'install/menu-'.getLanguage().'.sql'))) {
                                                        // Installation area not found
                                                // Check for dumps
                                                if ((!isFileReadable(postRequestParameter('spath') . 'install/tables.sql')) || (!isFileReadable(postRequestParameter('spath') . 'install/menu-'.getLanguage().'.sql'))) {
                                                        // Installation area not found
-                                                       addFatalMessage(__FILE__, __LINE__, '{--INSTALL_MISSING_DUMPS--}');
+                                                       debug_report_bug(__FILE__, __LINE__, 'SQL dumps not found. Please extract ALL files from the archive or checkout all files out from SVN.');
                                                        return;
                                                } // END - if
 
                                                        return;
                                                } // END - if
 
index a5d7e6530e6f81152f651a3464253357e9b44cd4..8f0dc5d699a1194e5c51fc93dab6113ae60b28f6 100644 (file)
@@ -145,9 +145,6 @@ addMessages(array(
        'ADMIN_MENU_IS_ACTIVE' => "Men&uuml;punkt ist aktiviert",
        'ADMIN_CREATE_ACTION_FIRST' => "Bitte erstellen Sie zuerst die action-xxxxx.php Datei. Dann k&ouml;nnen Sie sie hier ausw&auml;hlen.",
        'ADMIN_IS_FIRST_MENU' => "Ist das erste Hauptmen&uuml;",
        'ADMIN_MENU_IS_ACTIVE' => "Men&uuml;punkt ist aktiviert",
        'ADMIN_CREATE_ACTION_FIRST' => "Bitte erstellen Sie zuerst die action-xxxxx.php Datei. Dann k&ouml;nnen Sie sie hier ausw&auml;hlen.",
        'ADMIN_IS_FIRST_MENU' => "Ist das erste Hauptmen&uuml;",
-       'NO_DB_LINK' => "Keine Verbindung zur Datenbank.",
-       'NO_DB_LINK_SHUTDOWN' => "Keine Verbindung zur Datenbank beim Schliessen der Verbindung.",
-       'MYSQL_DATA_MISSING' => "Die Konfiguration Ihrer Datenbankverbindung ist unnvollst&auml;ndig. Bitte in <strong>{?CACHE_PATH?}config-local.php</strong> mindestens den Hostnamen, Datenbanknamen und Login zur Datenbank eingeben.",
        'REGISTER_PERSONAL_DATA' => "Pers&ouml;nliche Daten",
        'REGISTER_CATEGORIES' => "Interessengebiete",
        'REGISTER_MISC' => "Passwort, maximale Mails pro Tag etc.",
        'REGISTER_PERSONAL_DATA' => "Pers&ouml;nliche Daten",
        'REGISTER_CATEGORIES' => "Interessengebiete",
        'REGISTER_MISC' => "Passwort, maximale Mails pro Tag etc.",
@@ -876,8 +873,6 @@ addMessages(array(
        'SORT_DESCENDING' => "Absteigend",
        'INVALID_EMAIL_ENTERED' => "Ung&uuml;tige EMail-Adresse eingegeben.",
        'NEVER_HAPPENED' => "Nie",
        'SORT_DESCENDING' => "Absteigend",
        'INVALID_EMAIL_ENTERED' => "Ung&uuml;tige EMail-Adresse eingegeben.",
        'NEVER_HAPPENED' => "Nie",
-       'WRONG_DB_SELECTED' => "Falsche oder fehlende Datenbank ausgew&auml;hlt.",
-       'NO_CONFIG_FOUND' => "Keine Konfigurationsdaten gefunden! (Leere Datenbank? Oder haben Sie die SQL-Dateien in andere Datenbank eingespielt?)",
        'NO_CONFIG_FOUND_TITLE' => "Keine Konfigurationsdaten gefunden.",
        'SORTING_KEY' => "Sortierung",
        'ADMIN_ADD_REFERAL_BANNER_TITLE' => "Neuen Werbebanner hinzuf&uuml;gen",
        'NO_CONFIG_FOUND_TITLE' => "Keine Konfigurationsdaten gefunden.",
        'SORTING_KEY' => "Sortierung",
        'ADMIN_ADD_REFERAL_BANNER_TITLE' => "Neuen Werbebanner hinzuf&uuml;gen",
@@ -1116,7 +1111,6 @@ addMessages(array(
        'FILTER_FAILED_ALREADY_ADDED' => "Die Filterfunktion <span class=\"data\">%s</span> ist bereits der Filterkette <span class=\"data\">%s</span> hinzugef&uuml;gt.",
        'FILTER_FAILED_NO_FILTER_FOUND' => "Die Filterkette <span class=\"data\">%s</span> konnte nicht gefunden werden.",
        'FILTER_FAILED_NOT_REMOVED' => "Die Filterfunktion <span class=\"data\">%s</span> konnte nicht aus der Filterkette <span class=\"data\">%s</span> entfernt werden, da sie nicht existiert.",
        'FILTER_FAILED_ALREADY_ADDED' => "Die Filterfunktion <span class=\"data\">%s</span> ist bereits der Filterkette <span class=\"data\">%s</span> hinzugef&uuml;gt.",
        'FILTER_FAILED_NO_FILTER_FOUND' => "Die Filterkette <span class=\"data\">%s</span> konnte nicht gefunden werden.",
        'FILTER_FAILED_NOT_REMOVED' => "Die Filterfunktion <span class=\"data\">%s</span> konnte nicht aus der Filterkette <span class=\"data\">%s</span> entfernt werden, da sie nicht existiert.",
-       'FILTER_FLUSH_FAILED_NO_DATABASE' => "Kann die Filterketten nicht speichern. Datenbank fehlt.",
 
        // Status changes
        'ADMIN_STATUS_CHANGED' => "Es wurden <span class=\"data\">%s</span> von <span class=\"data\">%s</span> Eintr&auml;gen ge&auml;ndert.",
 
        // Status changes
        'ADMIN_STATUS_CHANGED' => "Es wurden <span class=\"data\">%s</span> von <span class=\"data\">%s</span> Eintr&auml;gen ge&auml;ndert.",
@@ -1126,9 +1120,7 @@ addMessages(array(
        'ADMIN_MENU_WHAT_404_TITLE' => "Untermen&uuml; &#39;%s&#39; deaktiviert, da keine Scriptdatei auf dem Server gefunden wurde.",
 
        // Cache messages
        'ADMIN_MENU_WHAT_404_TITLE' => "Untermen&uuml; &#39;%s&#39; deaktiviert, da keine Scriptdatei auf dem Server gefunden wurde.",
 
        // Cache messages
-       'CACHE_PROBLEMS_DETECTED' => "Probleme mit dem Cache-Subsystem erkannt.",
        'CACHE_CANNOT_LOAD' => "Kann nicht Cache-Datei <strong><span class=\"data\">%s</span></strong> laden.",
        'CACHE_CANNOT_LOAD' => "Kann nicht Cache-Datei <strong><span class=\"data\">%s</span></strong> laden.",
-       'CACHE_CANNOT_INITIALIZE' => "Konnte das Caching-System nicht initialisieren. Bitte die Dokumentation <strong>DOCS/de/cache/README.txt</strong> lesen.",
        'CACHE_CANNOT_UNLINK' => "Kann nicht die Cache-Datei <strong><span class=\"data\">%s</span></strong> vom Server entfernen.",
 
        // Expert settings
        'CACHE_CANNOT_UNLINK' => "Kann nicht die Cache-Datei <strong><span class=\"data\">%s</span></strong> vom Server entfernen.",
 
        // Expert settings
index 5c86862ddf8c10f152dbf09c7f9825bb44bc0245..ee670c7e64c740385667532ab9b5936a9bf3db36 100644 (file)
@@ -248,11 +248,6 @@ addMessages(array(
        'MEMBER_SURFBAR_ACTION_PAUSE_TITLE' => "Halten Sie die URL in der Surfbar kurz an, wenn sie gerade nicht erreichbar ist. Dies geschieht nicht automatisch.",
        'MEMBER_SURFBAR_ACTION_UNPAUSE_TITLE' => "Lassen Sie die URL in der Surfbar weiterlaufen, wenn Sie dies m&ouml;chten. Wir m&uuml;ssen die URL jedoch erneut freigeben.",
 
        'MEMBER_SURFBAR_ACTION_PAUSE_TITLE' => "Halten Sie die URL in der Surfbar kurz an, wenn sie gerade nicht erreichbar ist. Dies geschieht nicht automatisch.",
        'MEMBER_SURFBAR_ACTION_UNPAUSE_TITLE' => "Lassen Sie die URL in der Surfbar weiterlaufen, wenn Sie dies m&ouml;chten. Wir m&uuml;ssen die URL jedoch erneut freigeben.",
 
-       // Internal errors
-       'MEMBER_SURFBAR_EXECUTE_ACTION_404' => "Auszuf&uuml;hrende Funktion <span class=\"data\">%s</span> nicht gefunden.",
-       'ADMIN_SURFBAR_NOTIFY_SUBJECT_404' => "Admin-Betreffzeile <span class=\"data\">%s</span> nicht gefunden.",
-       'MEMBER_SURFBAR_NOTIFY_SUBJECT_404' => "Mitglieder-Betreffzeile <span class=\"data\">%s</span> nicht gefunden.",
-
        // Guest texts
        'GUEST_SURFBAR_LOGIN_HEADER' => "Login zur Surfbar:",
 ));
        // Guest texts
        'GUEST_SURFBAR_LOGIN_HEADER' => "Login zur Surfbar:",
 ));
index 3414e4fabe73cee918299627a2a9afc678453c6e..92a13150aef08dfb99f2d86f48252abfc9296989 100644 (file)
@@ -42,7 +42,7 @@ if (!defined('__SECURITY')) {
 
 // Payback refback for refid and reduce it for current user
 function addRefbackPoints ($userid, $ref, $points, $ref_points) {
 
 // Payback refback for refid and reduce it for current user
 function addRefbackPoints ($userid, $ref, $points, $ref_points) {
-       //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $ref . ',points=' . $points . ',ref_points=' . $ref_points . ' - ENTERED!');
        // Back ref depths
        $GLOBALS['refback_depth'][$userid][$ref] = $GLOBALS['ref_level'];
 
        // Back ref depths
        $GLOBALS['refback_depth'][$userid][$ref] = $GLOBALS['ref_level'];
 
@@ -60,35 +60,35 @@ function addRefbackPoints ($userid, $ref, $points, $ref_points) {
                unset($GLOBALS['ref_level']);
 
                // "Walk" through all refids
                unset($GLOBALS['ref_level']);
 
                // "Walk" through all refids
-               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$ref},level={$content['level']},points={$points}<br />");
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $ref . ',level=' . $content['level'] . ',points=' . $points);
                foreach (getArrayFromRefbackLevel($userid, $content['level']) as $refid) {
                        // Skip level zero or if both are the same
                        if ($userid == $refid) continue;
 
                        // Get refback percents
                        $percents = getRefbackPercents($userid, $refid);
                foreach (getArrayFromRefbackLevel($userid, $content['level']) as $refid) {
                        // Skip level zero or if both are the same
                        if ($userid == $refid) continue;
 
                        // Get refback percents
                        $percents = getRefbackPercents($userid, $refid);
-                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$ref},refid={$refid},points={$points},percents={$percents}<br />");
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $ref . ',refid=' . $refid . ',points=' . $points . ',percents=' . $percents);
 
                        // Some percents given?
                        if ($percents > 0) {
 
                        // Some percents given?
                        if ($percents > 0) {
-                               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):points={$points},perc={$content['percents']},percents={$percents},level={$content['level']}<br />");
+                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'points=' . $points . ',[percents]=' . $content['percents'] . ',percents=' . $percents . ',level=' . $content['level']);
                                // Calculate points for refback
                                $refback = $points * ($content['percents'] / 100) * ($percents / 100);
 
                                // Update refback table ('refid' and 'userid' must be exchanged!)
                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_refs` SET `points`=`points`+%s WHERE `userid`=%s AND `refid`=%s LIMIT 1",
                                        array($refback, $refid, $userid), __FUNCTION__, __LINE__);
                                // Calculate points for refback
                                $refback = $points * ($content['percents'] / 100) * ($percents / 100);
 
                                // Update refback table ('refid' and 'userid' must be exchanged!)
                                SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_refs` SET `points`=`points`+%s WHERE `userid`=%s AND `refid`=%s LIMIT 1",
                                        array($refback, $refid, $userid), __FUNCTION__, __LINE__);
-                               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):refback={$refback},userid={$userid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")<br />");
+                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refback=' . $refback . ',userid=' . $userid . ',refid=' . $refid . ' - UPDATE! (' . SQL_AFFECTEDROWS() . ')');
 
                                // Add points again, but only directly
 
                                // Add points again, but only directly
-                               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):refback={$refback}<br />");
+                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refback=' . $refback);
                                addPointsDirectly(sprintf("refback:%s", $refid), $userid, $refback);
 
                                // Reduce points if refid is found
                                if ($refid == $ref) {
                                        // Reduce points here!
                                        $return = $points * ($content['percents'] / 100) - $refback;
                                addPointsDirectly(sprintf("refback:%s", $refid), $userid, $refback);
 
                                // Reduce points if refid is found
                                if ($refid == $ref) {
                                        // Reduce points here!
                                        $return = $points * ($content['percents'] / 100) - $refback;
-                                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):points={$return} - REDUCED<br />");
+                                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'return=' . $return . ' - REDUCED!');
                                } // END - if
                        } // END - if
                } // END foreach
                                } // END - if
                        } // END - if
                } // END foreach
@@ -101,14 +101,13 @@ function addRefbackPoints ($userid, $ref, $points, $ref_points) {
        $GLOBALS['ref_level'] = $GLOBALS['refback_depth'][$userid][$ref];
 
        // Return them
        $GLOBALS['ref_level'] = $GLOBALS['refback_depth'][$userid][$ref];
 
        // Return them
-       //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $ref . ',points=' . $points . ',ref_points=' . $ref_points . ',return=' . $return . ' - ENTERED!');
        return $return;
 }
 
 // "Getter" for refback percents
 function getRefbackPercents ($userid, $ref) {
        return $return;
 }
 
 // "Getter" for refback percents
 function getRefbackPercents ($userid, $ref) {
-       //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
-       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$ref}<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $ref . ' - ENTERED!');
        // Skip identical ids
        if ($userid == $ref) return 0;
 
        // Skip identical ids
        if ($userid == $ref) return 0;
 
@@ -125,10 +124,9 @@ function getRefbackPercents ($userid, $ref) {
                if (SQL_NUMROWS($result) == 1) {
                        // Fetch percents
                        list($GLOBALS['refback_percents'][$userid][$ref]) = SQL_FETCHROW($result);
                if (SQL_NUMROWS($result) == 1) {
                        // Fetch percents
                        list($GLOBALS['refback_percents'][$userid][$ref]) = SQL_FETCHROW($result);
-                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):percents=".$GLOBALS['refback_percents'][$userid][$ref]."<br />");
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $ref . ',percents=' . $GLOBALS['refback_percents'][$userid][$ref]);
                } else {
                        // Debug log
                } else {
                        // Debug log
-                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>): NO ENTRY FOUND! :-(<br />");
                        logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $ref . ' - No entry found. :-(');
                }
 
                        logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $ref . ' - No entry found. :-(');
                }
 
@@ -137,14 +135,13 @@ function getRefbackPercents ($userid, $ref) {
        } // END - if
 
        // Return percents
        } // END - if
 
        // Return percents
-       //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $ref . ',refback_percents=' . $GLOBALS['refback_percents'][$userid][$ref] . ' - EXIT!');
        return $GLOBALS['refback_percents'][$userid][$ref];
 }
 
 // "Getter" for userid array which will return only one entry
 function getArrayFromRefbackLevel ($refid, $level) {
        return $GLOBALS['refback_percents'][$userid][$ref];
 }
 
 // "Getter" for userid array which will return only one entry
 function getArrayFromRefbackLevel ($refid, $level) {
-       //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
-       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):refid={$refid},level={$level}<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refid=' . $refid . ',level=' . $level);
        // Init userids
        $userIds = array();
 
        // Init userids
        $userIds = array();
 
@@ -160,11 +157,11 @@ ORDER BY
                array($refid, $level), __FUNCTION__, __LINE__);
 
        // Entries found?
                array($refid, $level), __FUNCTION__, __LINE__);
 
        // Entries found?
-       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):numRows=".SQL_NUMROWS($result)."<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'numRows=' . SQL_NUMROWS($result));
        if (!SQL_HASZERONUMS($result)) {
                // Add all
                while ($content = SQL_FETCHARRAY($result)) {
        if (!SQL_HASZERONUMS($result)) {
                // Add all
                while ($content = SQL_FETCHARRAY($result)) {
-                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):refid={$refid},level={$level},userid={$content['userid']}<br />");
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refid=' . $refid . ',level=' . $level . ',userid=' . $content['userid']);
                        $userIds[] = $content['userid'];
                } // END - while
        } // END - if
                        $userIds[] = $content['userid'];
                } // END - while
        } // END - if
@@ -173,17 +170,17 @@ ORDER BY
        SQL_FREERESULT($result);
 
        // Return array
        SQL_FREERESULT($result);
 
        // Return array
-       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):refid={$refid},count()=".count($userIds)."<br />");
-       //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'refid=' . $refid . ',userIds()=' . count($userIds) . ' - EXIT!');
        return $userIds;
 }
 
 // Update "refback table"
 function updateRefbackTable ($userid) {
        return $userIds;
 }
 
 // Update "refback table"
 function updateRefbackTable ($userid) {
-       //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
        // Make it sure referal level zero (member him-/herself) is at least selected
        // Make it sure referal level zero (member him-/herself) is at least selected
-       if (empty($GLOBALS['refback_level'])) $GLOBALS['refback_level'] = 1;
-       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']}<br />");
+       if (empty($GLOBALS['refback_level'])) {
+               $GLOBALS['refback_level'] = 1;
+       } // END - if
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $GLOBALS['refback_level'] . ' - ENTERED!');
 
        // Init refid
        $GLOBALS['refback_refid'][$GLOBALS['refback_level']] = '0';
 
        // Init refid
        $GLOBALS['refback_refid'][$GLOBALS['refback_level']] = '0';
@@ -194,7 +191,7 @@ function updateRefbackTable ($userid) {
                array(bigintval($userid)), __FUNCTION__, __LINE__);
 
        // When no entry was updated then we have to create it here
                array(bigintval($userid)), __FUNCTION__, __LINE__);
 
        // When no entry was updated then we have to create it here
-       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):found=".SQL_NUMROWS($result_refid)."<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SQL_NUMROWS()=' . SQL_NUMROWS($result_refid));
        if (!SQL_HASZERONUMS($result_refid)) {
                // Load all refids
                while (list($GLOBALS['refback_refid'][$GLOBALS['refback_level']]) = SQL_FETCHROW($result_refid)) {
        if (!SQL_HASZERONUMS($result_refid)) {
                // Load all refids
                while (list($GLOBALS['refback_refid'][$GLOBALS['refback_level']]) = SQL_FETCHROW($result_refid)) {
@@ -202,7 +199,7 @@ function updateRefbackTable ($userid) {
                        $GLOBALS['refback_userid'][$GLOBALS['refback_refid'][$GLOBALS['refback_level']]] = $userid;
 
                        // Refid set?
                        $GLOBALS['refback_userid'][$GLOBALS['refback_refid'][$GLOBALS['refback_level']]] = $userid;
 
                        // Refid set?
-                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]}<br />");
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $GLOBALS['refback_refid'][$GLOBALS['refback_level']]);
                        if (($GLOBALS['refback_refid'][$GLOBALS['refback_level']] > 0) && ($GLOBALS['refback_refid'][$GLOBALS['refback_level']] != $userid) && (isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']]))) {
                                // New userid?
                                if ((isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) && (isset($GLOBALS['refback_userid'][$GLOBALS['refback_refid'][$GLOBALS['refback_level']-1]]))) {
                        if (($GLOBALS['refback_refid'][$GLOBALS['refback_level']] > 0) && ($GLOBALS['refback_refid'][$GLOBALS['refback_level']] != $userid) && (isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']]))) {
                                // New userid?
                                if ((isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) && (isset($GLOBALS['refback_userid'][$GLOBALS['refback_refid'][$GLOBALS['refback_level']-1]]))) {
@@ -210,7 +207,7 @@ function updateRefbackTable ($userid) {
                                        $old = $userid;
                                        $userid = $GLOBALS['refback_userid'][$GLOBALS['refback_refid'][$GLOBALS['refback_level']-1]];
                                        $minus = 1;
                                        $old = $userid;
                                        $userid = $GLOBALS['refback_userid'][$GLOBALS['refback_refid'][$GLOBALS['refback_level']-1]];
                                        $minus = 1;
-                                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},old={$old},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - NEW UID!<br />");
+                                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',old=' . $old . ',level=' . $GLOBALS['refback_level'] . ',ref=' . $GLOBALS['refback_refid'][$GLOBALS['refback_level']] . ' - NEW UID!');
                                } // END - if
 
                                // Check existence
                                } // END - if
 
                                // Check existence
@@ -222,10 +219,10 @@ function updateRefbackTable ($userid) {
                                        ), __FUNCTION__, __LINE__);
 
                                // Do we have no entry?
                                        ), __FUNCTION__, __LINE__);
 
                                // Do we have no entry?
-                               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},minus={$minus},numRows=".SQL_NUMROWS($result)." - FOUND!<br />");
+                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $GLOBALS['refback_level'] . ',ref=' . $GLOBALS['refback_refid'][$GLOBALS['refback_level']] . ',minus=' . $minus . ',numRows=' . SQL_NUMROWS($result) . ' - FOUND!');
                                if (SQL_HASZERONUMS($result)) {
                                        // Insert this level
                                if (SQL_HASZERONUMS($result)) {
                                        // Insert this level
-                                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - ADD!<br />");
+                                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $GLOBALS['refback_level'] . ',ref=' . $GLOBALS['refback_refid'][$GLOBALS['refback_level']] . ' - ADD!');
                                        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)",
                                                array(bigintval($userid), $GLOBALS['refback_level'], bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
 
                                        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)",
                                                array(bigintval($userid), $GLOBALS['refback_level'], bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
 
@@ -248,12 +245,12 @@ function updateRefbackTable ($userid) {
                                                ), __FUNCTION__, __LINE__);
 
                                        // Do we have no entry?
                                                ), __FUNCTION__, __LINE__);
 
                                        // Do we have no entry?
-                                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level=".($GLOBALS['refback_level']-$minus).",ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]},numRows=".SQL_NUMROWS($result)." - BACK!<br />");
+                                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . ($GLOBALS['refback_level'] - $minus) . ',minus=' . $minus . ',ref=' . $GLOBALS['refback_refid'][$GLOBALS['refback_level']] . ',numRows=' . SQL_NUMROWS($result) . ' - BACK!');
                                        if (SQL_HASZERONUMS($result)) {
                                                // Insert this level
                                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)",
                                                        array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
                                        if (SQL_HASZERONUMS($result)) {
                                                // Insert this level
                                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_refs` (`userid`,`level`,`refid`) VALUES (%s,%s,%s)",
                                                        array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
-                                               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level=".($GLOBALS['refback_level']-$minus).",ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - RETURNED!<br />");
+                                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . ($GLOBALS['refback_level'] - $minus) . ',ref=' . $GLOBALS['refback_refid'][$GLOBALS['refback_level']] . ' - RETURNED!');
                                        } // END - if
                                } // END - if
                        } // END - if
                                        } // END - if
                                } // END - if
                        } // END - if
@@ -266,24 +263,25 @@ function updateRefbackTable ($userid) {
        // When he has a referal...
        if ((($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == $userid) || ($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == '0')) && (isExtensionInstalledAndNewer('cache', '0.1.2')) && (!isset($GLOBALS['refback_cached']))) {
                // Remove cache here
        // When he has a referal...
        if ((($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == $userid) || ($GLOBALS['refback_refid'][$GLOBALS['refback_level']] == '0')) && (isExtensionInstalledAndNewer('cache', '0.1.2')) && (!isset($GLOBALS['refback_cached']))) {
                // Remove cache here
-               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - CACHE!<br />");
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $GLOBALS['refback_refid'][$GLOBALS['refback_level']] . ' - CACHE!');
                if ($GLOBALS['cache_instance']->loadCacheFile('refback')) $GLOBALS['cache_instance']->removeCacheFile();
                $GLOBALS['refback_cached'] = 1;
        } // END - if
 
        // "Walk" back here
        $GLOBALS['refback_level']--;
                if ($GLOBALS['cache_instance']->loadCacheFile('refback')) $GLOBALS['cache_instance']->removeCacheFile();
                $GLOBALS['refback_cached'] = 1;
        } // END - if
 
        // "Walk" back here
        $GLOBALS['refback_level']--;
-       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']} - LEVEL!<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refback_level=' . $GLOBALS['refback_level'] .' - LEVEL!');
 
        // Fix empty refid
 
        // Fix empty refid
-       if (!isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) $GLOBALS['refback_refid'][$GLOBALS['refback_level']-1] = '0';
-       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']-1]} - BACK!<br />");
-       //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
+       if (!isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) {
+               $GLOBALS['refback_refid'][$GLOBALS['refback_level']-1] = '0';
+       } // END - if
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',refback_level=' . {$GLOBALS['refback_level'] . ',ref=' . $GLOBALS['refback_refid'][$GLOBALS['refback_level']-1] . ' - EXIT!');
 }
 
 // "Getter" for array for user refs in given level
 function getArrayFromRefbackUserRefs ($userid, $level) {
 }
 
 // "Getter" for array for user refs in given level
 function getArrayFromRefbackUserRefs ($userid, $level) {
-       //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ' - ENTERED!');
        // Default is no refs and no nickname
        $refs = array();
 
        // Default is no refs and no nickname
        $refs = array();
 
@@ -322,13 +320,13 @@ ORDER BY
        SQL_FREERESULT($result);
 
        // Return result
        SQL_FREERESULT($result);
 
        // Return result
-       //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ',refs()=' . count($refs) . ' - EXIT!');
        return $refs;
 }
 
 // "Getter" for refback entry
 function getArrayFromUserRefbackData ($id) {
        return $refs;
 }
 
 // "Getter" for refback entry
 function getArrayFromUserRefbackData ($id) {
-       //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $id . ' - ENTERED!');
        // Default data is nothing
        $data = array();
 
        // Default data is nothing
        $data = array();
 
@@ -349,13 +347,13 @@ function getArrayFromUserRefbackData ($id) {
        SQL_FREERESULT($result);
 
        // Return entry
        SQL_FREERESULT($result);
 
        // Return entry
-       //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $id . ',data()=' . count($data) . ' - EXIT!');
        return $data;
 }
 
 // Update refback percents (but with some sanity-checks!
 function updateMemberRefbackPercents ($id, $percents) {
        return $data;
 }
 
 // Update refback percents (but with some sanity-checks!
 function updateMemberRefbackPercents ($id, $percents) {
-       //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
+       //* logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $id . ',percents=' . $percents . ' - ENTERED!');
        // Default status is failed
        $status['message'] = '{--MEMBER_REFBACK_ERROR_GENERAL--}';
 
        // Default status is failed
        $status['message'] = '{--MEMBER_REFBACK_ERROR_GENERAL--}';
 
@@ -414,7 +412,7 @@ function updateMemberRefbackPercents ($id, $percents) {
        $status['ok'] = true;
 
        // Return status array
        $status['ok'] = true;
 
        // Return status array
-       //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
+       //* logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $id . ',percents=' . $percents . ' - EXIT!');
        return $status;
 }
 
        return $status;
 }
 
index f22ac3899ee269f6748c4bceda58f570ab387751..fdf54732838642be27311ce0ef2b8763589bec24 100644 (file)
@@ -49,27 +49,27 @@ function SURFBAR_ADMIN_ADD_URL ($url, $limit, $reload) {
        // Do some pre-checks
        if (!isAdmin()) {
                // Not an admin
        // Do some pre-checks
        if (!isAdmin()) {
                // Not an admin
-               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Not admin.", $url, $limit, $reload));
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Not admin.", $url, $limit, $reload));
                return false;
        } elseif (!isUrlValid($url)) {
                // URL invalid
                return false;
        } elseif (!isUrlValid($url)) {
                // URL invalid
-               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Invalid URL.", $url, $limit, $reload));
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid URL.", $url, $limit, $reload));
                return false;
        } elseif (SURFBAR_LOOKUP_BY_URL($url, 0)) {
                // URL already found in surfbar!
                return false;
        } elseif (SURFBAR_LOOKUP_BY_URL($url, 0)) {
                // URL already found in surfbar!
-               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Already added.", $url, $limit, $reload));
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Already added.", $url, $limit, $reload));
                return false;
        } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
                // No more allowed!
                return false;
        } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS()) {
                // No more allowed!
-               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : No more URLs allowed.", $url, $limit, $reload));
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: No more URLs allowed.", $url, $limit, $reload));
                return false;
        } elseif ('' . ($limit + 0) . '' != '' . $limit . '') {
                // Invalid limit entered
                return false;
        } elseif ('' . ($limit + 0) . '' != '' . $limit . '') {
                // Invalid limit entered
-               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Invalid limit entered.", $url, $limit, $reload));
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid limit entered.", $url, $limit, $reload));
                return false;
        } elseif ('' . ($reload + 0) . '' != '' . $reload . '') {
                // Invalid amount entered
                return false;
        } elseif ('' . ($reload + 0) . '' != '' . $reload . '') {
                // Invalid amount entered
-               logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s : Invalid reload entered.", $url, $limit, $reload));
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid reload entered.", $url, $limit, $reload));
                return false;
        }
 
                return false;
        }
 
@@ -82,15 +82,19 @@ function SURFBAR_ADMIN_MIGRATE_URL ($url, $userid) {
        // Do some pre-checks
        if (!isAdmin()) {
                // Not an admin
        // Do some pre-checks
        if (!isAdmin()) {
                // Not an admin
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Not admin, url=' . $url . ',userid=' . $userid);
                return false;
        } elseif (!isUrlValid($url)) {
                // URL invalid
                return false;
        } elseif (!isUrlValid($url)) {
                // URL invalid
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Invalid URL, url=' . $url . ',userid=' . $userid);
                return false;
        } elseif (SURFBAR_LOOKUP_BY_URL($url, $userid)) {
                // URL already found in surfbar!
                return false;
        } elseif (SURFBAR_LOOKUP_BY_URL($url, $userid)) {
                // URL already found in surfbar!
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Already added, url=' . $url . ',userid=' . $userid);
                return false;
        } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($userid)) {
                // No more allowed!
                return false;
        } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS($userid)) {
                // No more allowed!
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Maximum exceeded, url=' . $url . ',userid=' . $userid);
                return false;
        }
 
                return false;
        }
 
@@ -103,12 +107,15 @@ function SURFBAR_ADMIN_UNLOCK_URL_IDS ($IDs) {
        // Is this an admin or invalid array?
        if (!isAdmin()) {
                // Not admin or invalid ids array
        // Is this an admin or invalid array?
        if (!isAdmin()) {
                // Not admin or invalid ids array
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not admin');
                return false;
        } elseif (!is_array($IDs)) {
                // No array
                return false;
        } elseif (!is_array($IDs)) {
                // No array
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs type ' . gettype($IDs) . '!=array');
                return false;
        } elseif (count($IDs) == 0) {
                // Empty array
                return false;
        } elseif (count($IDs) == 0) {
                // Empty array
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs is empty');
                return false;
        }
 
                return false;
        }
 
@@ -130,12 +137,15 @@ function SURFBAR_ADMIN_REJECT_URL_IDS ($IDs) {
        // Is this an admin or invalid array?
        if (!isAdmin()) {
                // Not admin or invalid ids array
        // Is this an admin or invalid array?
        if (!isAdmin()) {
                // Not admin or invalid ids array
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not admin');
                return false;
        } elseif (!is_array($IDs)) {
                // No array
                return false;
        } elseif (!is_array($IDs)) {
                // No array
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs type ' . gettype($IDs) . '!=array');
                return false;
        } elseif (count($IDs) == 0) {
                // Empty array
                return false;
        } elseif (count($IDs) == 0) {
                // Empty array
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs is empty');
                return false;
        }
 
                return false;
        }
 
@@ -162,18 +172,23 @@ function SURFBAR_MEMBER_ADD_URL ($url, $limit) {
        // Do some pre-checks
        if (!isMember()) {
                // Not a member
        // Do some pre-checks
        if (!isMember()) {
                // Not a member
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not member');
                return false;
        } elseif ((!isUrlValid($url)) && (!isAdmin())) {
                // URL invalid
                return false;
        } elseif ((!isUrlValid($url)) && (!isAdmin())) {
                // URL invalid
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid, url=' . $url . ',limit=' . $limit);
                return false;
        } elseif (SURFBAR_LOOKUP_BY_URL($url, getMemberId())) {
                // URL already found in surfbar!
                return false;
        } elseif (SURFBAR_LOOKUP_BY_URL($url, getMemberId())) {
                // URL already found in surfbar!
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Already found, url=' . $url . ',limit=' . $limit);
                return false;
        } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS(getMemberId())) {
                // No more allowed!
                return false;
        } elseif (!SURFBAR_IF_USER_BOOK_MORE_URLS(getMemberId())) {
                // No more allowed!
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Maximum exceeded, url=' . $url . ',limit=' . $limit);
                return false;
        } elseif (''.($limit + 0).'' != ''.$limit.'') {
                // Invalid amount entered
                return false;
        } elseif (''.($limit + 0).'' != ''.$limit.'') {
                // Invalid amount entered
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid limit, url=' . $url . ',limit=' . $limit);
                return false;
        }
 
                return false;
        }
 
@@ -219,15 +234,19 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $urlArray) {
        // Is this a member?
        if (!isMember()) {
                // No member!
        // Is this a member?
        if (!isMember()) {
                // No member!
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not member');
                return false;
        } elseif ((!isset($formData['id'])) || (!isset($formData['action']))) {
                // Important form elements are missing!
                return false;
        } elseif ((!isset($formData['id'])) || (!isset($formData['action']))) {
                // Important form elements are missing!
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid form data, required field id/action not found');
                return false;
        } elseif (!isset($urlArray[$formData['id']])) {
                return false;
        } elseif (!isset($urlArray[$formData['id']])) {
-               // id not found in cache
+               // Id not found in cache
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Field id not found in cache');
                return false;
        } elseif (!SURFBAR_VALIDATE_MEMBER_ACTION_STATUS($formData['action'], $urlArray[$formData['id']]['url_status'])) {
                // Action not allowed for current URL status
                return false;
        } elseif (!SURFBAR_VALIDATE_MEMBER_ACTION_STATUS($formData['action'], $urlArray[$formData['id']]['url_status'])) {
                // Action not allowed for current URL status
+               /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Action not allowed to perform. action=' . $formData['action'] . ',url_status=' . $urlArray[$formData['id']]['url_status'] . 'id=' . $formData['id']);
                return false;
        }
 
                return false;
        }
 
@@ -255,8 +274,7 @@ function SURFBAR_MEMBER_DO_FORM ($formData, $urlArray) {
                $performed = call_user_func_array($functionName, $urlData);
        } else {
                // Log invalid request
                $performed = call_user_func_array($functionName, $urlData);
        } else {
                // Log invalid request
-               logDebugMessage(__FUNCTION__, __LINE__, "action={$formData['action']},id={$formData['id']},function={$functionName}");
-               addFatalMessage(__FUNCTION__, __LINE__, "Invalid member action! action=%s,id=%s,function=%s", array($formData['action'], $formData['id'], $functionName));
+               debug_report_bug(__FUNCTION__, __LINE__, 'Invalid member action! action=' . $formData['action'] . ',id=' . $formData['id'] . ',function=' . $functionName);
        }
 
        // Return status
        }
 
        // Return status
@@ -408,7 +426,7 @@ function SURFBAR_MEMBER_EXECUTE_ACTION ($action, $urlData) {
                } // END - if
        } else {
                // Not found
                } // END - if
        } else {
                // Not found
-               addFatalMessage(__FUNCTION__, __LINE__, '{--MEMBER_SURFBAR_EXECUTE_ACTION_404--}', $functionName);
+               debug_report_bug(__FUNCTION__, __LINE__, 'Callback function ' . $functionName . ' not found.');
        }
 
        // Return status
        }
 
        // Return status
@@ -904,7 +922,7 @@ LIMIT 1",
        $total = SURFBAR_GET_TOTAL_URLS();
 
        // Do we have some URLs in lock? Admins can always surf on own URLs!
        $total = SURFBAR_GET_TOTAL_URLS();
 
        // Do we have some URLs in lock? Admins can always surf on own URLs!
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "userLocks=".SURFBAR_GET_USER_LOCKS().",total={$total}", false);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userLocks=' . SURFBAR_GET_USER_LOCKS() . ',total=' . $total);
        $isFull = ((SURFBAR_GET_USER_LOCKS() == $total) && ($total > 0));
 
        // Return result
        $isFull = ((SURFBAR_GET_USER_LOCKS() == $total) && ($total > 0));
 
        // Return result
@@ -1247,12 +1265,12 @@ ORDER BY
        while ($content = SQL_FETCHARRAY($result)) {
                // Get total points
                $points = getTotalPoints($content['url_userid']);
        while ($content = SQL_FETCHARRAY($result)) {
                // Get total points
                $points = getTotalPoints($content['url_userid']);
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "userid={$content['url_userid']},points={$points}", false);
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $content['url_userid'] . ',points=' . $points);
 
                // Shall we add this to ignore?
                if ($points <= $limit) {
                        // Ignore this one!
 
                // Shall we add this to ignore?
                if ($points <= $limit) {
                        // Ignore this one!
-                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "userid={$content['url_userid']} has depleted points amount!", false);
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $content['url_userid'] . ' has depleted points amount!');
                        $userids['url_userid'][$content['url_userid']] = $content['url_userid'];
                        $userids['points'][$content['url_userid']]     = $points;
                        $userids['notified'][$content['url_userid']]   = $content['notified'];
                        $userids['url_userid'][$content['url_userid']] = $content['url_userid'];
                        $userids['points'][$content['url_userid']]     = $points;
                        $userids['notified'][$content['url_userid']]   = $content['notified'];
@@ -1263,7 +1281,7 @@ ORDER BY
        SQL_FREERESULT($result);
 
        // Debug message
        SQL_FREERESULT($result);
 
        // Debug message
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "UIDs::count=".count($userids)." (with own userid=".getMemberId().')', false);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UIDs::count=' . count($userids) . ' (with own userid=' . getMemberId() . ')');
 
        // Return result
        return $userids;
 
        // Return result
        return $userids;
@@ -1850,7 +1868,7 @@ function SURFBAR_INIT () {
 
 // Private getter for data elements
 function SURFBAR_GET_DATA ($element) {
 
 // Private getter for data elements
 function SURFBAR_GET_DATA ($element) {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "element={$element}", false);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ' - CALLED!');
 
        // Default is null
        $data = null;
 
        // Default is null
        $data = null;
@@ -1867,7 +1885,7 @@ function SURFBAR_GET_DATA ($element) {
        }
 
        // Return result
        }
 
        // Return result
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element[' . $element . ']=[' . gettype($data) . ']' . $data, false);
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element[' . $element . ']=[' . gettype($data) . ']' . $data . ' - EXIT!');
        return $data;
 }
 
        return $data;
 }
 
index 4307dc6bda166278c0a53316800032f1b662a090..e3e1a739a223b19b6a7c5746887f3c0b9ffa719d 100644 (file)
@@ -295,7 +295,7 @@ function yoomediaTranslateIndex ($type, $index) {
                $return = $GLOBALS['translation_tables']['yoomedia'][$type][$index];
        } else {
                // Not found
                $return = $GLOBALS['translation_tables']['yoomedia'][$type][$index];
        } else {
                // Not found
-               logDebugMessage(__FUNCTION__, __LINE__, "type={$type},index={$index} not found.");
+               logDebugMessage(__FUNCTION__, __LINE__, 'type=' . $type . ',index=' . $index . ' not found');
        }
 
        // Return value
        }
 
        // Return value
index 2dffa041f500c0fe9673e24f2c5643e8b7f373cc..8ea0db4b69bbc1008fc8a5f52e56e11aebb31890 100644 (file)
@@ -72,7 +72,9 @@ if (isGetRequestParameterSet('userid')) {
 
                                // Set selection
                                $selection = '<font color="#ee0000">{--NO--}</div>';
 
                                // Set selection
                                $selection = '<font color="#ee0000">{--NO--}</div>';
-                               if (SQL_NUMROWS($result_user) == 1) $selection = '<font color="#00ee00">{--YES--}</div>';
+                               if (SQL_NUMROWS($result_user) == 1) {
+                                       $selection = '<font color="#00ee00">{--YES--}</div>';
+                               } // END - if
 
                                // Add more elements
                                $content['cnt'] = $count;
 
                                // Add more elements
                                $content['cnt'] = $count;
index d10f8b3dc00c64cfe6f66492b2b3a6f2179c900a..818bdc0c06f335862b7d24660783bc69b7d47d60 100644 (file)
@@ -110,15 +110,15 @@ if ((!isInstalling()) && (!isInstallationPhase())) {
                                loadIncludeOnce('inc/load_cache.php');
                        } else {
                                // Wrong database?
                                loadIncludeOnce('inc/load_cache.php');
                        } else {
                                // Wrong database?
-                               addFatalMessage(__FILE__, __LINE__, '{--WRONG_DB_SELECTED--}');
+                               debug_report_bug(__FILE__, __LINE__, 'Wrong database selected.');
                        }
                } else {
                        // No link to database!
                        }
                } else {
                        // No link to database!
-                       addFatalMessage(__FILE__, __LINE__, '{--NO_DB_LINK--}');
+                       debug_report_bug(__FILE__, __LINE__, 'Database link is not yet up.');
                }
        } else {
                // Maybe you forgot to enter your database login?
                }
        } else {
                // Maybe you forgot to enter your database login?
-               addFatalMessage(__FILE__, __LINE__, '{--MYSQL_DATA_MISSING--}');
+               debug_report_bug(__FILE__, __LINE__, 'Database login is missing.');
        }
 } else {
        // Default output is 'direct' for HTML output
        }
 } else {
        // Default output is 'direct' for HTML output
index 424ac96cafa0ba4ac1697a1dbae7280ce867233d..afed52db34fe7b0d169cc70be00ff33f03a5f30a 100644 (file)
@@ -1038,10 +1038,10 @@ function getReferalLevelPercents ($level) {
  *               for default value will cause no referal will get points ever!!!)
  */
 function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $refid = '0', $addMode = 'REFERAL') {
  *               for default value will cause no referal will get points ever!!!)
  */
 function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify = false, $refid = '0', $addMode = 'REFERAL') {
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',points=' . $points . ',sendNotify=' . intval($sendNotify) . ',refid=' . $refid . ',addMode=' . $addMode . ' - ENTERED!');
        // By default nothing has been added
        $added = false;
 
        // By default nothing has been added
        $added = false;
 
-       //* DEBUG: */ debugOutput('----------------------- <font color="#00aa00">' . __FUNCTION__ . ' - ENTRY</font> ------------------------<ul><li>');
        // Convert mode to upper-case
        $addMode = strtoupper($addMode);
 
        // Convert mode to upper-case
        $addMode = strtoupper($addMode);
 
@@ -1182,7 +1182,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
                } // END - if
        } // END - if
 
                } // END - if
        } // END - if
 
-       //* DEBUG: */ debugOutput('</li></ul>----------------------- <font color="#aa0000">'.__FUNCTION__.': added=' . intval($added) . ' - EXIT</font> ------------------------<br />');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'subject=' . $subject . ',userid=' . $userid . ',points=' . $points . ',sendNotify=' . intval($sendNotify) . ',refid=' . $refid . ',addMode=' . $addMode . ' - EXIT!');
        return $added;
 }
 
        return $added;
 }
 
@@ -1887,7 +1887,7 @@ function generateReceiverList ($categoryId, $receiver, $mode = '') {
 
 // "Getter" for array for user refs and points in given level
 function getUserReferalPoints ($userid, $level) {
 
 // "Getter" for array for user refs and points in given level
 function getUserReferalPoints ($userid, $level) {
-       //* DEBUG: */ debugOutput('----------------------- <font color="#00aa00">'.__FUNCTION__.' - ENTRY</font> ------------------------<ul><li>');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ' - ENTERED!');
        // Default is no refs and no nickname
        $refs = array();
 
        // Default is no refs and no nickname
        $refs = array();
 
@@ -1957,7 +1957,7 @@ ORDER BY
        SQL_FREERESULT($result);
 
        // Return result
        SQL_FREERESULT($result);
 
        // Return result
-       //* DEBUG: */ debugOutput('</li></ul>----------------------- <font color="#aa0000">'.__FUNCTION__.' - EXIT</font> ------------------------<br />');
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',level=' . $level . ' - EXIT!');
        return $refs;
 }
 
        return $refs;
 }
 
index f71f3e0796ce397b09ea685421ea66499b052321..f7d86451ed999498b2694b6fb08edea27a2ee1f6 100644 (file)
@@ -86,7 +86,7 @@ function setSession ($var, $value) {
 
 // Check wether a session variable is set
 function isSessionVariableSet ($var) {
 
 // Check wether a session variable is set
 function isSessionVariableSet ($var) {
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "var={$var}");
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'var=' . $var . ' set in session');
        return (isset($GLOBALS['_SESSION'][$var]));
 }
 
        return (isset($GLOBALS['_SESSION'][$var]));
 }
 
index 4280695bdb50a2dea032859caaa2f98b63e66343..db267b113768e33b7e34ef9cd580f6a2b3e7226c 100644 (file)
@@ -447,24 +447,24 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0', $loadU
        } // END - if
 
        // Load user's data
        } // END - if
 
        // Load user's data
-       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "UID={$userid},template={$template},content[]=".gettype($content));
+       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'UID=' . $userid . ',template=' . $template . ',content[]=' . gettype($content));
        if ((isValidUserId($userid)) && (is_array($content))) {
                // If nickname extension is installed, fetch nickname as well
                if ((isExtensionActive('nickname')) && (isNicknameUsed($userid))) {
                        // Load by nickname
        if ((isValidUserId($userid)) && (is_array($content))) {
                // If nickname extension is installed, fetch nickname as well
                if ((isExtensionActive('nickname')) && (isNicknameUsed($userid))) {
                        // Load by nickname
-                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NICKNAME!<br />");
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ' - NICKNAME!');
                        fetchUserData($userid, 'nickname');
                } elseif (isNicknameUsed($userid)) {
                        // Non-number characters entered but no ext-nickname found
                        debug_report_bug(__FUNCTION__, __LINE__, 'userid=' . $userid . ': is no id number and ext-nickname is gone.');
                } else {
                        // Load by userid
                        fetchUserData($userid, 'nickname');
                } elseif (isNicknameUsed($userid)) {
                        // Non-number characters entered but no ext-nickname found
                        debug_report_bug(__FUNCTION__, __LINE__, 'userid=' . $userid . ': is no id number and ext-nickname is gone.');
                } else {
                        // Load by userid
-                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NO-NICK!<br />");
+                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ' - USERID!');
                        fetchUserData($userid);
                }
 
                // Merge data if valid
                        fetchUserData($userid);
                }
 
                // Merge data if valid
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "content()=".count($content)." - PRE<br />");
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'content()=' . count($content) . ' - PRE!');
                if ((isUserDataValid()) && ($loadUserData === true)) {
                        // It is valid
                        $content = merge_array($content, getUserDataArray());
                if ((isUserDataValid()) && ($loadUserData === true)) {
                        // It is valid
                        $content = merge_array($content, getUserDataArray());
@@ -473,7 +473,7 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0', $loadU
                        unset($content['password']);
                } // END - if
 
                        unset($content['password']);
                } // END - if
 
-               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "content()=".count($content)." - AFTER<br />");
+               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'content()=' . count($content) . ' - AFTER!');
        } // END - if
 
        // Base directory
        } // END - if
 
        // Base directory
@@ -634,10 +634,10 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true
                                $test = substr($found, 0, strlen($match));
 
                                // Does this entry exist?
                                $test = substr($found, 0, strlen($match));
 
                                // Does this entry exist?
-                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "found={$found},match={$match},set={$set}<br />");
+                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'found=' . $found . ',match=' . $match . ',set=' . $set);
                                if ($test == $match) {
                                        // Match found
                                if ($test == $match) {
                                        // Match found
-                                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "fuzzyFound!<br />");
+                                       //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'fuzzyFound!');
                                        $fuzzyFound = true;
                                        break;
                                } // END - if
                                        $fuzzyFound = true;
                                        break;
                                } // END - if
@@ -649,14 +649,14 @@ function compileRawCode ($code, $simple = false, $constants = true, $full = true
                        // Take all string elements
                        if ((is_string($matches[4][$key])) && (!isset($matchesFound[$match])) && (!isset($matchesFound[$key.'_' . $matches[4][$key]]))) {
                                // Replace it in the code
                        // Take all string elements
                        if ((is_string($matches[4][$key])) && (!isset($matchesFound[$match])) && (!isset($matchesFound[$key.'_' . $matches[4][$key]]))) {
                                // Replace it in the code
-                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "key={$key},match={$match}<br />");
+                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',match=' . $match);
                                $newMatch = str_replace('[', "['", str_replace(']', "']", $match));
                                $code = str_replace($match, '".' . $newMatch . '."', $code);
                                $matchesFound[$key . '_' . $matches[4][$key]] = 1;
                                $matchesFound[$match] = 1;
                        } elseif (!isset($matchesFound[$match])) {
                                // Not yet replaced!
                                $newMatch = str_replace('[', "['", str_replace(']', "']", $match));
                                $code = str_replace($match, '".' . $newMatch . '."', $code);
                                $matchesFound[$key . '_' . $matches[4][$key]] = 1;
                                $matchesFound[$match] = 1;
                        } elseif (!isset($matchesFound[$match])) {
                                // Not yet replaced!
-                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "match={$match}<br />");
+                               //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'match=' . $match);
                                $code = str_replace($match, '".' . $match . '."', $code);
                                $matchesFound[$match] = 1;
                        }
                                $code = str_replace($match, '".' . $match . '."', $code);
                                $matchesFound[$match] = 1;
                        }
@@ -1428,7 +1428,10 @@ function determinePageTitle () {
                $pageTitle = '{--NO_CONFIG_FOUND_TITLE--}';
 
                // Do not add the fatal message in installation mode
                $pageTitle = '{--NO_CONFIG_FOUND_TITLE--}';
 
                // Do not add the fatal message in installation mode
-               if ((!isInstalling()) && (!isConfigurationLoaded())) addFatalMessage(__FUNCTION__, __LINE__, '{--NO_CONFIG_FOUND--}');
+               if ((!isInstalling()) && (!isConfigurationLoaded())) {
+                       // Please report this
+                       debug_report_bug(__FUNCTION__, __LINE__, 'No configuration data found!');
+               } // END - if
        }
 
        // Return title
        }
 
        // Return title