]> git.mxchange.org Git - mailer.git/commitdiff
Double->single rewrites and possible fixes for revision data
authorRoland Häder <roland@mxchange.org>
Tue, 1 Dec 2009 05:47:25 +0000 (05:47 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 1 Dec 2009 05:47:25 +0000 (05:47 +0000)
inc/classes/cachesystem.class.php
inc/config-functions.php
inc/filters.php
inc/functions.php
inc/libs/refback_functions.php
inc/modules/admin/admin-inc.php
inc/mysql-manager.php

index 4c23235ac20812d568c89b9d06066dcd36354f5e..71bf450d674c4efcb53cd00255268b2b30d5cf37 100644 (file)
@@ -113,7 +113,7 @@ class CacheSystem {
                        fwrite($this->pointer, "<?php\n");
                } else {
                        // Cannot create file
                        fwrite($this->pointer, "<?php\n");
                } else {
                        // Cannot create file
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
+                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
                }
        }
 
@@ -195,7 +195,7 @@ class CacheSystem {
                        } // END - foreach
                } else {
                        // Cannot create file
                        } // END - foreach
                } else {
                        // Cannot create file
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
+                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
                }
        }
 
@@ -220,7 +220,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: */ outputHtml(__METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - FINALIZED!<br />");
+                       //* DEBUG: */ outputHtml(__METHOD__ . '(<font color="#0000aa">' . __LINE__."</font>): {$this->name} - FINALIZED!<br />");
                } // END - if
        }
 
                } // END - if
        }
 
@@ -260,7 +260,7 @@ class CacheSystem {
                } else {
                        // Cache file not found or not readable
                        debug_report_bug($this->name);
                } else {
                        // Cache file not found or not readable
                        debug_report_bug($this->name);
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMaskedMessage('CACHE_CANNOT_LOAD', $this->fqfn));
+                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMaskedMessage('CACHE_CANNOT_LOAD', $this->fqfn));
 
                        // Try to remove it
                        $this->removeCacheFile();
 
                        // Try to remove it
                        $this->removeCacheFile();
@@ -315,7 +315,7 @@ class CacheSystem {
                                $this->rebuilt[$this->name] = true;
                        } else {
                                // Not removed!
                                $this->rebuilt[$this->name] = true;
                        } else {
                                // Not removed!
-                               addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMaskedMessage('CACHE_CANNOT_UNLINK', $this->fqfn));
+                               addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMaskedMessage('CACHE_CANNOT_UNLINK', $this->fqfn));
                        }
                } // END - if
        }
                        }
                } // END - if
        }
@@ -346,7 +346,7 @@ class CacheSystem {
                        }
                } else {
                        // Cannot write to cache!
                        }
                } else {
                        // Cannot write to cache!
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
+                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
                }
        }
 
@@ -370,7 +370,7 @@ class CacheSystem {
                        } // END - foreach
                } else {
                        // Cannot write array!
                        } // END - foreach
                } else {
                        // Cannot write array!
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
+                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
                }
        }
 
@@ -407,7 +407,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>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
+                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
                }
        }
 
@@ -426,10 +426,10 @@ class CacheSystem {
                                // Write cache line to file
                                fwrite($this->pointer, $this->rewriteEntry($ext_name, $ext_ver, 'version', true));
                        } // END - if
                                // Write cache line to file
                                fwrite($this->pointer, $this->rewriteEntry($ext_name, $ext_ver, 'version', true));
                        } // END - if
-                       //* DEBUG: */ outputHtml(__METHOD__."(<font color=\"#0000aa\">".__LINE__."</font>): {$this->name} - {$ext_name}={$ext_ver}<br />");
+                       //* DEBUG: */ outputHtml(__METHOD__ . '(<font color="#0000aa">' . __LINE__."</font>): {$this->name} - {$ext_name}={$ext_ver}<br />");
                } else {
                        // Cannot create file
                } else {
                        // Cannot create file
-                       addFatalMessage(__METHOD__, __LINE__, "(<font color=\"#0000aa\">".__LINE__."</font>): ".getMessage('CACHE_PROBLEMS_DETECTED'));
+                       addFatalMessage(__METHOD__, __LINE__, '(<font color="#0000aa">' . __LINE__ . '</font>): ' . getMessage('CACHE_PROBLEMS_DETECTED'));
                }
        }
 
                }
        }
 
index cc35fc1cbfa47ce4cfaccf333a1b35a03637975f..a7897e2abcc21a5eb4cca5054611c8c222d30987 100644 (file)
@@ -346,7 +346,7 @@ function updateConfiguration ($entries, $values, $updateMode='', $config = '0')
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "entries={$entries}");
        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$entries." WHERE `config`=%s LIMIT 1",
                        array(bigintval($config)), __FUNCTION__, __LINE__);
        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "entries={$entries}");
        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_config` SET ".$entries." WHERE `config`=%s LIMIT 1",
                        array(bigintval($config)), __FUNCTION__, __LINE__);
-       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):entries={$entries},affectedRows={$affectedRows}<br />");
+       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):entries={$entries},affectedRows={$affectedRows}<br />");
 
        // Rebuild cache
        rebuildCacheFile('config', 'config');
 
        // Rebuild cache
        rebuildCacheFile('config', 'config');
index 4159a10796d6ae23825e59f2f4df2958d6f0b0a4..b4970d71b897934a902db27fb937bc76b260219e 100644 (file)
@@ -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: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):type={$data['type']},action={getAction()},what={getWhat()},level={$data['access_level']}<br />");
+       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):type={$data['type']},action={getAction()},what={getWhat()},level={$data['access_level']}<br />");
        if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.0')))) {
                // Handle failure
                $content['content'] .= handleLoginFailtures($data['access_level']);
        if ((($data['type'] == 'what') || ($data['type'] == 'action') && ((!isWhatSet()) || (getWhat() == 'overview') || (getWhat() == getConfig('index_home')))) && ($data['access_level'] != 'guest') && ((isExtensionInstalledAndNewer('sql_patches', '0.4.7')) || (isExtensionInstalledAndNewer('admins', '0.7.0')))) {
                // Handle failure
                $content['content'] .= handleLoginFailtures($data['access_level']);
@@ -167,7 +167,7 @@ function FILTER_AUTO_ACTIVATE_EXTENSION ($data) {
        // Is this extension always activated?
        if (getExtensionAlwaysActive() == 'Y') {
                // Then activate the extension
        // Is this extension always activated?
        if (getExtensionAlwaysActive() == 'Y') {
                // Then activate the extension
-               //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ext_name={$data['ext_name']}<br />");
+               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>): ext_name={$data['ext_name']}<br />");
                doActivateExtension($data['ext_name']);
        } // END - if
 
                doActivateExtension($data['ext_name']);
        } // END - if
 
index 35c3a3646aa2a5f1f6c978667b6e881d358c04e6..80bdad05142dcdad743cc463f9dc7c7a411d596c 100644 (file)
@@ -442,25 +442,25 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0') {
        } // END - if
 
        // Load user's data
        } // END - if
 
        // Load user's data
-       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):UID={$userid},template={$template},content[]=".gettype($content).'<br />');
+       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):UID={$userid},template={$template},content[]=".gettype($content).'<br />');
        if (($userid > 0) && (is_array($content))) {
                // If nickname extension is installed, fetch nickname as well
                if ((isExtensionActive('nickname')) && (isNicknameUsed($userid))) {
        if (($userid > 0) && (is_array($content))) {
                // If nickname extension is installed, fetch nickname as well
                if ((isExtensionActive('nickname')) && (isNicknameUsed($userid))) {
-                       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NICKNAME!<br />");
+                       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):NICKNAME!<br />");
                        // Load by nickname
                        fetchUserData($userid, 'nickname');
                } else {
                        // Load by nickname
                        fetchUserData($userid, 'nickname');
                } else {
-                       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):NO-NICK!<br />");
+                       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):NO-NICK!<br />");
                        /// Load by userid
                        fetchUserData($userid);
                }
 
                // Merge data if valid
                        /// Load by userid
                        fetchUserData($userid);
                }
 
                // Merge data if valid
-               //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):content()=".count($content)." - PRE<br />");
+               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):content()=".count($content)." - PRE<br />");
                if (isUserDataValid()) {
                        $content = merge_array($content, getUserDataArray());
                } // END - if
                if (isUserDataValid()) {
                        $content = merge_array($content, getUserDataArray());
                } // END - if
-               //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):content()=".count($content)." - AFTER<br />");
+               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):content()=".count($content)." - AFTER<br />");
        } // END - if
 
        // Translate M to male or F to female if present
        } // END - if
 
        // Translate M to male or F to female if present
@@ -532,7 +532,7 @@ function loadEmailTemplate ($template, $content = array(), $userid = '0') {
 
 // Send mail out to an email address
 function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '') {
 
 // Send mail out to an email address
 function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '') {
-       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):TO={$toEmail},SUBJECT={$subject}<br />");
+       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):TO={$toEmail},SUBJECT={$subject}<br />");
 
        // Compile subject line (for POINTS constant etc.)
        eval("\$subject = decodeEntities(\"".compileRawCode(escapeQuotes($subject))."\");");
 
        // Compile subject line (for POINTS constant etc.)
        eval("\$subject = decodeEntities(\"".compileRawCode(escapeQuotes($subject))."\");");
@@ -558,7 +558,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
                // Is the webmaster!
                $toEmail = getConfig('WEBMASTER');
        }
                // Is the webmaster!
                $toEmail = getConfig('WEBMASTER');
        }
-       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):TO={$toEmail}<br />");
+       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):TO={$toEmail}<br />");
 
        // Check for PHPMailer or debug-mode
        if (!checkPhpMailerUsage()) {
 
        // Check for PHPMailer or debug-mode
        if (!checkPhpMailerUsage()) {
@@ -1059,10 +1059,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: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):found={$found},match={$match},set={$set}<br />");
+                               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):found={$found},match={$match},set={$set}<br />");
                                if ($test == $match) {
                                        // Match found!
                                if ($test == $match) {
                                        // Match found!
-                                       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):fuzzyFound!<br />");
+                                       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):fuzzyFound!<br />");
                                        $fuzzyFound = true;
                                        break;
                                } // END - if
                                        $fuzzyFound = true;
                                        break;
                                } // END - if
@@ -1074,14 +1074,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: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):key={$key},match={$match}<br />");
+                               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):key={$key},match={$match}<br />");
                                $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: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):match={$match}<br />");
+                               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):match={$match}<br />");
                                $code = str_replace($match, '".' . $match . '."', $code);
                                $matchesFound[$match] = 1;
                        }
                                $code = str_replace($match, '".' . $match . '."', $code);
                                $matchesFound[$match] = 1;
                        }
@@ -2337,14 +2337,14 @@ function isBooleanConstantAndTrue ($constName) { // : Boolean
        // In cache?
        if (isset($GLOBALS['cache_array']['const'][$constName])) {
                // Use cache
        // In cache?
        if (isset($GLOBALS['cache_array']['const'][$constName])) {
                // Use cache
-               //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): " . $constName."-CACHE!<br />");
+               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>): ' . $constName."-CACHE!<br />");
                $res = ($GLOBALS['cache_array']['const'][$constName] === true);
        } else {
                // Check constant
                $res = ($GLOBALS['cache_array']['const'][$constName] === true);
        } else {
                // Check constant
-               //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): " . $constName."-RESOLVE!<br />");
+               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>): ' . $constName."-RESOLVE!<br />");
                if (defined($constName)) {
                        // Found!
                if (defined($constName)) {
                        // Found!
-                       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): " . $constName."-FOUND!<br />");
+                       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>): ' . $constName."-FOUND!<br />");
                        $res = (constant($constName) === true);
                } // END - if
 
                        $res = (constant($constName) === true);
                } // END - if
 
@@ -2408,12 +2408,12 @@ function generateErrorCodeFromUserStatus ($status='') {
 // Function to search for the last modifified file
 function searchDirsRecursive ($dir, &$last_changed) {
        // Get dir as array
 // Function to search for the last modifified file
 function searchDirsRecursive ($dir, &$last_changed) {
        // Get dir as array
-       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):dir=" . $dir.'<br />');
+       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):dir=" . $dir.'<br />');
        // Does it match what we are looking for? (We skip a lot files already!)
        // RegexPattern to exclude  ., .., .revision,  .svn, debug.log or .cache in the filenames
        $excludePattern = '@(\.revision|debug\.log|\.cache|config\.php)$@';
        $ds = getArrayFromDirectory($dir, '', true, false, array(), '.php', $excludePattern);
        // Does it match what we are looking for? (We skip a lot files already!)
        // RegexPattern to exclude  ., .., .revision,  .svn, debug.log or .cache in the filenames
        $excludePattern = '@(\.revision|debug\.log|\.cache|config\.php)$@';
        $ds = getArrayFromDirectory($dir, '', true, false, array(), '.php', $excludePattern);
-       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ds[]=".count($ds).'<br />');
+       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):ds[]=".count($ds).'<br />');
 
        // Walk through all entries
        foreach ($ds as $d) {
 
        // Walk through all entries
        foreach ($ds as $d) {
@@ -2421,20 +2421,20 @@ function searchDirsRecursive ($dir, &$last_changed) {
                $FQFN = str_replace('//', '/', getConfig('PATH') . $dir. '/'. $d);
 
                // Is it a file and readable?
                $FQFN = str_replace('//', '/', getConfig('PATH') . $dir. '/'. $d);
 
                // Is it a file and readable?
-               //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):FQFN={$FQFN}<br />");
+               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):FQFN={$FQFN}<br />");
                if (isDirectory($FQFN)) {
                        // $FQFN is a directory so also crawl into this directory
                        $newDir = $d;
                        if (!empty($dir)) $newDir = $dir . '/'. $d;
                if (isDirectory($FQFN)) {
                        // $FQFN is a directory so also crawl into this directory
                        $newDir = $d;
                        if (!empty($dir)) $newDir = $dir . '/'. $d;
-                       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):DESCENT: " . $newDir.'<br />');
+                       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):DESCENT: " . $newDir.'<br />');
                        searchDirsRecursive($newDir, $last_changed);
                } elseif (isFileReadable($FQFN)) {
                        // $FQFN is a filename and no directory
                        $time = filemtime($FQFN);
                        searchDirsRecursive($newDir, $last_changed);
                } elseif (isFileReadable($FQFN)) {
                        // $FQFN is a filename and no directory
                        $time = filemtime($FQFN);
-                       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):File: " . $d." found. (".($last_changed['time'] - $time).")<br />");
+                       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):File: " . $d." found. (".($last_changed['time'] - $time).")<br />");
                        if ($last_changed['time'] < $time) {
                                // This file is newer as the file before
                        if ($last_changed['time'] < $time) {
                                // This file is newer as the file before
-                               //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>) - NEWER!<br />");
+                               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>) - NEWER!<br />");
                                $last_changed['path_name'] = $FQFN;
                                $last_changed['time'] = $time;
                        } // END - if
                                $last_changed['path_name'] = $FQFN;
                                $last_changed['time'] = $time;
                        } // END - if
@@ -2486,7 +2486,7 @@ function getActualVersion ($type = 'Revision') {
                                        } // END - foreach
 
                                        // Return found value
                                        } // END - foreach
 
                                        // Return found value
-                                       return trim($ins_vers[$mapper[$type]]);
+                                       return getActualVersion($type);
                                }
                        }
                }
                                }
                        }
                }
@@ -2506,7 +2506,7 @@ function getActualVersion ($type = 'Revision') {
 // The returned Array is needed twice (in getArrayFromActualVersion() and in getActualVersion() in the old .revision-fallback) so I puted it in an extra function to not polute the global namespace
 function getSearchFor () {
        // Add Revision, Date, Tag and Author
 // The returned Array is needed twice (in getArrayFromActualVersion() and in getActualVersion() in the old .revision-fallback) so I puted it in an extra function to not polute the global namespace
 function getSearchFor () {
        // Add Revision, Date, Tag and Author
-       $searchFor = array('Revision', 'Date', 'Tag', 'Author', 'File');
+       $searchFor = array('File', 'Revision', 'Date', 'Tag', 'Author');
 
        // Return the created array
        return $searchFor;
 
        // Return the created array
        return $searchFor;
@@ -2538,17 +2538,20 @@ function getArrayFromActualVersion () {
        // Get all the keywords to search for
        $searchFor = getSearchFor();
 
        // Get all the keywords to search for
        $searchFor = getSearchFor();
 
+       // Save the last-changed filename for debugging
+       $GLOBALS['cache_array']['revision']['File'] = $last_changed['path_name'];
+
        // This foreach loops the $searchFor-Tags (array('Revision', 'Date', 'Tag', 'Author') --> could easaly extended in the future)
        foreach ($searchFor as $search) {
                // Searches for "$search-tag:VALUE$" or "$search-tag::VALUE$"(the stylish keywordversion ;-)) in the lates modified file
                $res += preg_match('@\$' . $search.'(:|::) (.*) \$@U', $last_file, $t);
        // This foreach loops the $searchFor-Tags (array('Revision', 'Date', 'Tag', 'Author') --> could easaly extended in the future)
        foreach ($searchFor as $search) {
                // Searches for "$search-tag:VALUE$" or "$search-tag::VALUE$"(the stylish keywordversion ;-)) in the lates modified file
                $res += preg_match('@\$' . $search.'(:|::) (.*) \$@U', $last_file, $t);
+
                // This trimms the search-result and puts it in the $GLOBALS['cache_array']['revision']-return array
                // This trimms the search-result and puts it in the $GLOBALS['cache_array']['revision']-return array
-               if (isset($t[2])) $GLOBALS['cache_array']['revision'][$search] = trim($t[2]);
+               if (isset($t[2])) {
+                       $GLOBALS['cache_array']['revision'][$search] = trim($t[2]);
+               } // END - if
        } // END - foreach
 
        } // END - foreach
 
-       // Save the last-changed filename for debugging
-       $GLOBALS['cache_array']['revision']['File'] = $last_changed['path_name'];
-
        // at least 3 keyword-Tags are needed for propper values
        if ($res && $res >= 3
        && isset($GLOBALS['cache_array']['revision']['Revision']) && $GLOBALS['cache_array']['revision']['Revision'] != ''
        // at least 3 keyword-Tags are needed for propper values
        if ($res && $res >= 3
        && isset($GLOBALS['cache_array']['revision']['Revision']) && $GLOBALS['cache_array']['revision']['Revision'] != ''
@@ -2577,11 +2580,11 @@ function getArrayFromActualVersion () {
 
                // Prepare content
                // Only sets not setted or not proper values to the Online-Server-Fallback-Solution
 
                // Prepare content
                // Only sets not setted or not proper values to the Online-Server-Fallback-Solution
+               if (!isset($GLOBALS['cache_array']['revision']['File'])     || $GLOBALS['cache_array']['revision']['File']     == '') $GLOBALS['cache_array']['revision']['File']     = trim($version[11]);
                if (!isset($GLOBALS['cache_array']['revision']['Revision']) || $GLOBALS['cache_array']['revision']['Revision'] == '') $GLOBALS['cache_array']['revision']['Revision'] = trim($version[10]);
                if (!isset($GLOBALS['cache_array']['revision']['Date'])     || $GLOBALS['cache_array']['revision']['Date']     == '') $GLOBALS['cache_array']['revision']['Date']     = trim($version[9]);
                if (!isset($GLOBALS['cache_array']['revision']['Tag'])      || $GLOBALS['cache_array']['revision']['Tag']      == '') $GLOBALS['cache_array']['revision']['Tag']      = trim($version[8]);
                if (!isset($GLOBALS['cache_array']['revision']['Author'])   || $GLOBALS['cache_array']['revision']['Author']   == '') $GLOBALS['cache_array']['revision']['Author']   = 'quix0r';
                if (!isset($GLOBALS['cache_array']['revision']['Revision']) || $GLOBALS['cache_array']['revision']['Revision'] == '') $GLOBALS['cache_array']['revision']['Revision'] = trim($version[10]);
                if (!isset($GLOBALS['cache_array']['revision']['Date'])     || $GLOBALS['cache_array']['revision']['Date']     == '') $GLOBALS['cache_array']['revision']['Date']     = trim($version[9]);
                if (!isset($GLOBALS['cache_array']['revision']['Tag'])      || $GLOBALS['cache_array']['revision']['Tag']      == '') $GLOBALS['cache_array']['revision']['Tag']      = trim($version[8]);
                if (!isset($GLOBALS['cache_array']['revision']['Author'])   || $GLOBALS['cache_array']['revision']['Author']   == '') $GLOBALS['cache_array']['revision']['Author']   = 'quix0r';
-               if (!isset($GLOBALS['cache_array']['revision']['File'])     || $GLOBALS['cache_array']['revision']['File']     == '') $GLOBALS['cache_array']['revision']['File']     = trim($version[11]);
        }
 
        // Return prepared array
        }
 
        // Return prepared array
@@ -3062,7 +3065,7 @@ function handleLoginFailtures ($accessLevel) {
                // Ignore zero values
                if (getSession('mxchange_' . $accessLevel.'_failures') > 0) {
                        // Non-guest has login failures found, get both data and prepare it for template
                // Ignore zero values
                if (getSession('mxchange_' . $accessLevel.'_failures') > 0) {
                        // Non-guest has login failures found, get both data and prepare it for template
-                       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):accessLevel={$accessLevel}<br />");
+                       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):accessLevel={$accessLevel}<br />");
                        $content = array(
                                'login_failures' => getSession('mxchange_' . $accessLevel.'_failures'),
                                'last_failure'   => generateDateTime(getSession('mxchange_' . $accessLevel.'_last_fail'), 2)
                        $content = array(
                                'login_failures' => getSession('mxchange_' . $accessLevel.'_failures'),
                                'last_failure'   => generateDateTime(getSession('mxchange_' . $accessLevel.'_last_fail'), 2)
@@ -3102,7 +3105,7 @@ function rebuildCacheFile ($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: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): inc={$inc} - LOADED!<br />");
+                               //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>): inc={$inc} - LOADED!<br />");
                                loadInclude($inc);
                        } else {
                                // Include not found!
                                loadInclude($inc);
                        } else {
                                // Include not found!
index 5b2feb45ff0323e5694d5550efa2f74540ab3829..78ad023fc754457c85db26969d3f8f7fa2a9819a 100644 (file)
@@ -61,35 +61,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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$ref},level={$content['level']},points={$points}<br />");
                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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$ref},refid={$refid},points={$points},percents={$percents}<br />");
 
                        // 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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):points={$points},perc={$content['percents']},percents={$percents},level={$content['level']}<br />");
                                // 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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):refback={$refback},userid={$userid},refid={$refid} - UPDATE! (".SQL_AFFECTEDROWS().")<br />");
 
                                // Add points again, but only directly
 
                                // Add points again, but only directly
-                               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):refback={$refback}<br />");
+                               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):refback={$refback}<br />");
                                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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):points={$return} - REDUCED<br />");
                                } // END - if
                        } // END - if
                } // END foreach
                                } // END - if
                        } // END - if
                } // END foreach
@@ -109,7 +109,7 @@ function addRefbackPoints ($userid, $ref, $points, $ref_points) {
 // "Getter" for refback percents
 function getRefbackPercents ($userid, $ref) {
        //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
 // "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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$ref}<br />");
        // Skip identical ids
        if ($userid == $ref) return 0;
 
        // Skip identical ids
        if ($userid == $ref) return 0;
 
@@ -124,10 +124,10 @@ function getRefbackPercents ($userid, $ref) {
        if (SQL_NUMROWS($result) == 1) {
                // Fetch percents
                list($percents) = SQL_FETCHROW($result);
        if (SQL_NUMROWS($result) == 1) {
                // Fetch percents
                list($percents) = SQL_FETCHROW($result);
-               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):percents={$percents}<br />");
+               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):percents={$percents}<br />");
        } else {
                // Debug log
        } else {
                // Debug log
-               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): NO ENTRY FOUND! :-(<br />");
+               //* 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! :-(");
        }
 
@@ -142,7 +142,7 @@ function getRefbackPercents ($userid, $ref) {
 // "Getter" for userid array which will return only one entry
 function getArrayFromRefbackLevel ($rid, $level) {
        //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
 // "Getter" for userid array which will return only one entry
 function getArrayFromRefbackLevel ($rid, $level) {
        //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):rid={$rid},level={$level}<br />");
+       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):rid={$rid},level={$level}<br />");
        // Init userids
        $userIds = array();
 
        // Init userids
        $userIds = array();
 
@@ -158,11 +158,11 @@ ORDER BY
                array($rid, $level), __FUNCTION__, __LINE__);
 
        // Entries found?
                array($rid, $level), __FUNCTION__, __LINE__);
 
        // Entries found?
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):numRows=".SQL_NUMROWS($result)."<br />");
+       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):numRows=".SQL_NUMROWS($result)."<br />");
        if (SQL_NUMROWS($result) > 0) {
                // Add all
                while ($content = SQL_FETCHARRAY($result)) {
        if (SQL_NUMROWS($result) > 0) {
                // Add all
                while ($content = SQL_FETCHARRAY($result)) {
-                       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):rid={$rid},level={$level},userid={$content['userid']}<br />");
+                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):rid={$rid},level={$level},userid={$content['userid']}<br />");
                        $userIds[] = $content['userid'];
                } // END - while
        } // END - if
                        $userIds[] = $content['userid'];
                } // END - while
        } // END - if
@@ -171,7 +171,7 @@ ORDER BY
        SQL_FREERESULT($result);
 
        // Return array
        SQL_FREERESULT($result);
 
        // Return array
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):rid={$rid},count()=".count($userIds)."<br />");
+       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):rid={$rid},count()=".count($userIds)."<br />");
        //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
        return $userIds;
 }
        //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
        return $userIds;
 }
@@ -181,7 +181,7 @@ 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
        if (empty($GLOBALS['refback_level'])) $GLOBALS['refback_level'] = 1;
        //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
        // 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 />");
+       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']}<br />");
 
        // Init refid
        $GLOBALS['refback_refid'][$GLOBALS['refback_level']] = '0';
 
        // Init refid
        $GLOBALS['refback_refid'][$GLOBALS['refback_level']] = '0';
@@ -192,7 +192,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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):found=".SQL_NUMROWS($result_refid)."<br />");
        if (SQL_NUMROWS($result_refid) > 0) {
                // Load all refids
                while (list($GLOBALS['refback_refid'][$GLOBALS['refback_level']]) = SQL_FETCHROW($result_refid)) {
        if (SQL_NUMROWS($result_refid) > 0) {
                // Load all refids
                while (list($GLOBALS['refback_refid'][$GLOBALS['refback_level']]) = SQL_FETCHROW($result_refid)) {
@@ -200,7 +200,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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]}<br />");
                        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]]))) {
@@ -208,7 +208,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: */ 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 />");
                                } // END - if
 
                                // Check existence
                                } // END - if
 
                                // Check existence
@@ -216,10 +216,10 @@ function updateRefbackTable ($userid) {
                                        array(bigintval($userid), $GLOBALS['refback_level'], bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
 
                                // Do we have no entry?
                                        array(bigintval($userid), $GLOBALS['refback_level'], bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __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: */ 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 />");
                                if (SQL_NUMROWS($result) == '0') {
                                        // Insert this level
                                if (SQL_NUMROWS($result) == '0') {
                                        // 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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - ADD!<br />");
                                        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__);
 
@@ -237,12 +237,12 @@ function updateRefbackTable ($userid) {
                                                array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __FUNCTION__, __LINE__);
 
                                        // Do we have no entry?
                                                array(bigintval($userid), ($GLOBALS['refback_level']-$minus), bigintval($GLOBALS['refback_refid'][$GLOBALS['refback_level']])), __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: */ 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 />");
                                        if (SQL_NUMROWS($result) == '0') {
                                                // 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_NUMROWS($result) == '0') {
                                                // 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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level=".($GLOBALS['refback_level']-$minus).",ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - RETURNED!<br />");
                                        } // END - if
                                } // END - if
                        } // END - if
                                        } // END - if
                                } // END - if
                        } // END - if
@@ -255,18 +255,18 @@ 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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$GLOBALS['refback_refid'][$GLOBALS['refback_level']]} - CACHE!<br />");
                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: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['refback_level']} - LEVEL!<br />");
 
        // Fix empty refid
        if (!isset($GLOBALS['refback_refid'][$GLOBALS['refback_level']-1])) $GLOBALS['refback_refid'][$GLOBALS['refback_level']-1] = '0';
 
        // 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(__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 />");
 }
 
        //* DEBUG: */ print("</li></ul>----------------------- <font color=\"#aa0000\">".__FUNCTION__." - EXIT</font> ------------------------<br />");
 }
 
index 76e4a85d13b06dd44e19b14047ad4f3b392e5a02..28dc8a33f192bbf8fcb2f2eb511ad111df8600e3 100644 (file)
@@ -226,7 +226,7 @@ function ifAdminCookiesAreValid ($admin, $password) {
        $pass = getAdminHash($admin);
        if ($pass != '-1') $ret = 'pass';
 
        $pass = getAdminHash($admin);
        if ($pass != '-1') $ret = 'pass';
 
-       //* DEBUG: */ outputHtml(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):".generatePassString($pass).'('.strlen($pass).")/".$password.'('.strlen($password).")<br />");
+       //* DEBUG: */ outputHtml(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):".generatePassString($pass).'('.strlen($pass).")/".$password.'('.strlen($password).")<br />");
 
        // Check if password matches
        if (($ret == 'pass') && ((generatePassString($pass) == $password) || ($pass == $password) || ((strlen($pass) == 32) && (md5($password) == $pass))) && (isAdmin())) {
 
        // Check if password matches
        if (($ret == 'pass') && ((generatePassString($pass) == $password) || ($pass == $password) || ((strlen($pass) == 32) && (md5($password) == $pass))) && (isAdmin())) {
index 178a027606baf27bdd64f3a4bbed171646d87a88..95fc006a8423946b4e46c308a29315570220126a 100644 (file)
@@ -908,7 +908,7 @@ function getModeAction ($mode, $what) {
                // Get it directly from URL
                return getAction();
        }
                // Get it directly from URL
                return getAction();
        }
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$data['action'].'<br />');
+       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>): ret=".$data['action'].'<br />');
 
        // Does the module have a menu?
        if (ifModuleHasMenu($mode)) {
 
        // Does the module have a menu?
        if (ifModuleHasMenu($mode)) {
@@ -1181,12 +1181,12 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
        // Count up referal depth
        if (!isset($GLOBALS['ref_level'])) {
                // Initialialize referal system
        // Count up referal depth
        if (!isset($GLOBALS['ref_level'])) {
                // Initialialize referal system
-               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): Referal system initialized!<br />");
+               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>): Referal system initialized!<br />");
                $GLOBALS['ref_level'] = '0';
        } else {
                // Increase referal level
                $GLOBALS['ref_level']++;
                $GLOBALS['ref_level'] = '0';
        } else {
                // Increase referal level
                $GLOBALS['ref_level']++;
-               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): Referal level increased. DEPTH={$GLOBALS['ref_level']}<br />");
+               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>): Referal level increased. DEPTH={$GLOBALS['ref_level']}<br />");
        }
 
        // Default is 'normal' points
        }
 
        // Default is 'normal' points
@@ -1196,39 +1196,39 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
        if ($locked === true) $data = 'locked_points';
 
        // Check user account
        if ($locked === true) $data = 'locked_points';
 
        // Check user account
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},points={$points}<br />");
+       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},points={$points}<br />");
        if (fetchUserData($userid)) {
                // This is the user and his ref
                $GLOBALS['cache_array']['add_userid'][getUserData('refid')] = $userid;
 
                // Get percents
                $per = getReferalLevelPercents($GLOBALS['ref_level']);
        if (fetchUserData($userid)) {
                // This is the user and his ref
                $GLOBALS['cache_array']['add_userid'][getUserData('refid')] = $userid;
 
                // Get percents
                $per = getReferalLevelPercents($GLOBALS['ref_level']);
-               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},points={$points},depth={$GLOBALS['ref_level']},per={$per},mode={$add_mode}<br />");
+               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},points={$points},depth={$GLOBALS['ref_level']},per={$per},mode={$add_mode}<br />");
 
                // Some percents found?
                if ($per > 0) {
                        // Calculate new points
 
                // Some percents found?
                if ($per > 0) {
                        // Calculate new points
-                       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},points={$points},per={$per},depth={$GLOBALS['ref_level']}<br />");
+                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},points={$points},per={$per},depth={$GLOBALS['ref_level']}<br />");
                        $ref_points = $points * $per / 100;
 
                        // Pay refback here if level > 0 and in ref-mode
                        if ((isExtensionActive('refback')) && ($GLOBALS['ref_level'] > 0) && ($per < 100) && ($add_mode == "ref") && (isset($GLOBALS['cache_array']['add_userid'][$userid]))) {
                        $ref_points = $points * $per / 100;
 
                        // Pay refback here if level > 0 and in ref-mode
                        if ((isExtensionActive('refback')) && ($GLOBALS['ref_level'] > 0) && ($per < 100) && ($add_mode == "ref") && (isset($GLOBALS['cache_array']['add_userid'][$userid]))) {
-                               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},data={$GLOBALS['cache_array']['add_userid'][$userid]},ref_points={$ref_points},depth={$GLOBALS['ref_level']} - BEFORE!<br />");
+                               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},data={$GLOBALS['cache_array']['add_userid'][$userid]},ref_points={$ref_points},depth={$GLOBALS['ref_level']} - BEFORE!<br />");
                                $ref_points = addRefbackPoints($GLOBALS['cache_array']['add_userid'][$userid], $userid, $points, $ref_points);
                                $ref_points = addRefbackPoints($GLOBALS['cache_array']['add_userid'][$userid], $userid, $points, $ref_points);
-                               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},data={$GLOBALS['cache_array']['add_userid'][$userid]},ref_points={$ref_points},depth={$GLOBALS['ref_level']} - AFTER!<br />");
+                               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},data={$GLOBALS['cache_array']['add_userid'][$userid]},ref_points={$ref_points},depth={$GLOBALS['ref_level']} - AFTER!<br />");
                        } // END - if
 
                        // Update points...
                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `%s`=`%s`+%s WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1",
                                array($data, $data, $ref_points, bigintval($userid), bigintval($GLOBALS['ref_level'])), __FUNCTION__, __LINE__);
                        } // END - if
 
                        // Update points...
                        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `%s`=`%s`+%s WHERE `userid`=%s AND `ref_depth`='%s' LIMIT 1",
                                array($data, $data, $ref_points, bigintval($userid), bigintval($GLOBALS['ref_level'])), __FUNCTION__, __LINE__);
-                       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},userid={$userid},depth={$GLOBALS['ref_level']},mode={$add_mode} - UPDATE! (".SQL_AFFECTEDROWS().")<br />");
+                       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):data={$data},ref_points={$ref_points},userid={$userid},depth={$GLOBALS['ref_level']},mode={$add_mode} - UPDATE! (".SQL_AFFECTEDROWS().")<br />");
 
                        // No entry updated?
                        if (SQL_AFFECTEDROWS() < 1) {
                                // First ref in this level! :-)
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_points` (`userid`,`ref_depth`,`%s`) VALUES (%s,'%s',%s)",
                                        array($data, bigintval($userid), bigintval($GLOBALS['ref_level']), $ref_points), __FUNCTION__, __LINE__);
 
                        // No entry updated?
                        if (SQL_AFFECTEDROWS() < 1) {
                                // First ref in this level! :-)
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_points` (`userid`,`ref_depth`,`%s`) VALUES (%s,'%s',%s)",
                                        array($data, bigintval($userid), bigintval($GLOBALS['ref_level']), $ref_points), __FUNCTION__, __LINE__);
-                               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):data={$data},ref_points={$ref_points},userid={$userid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")<br />");
+                               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):data={$data},ref_points={$ref_points},userid={$userid},depth={$GLOBALS['ref_level']},mode={$add_mode} - INSERTED! (".SQL_AFFECTEDROWS().")<br />");
                        } // END - if
 
                        // Points updated, maybe I shall send him an email?
                        } // END - if
 
                        // Points updated, maybe I shall send him an email?
@@ -1264,7 +1264,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
                        // Maybe there's another ref?
                        if ((getUserData('refid') > 0) && ($points > 0) && (getUserData('refid') != $userid) && ($add_mode == 'ref')) {
                                // Then let's credit him here...
                        // Maybe there's another ref?
                        if ((getUserData('refid') > 0) && ($points > 0) && (getUserData('refid') != $userid) && ($add_mode == 'ref')) {
                                // Then let's credit him here...
-                               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref=".getUserData('refid').",points={$points} - ADVANCE!<br />");
+                               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref=".getUserData('refid').",points={$points} - ADVANCE!<br />");
                                addPointsThroughReferalSystem(sprintf("%s_ref:%s", $subject, $GLOBALS['ref_level']), getUserData('refid'), $points, $sendNotify, getUserData('refid'), $locked);
                        } // END - if
                } // END - if
                                addPointsThroughReferalSystem(sprintf("%s_ref:%s", $subject, $GLOBALS['ref_level']), getUserData('refid'), $points, $sendNotify, getUserData('refid'), $locked);
                        } // END - if
                } // END - if
@@ -1277,19 +1277,19 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
 function updateReferalCounter ($userid) {
        // Make it sure referal level zero (member him-/herself) is at least selected
        if (empty($GLOBALS['cache_array']['ref_level'][$userid])) $GLOBALS['cache_array']['ref_level'][$userid] = 1;
 function updateReferalCounter ($userid) {
        // Make it sure referal level zero (member him-/herself) is at least selected
        if (empty($GLOBALS['cache_array']['ref_level'][$userid])) $GLOBALS['cache_array']['ref_level'][$userid] = 1;
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},level={$GLOBALS['cache_array']['ref_level'][$userid]}<br />");
+       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},level={$GLOBALS['cache_array']['ref_level'][$userid]}<br />");
 
        // Update counter
        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `counter`=`counter`+1 WHERE `userid`=%s AND `level`='%s' LIMIT 1",
                array(bigintval($userid), $GLOBALS['cache_array']['ref_level'][$userid]), __FUNCTION__, __LINE__);
 
        // When no entry was updated then we have to create it here
 
        // Update counter
        SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_refsystem` SET `counter`=`counter`+1 WHERE `userid`=%s AND `level`='%s' LIMIT 1",
                array(bigintval($userid), $GLOBALS['cache_array']['ref_level'][$userid]), __FUNCTION__, __LINE__);
 
        // When no entry was updated then we have to create it here
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):updated=".SQL_AFFECTEDROWS().'<br />');
+       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):updated=".SQL_AFFECTEDROWS().'<br />');
        if (SQL_AFFECTEDROWS() < 1) {
                // First count!
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refsystem` (`userid`, `level`, `counter`) VALUES (%s,%s,1)",
                        array(bigintval($userid), $GLOBALS['cache_array']['ref_level'][$userid]), __FUNCTION__, __LINE__);
        if (SQL_AFFECTEDROWS() < 1) {
                // First count!
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_refsystem` (`userid`, `level`, `counter`) VALUES (%s,%s,1)",
                        array(bigintval($userid), $GLOBALS['cache_array']['ref_level'][$userid]), __FUNCTION__, __LINE__);
-               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid}<br />");
+               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid}<br />");
        } // END - if
 
        // Init referal id
        } // END - if
 
        // Init referal id
@@ -1301,17 +1301,17 @@ function updateReferalCounter ($userid) {
                $ref = getUserData('refid');
        } // END - if
 
                $ref = getUserData('refid');
        } // END - if
 
-       //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):userid={$userid},ref={$ref}<br />");
+       //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):userid={$userid},ref={$ref}<br />");
 
        // When he has a referal...
        if (($ref > 0) && ($ref != $userid)) {
                // Move to next referal level and count his counter one up!
 
        // When he has a referal...
        if (($ref > 0) && ($ref != $userid)) {
                // Move to next referal level and count his counter one up!
-               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - ADVANCE!<br />");
+               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):ref={$ref} - ADVANCE!<br />");
                $GLOBALS['cache_array']['ref_level'][$userid]++;
                updateReferalCounter($ref);
        } elseif ((($ref == $userid) || ($ref == '0')) && (isExtensionInstalledAndNewer('cache', '0.1.2'))) {
                // Remove cache here
                $GLOBALS['cache_array']['ref_level'][$userid]++;
                updateReferalCounter($ref);
        } elseif ((($ref == $userid) || ($ref == '0')) && (isExtensionInstalledAndNewer('cache', '0.1.2'))) {
                // Remove cache here
-               //* DEBUG: */ print(__FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>):ref={$ref} - CACHE!<br />");
+               //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>):ref={$ref} - CACHE!<br />");
                rebuildCacheFile('refsystem', 'refsystem');
        }
 
                rebuildCacheFile('refsystem', 'refsystem');
        }