./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/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/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
$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());
}
}
} // 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));
}
}
// 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
} 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]);
}
}
} // 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));
}
}
} // 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]);
}
}
// 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
- 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));
}
}
// 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);
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
} // 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);
// 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 () {
- //* 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 () {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName());
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName());
return count($GLOBALS['ext_update_depends'][getCurrentExtensionName()]);
}
// 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';
}
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 () {
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "currName=".getCurrentExtensionName());
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName());
$GLOBALS['ext_depend_iterator'][getCurrentExtensionName()]++;
}
} // 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'))) {
// Return data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// [EOF]
}
// 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!');
- 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
- $postData['login'][getCurrentAdminId()] = $data['login'];
+ $postData['login'][getCurrentAdminId()] = $filterData['login'];
$postData['login_failures'][getCurrentAdminId()] = '0';
$postData['last_failure'][getCurrentAdminId()] = null;
// Return the data for further processing
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// 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!');
- $postData['login'][getCurrentAdminId()] = $data['login'];
+ $postData['login'][getCurrentAdminId()] = $filterData['login'];
$postData['login_failures'][getCurrentAdminId()] = '`login_failures`+1';
$postData['last_failure'][getCurrentAdminId()] = 'NOW()';
// 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
-function FILTER_REHASH_ADMINS_PASSWORD ($data) {
+function FILTER_REHASH_ADMINS_PASSWORD ($filterData) {
// Generate new hash
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
- $newHash = generateHash($data['plain_pass']);
+ $newHash = generateHash($filterData['plain_pass']);
// Prepare update data
- $postData['login'][getCurrentAdminId()] = $data['login'];
+ $postData['login'][getCurrentAdminId()] = $filterData['login'];
$postData['password'][getCurrentAdminId()] = $newHash;
// Change it in the admin
// 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!');
- return $data;
+ return $filterData;
}
// [EOF]
} // 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()) {
// Return data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// 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'?
- if ($data['type'] == 'bid') {
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
+ if ($filterData['type'] == 'bid') {
// Load template
- $data['__output'] .= loadTemplate('admin_links_bonus_mail', true, $data);
+ $filterData['__output'] .= loadTemplate('admin_links_bonus_mail', true, $filterData);
} // END - if
// Return data
- return $data;
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $filterData;
}
// [EOF]
} // 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!');
- 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;
+ return $filterData;
}
// [EOF]
} // 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 it
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// 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()) {
// Return the data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// 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()) {
} // END - foreach
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// 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'))) {
} // END - if
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// [EOF]
} // 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'
- $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;
+ return $filterData;
}
// [EOF]
} // 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!');
- $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;
+ return $filterData;
}
// [EOF]
} // 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)) {
// Return data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// [EOF]
} // 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?
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
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
- return $data;
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $filterData;
}
// [EOF]
} // 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)) {
// Return data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// [EOF]
} // 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)) {
// Return data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// [EOF]
} // 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!');
- return $data;
+ return $filterData;
}
// [EOF]
} // 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!');
- $content = $data;
+ $content = $filterData;
// 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
// 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%}';
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?
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!');
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;
- } elseif ($data[$urlId]['url_status'] != $filterData['prev_status']) {
+ } elseif ($filterData[$urlId]['url_status'] != $filterData['prev_status']) {
// 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
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
return $filterData;
}
} // 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())) {
// 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
-function FILTER_SET_USERS_THEME ($data) {
+function FILTER_SET_USERS_THEME ($filterData) {
// 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.');
// Return data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// [EOF]
} // 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')) {
// Return data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// [EOF]
} // 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)) {
// Return data
//* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
- return $data;
+ return $filterData;
}
// [EOF]
} // 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
- $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 $data;
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!');
+ return $filterData;
}
// [EOF]
// 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
$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']);
// 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())) {
// 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
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
// 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
}
// 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
// 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
'ADMIN_MENU_IS_ACTIVE' => "Menüpunkt ist aktiviert",
'ADMIN_CREATE_ACTION_FIRST' => "Bitte erstellen Sie zuerst die action-xxxxx.php Datei. Dann können Sie sie hier auswählen.",
'ADMIN_IS_FIRST_MENU' => "Ist das erste Hauptmenü",
- '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ändig. Bitte in <strong>{?CACHE_PATH?}config-local.php</strong> mindestens den Hostnamen, Datenbanknamen und Login zur Datenbank eingeben.",
'REGISTER_PERSONAL_DATA' => "Persönliche Daten",
'REGISTER_CATEGORIES' => "Interessengebiete",
'REGISTER_MISC' => "Passwort, maximale Mails pro Tag etc.",
'SORT_DESCENDING' => "Absteigend",
'INVALID_EMAIL_ENTERED' => "Ungütige EMail-Adresse eingegeben.",
'NEVER_HAPPENED' => "Nie",
- 'WRONG_DB_SELECTED' => "Falsche oder fehlende Datenbank ausgewä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ügen",
'FILTER_FAILED_ALREADY_ADDED' => "Die Filterfunktion <span class=\"data\">%s</span> ist bereits der Filterkette <span class=\"data\">%s</span> hinzugefü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ägen geändert.",
'ADMIN_MENU_WHAT_404_TITLE' => "Untermenü '%s' 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_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
'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öchten. Wir müssen die URL jedoch erneut freigeben.",
- // Internal errors
- 'MEMBER_SURFBAR_EXECUTE_ACTION_404' => "Auszufü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:",
));
// 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'];
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);
- //* 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) {
- //* 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__);
- //* 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
- //* 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;
- //* 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
$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) {
- //* 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;
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
- //* DEBUG: */ print(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__."</font>): NO ENTRY FOUND! :-(<br />");
logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ',ref=' . $ref . ' - No entry found. :-(');
}
} // 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) {
- //* 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();
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)) {
- //* 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
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) {
- //* 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 />");
+ 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';
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)) {
$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]]))) {
$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
), __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
- //* 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__);
), __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__);
- //* 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
// 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']--;
- //* 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
- 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) {
- //* 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();
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) {
- //* DEBUG: */ print("----------------------- <font color=\"#00aa00\">".__FUNCTION__." - ENTRY</font> ------------------------<ul><li>\n");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $id . ' - ENTERED!');
// Default data is nothing
$data = array();
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) {
- //* 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--}';
$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;
}
// 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
- 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!
- 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!
- 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
- 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
- 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;
}
// 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
+ /* 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!
+ /* 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!
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Maximum exceeded, url=' . $url . ',userid=' . $userid);
return false;
}
// 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
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs type ' . gettype($IDs) . '!=array');
return false;
} elseif (count($IDs) == 0) {
// Empty array
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs is empty');
return false;
}
// 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
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs type ' . gettype($IDs) . '!=array');
return false;
} elseif (count($IDs) == 0) {
// Empty array
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs is empty');
return false;
}
// 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
+ /* 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!
+ /* 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!
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Maximum exceeded, url=' . $url . ',limit=' . $limit);
return false;
} elseif (''.($limit + 0).'' != ''.$limit.'') {
// Invalid amount entered
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid limit, url=' . $url . ',limit=' . $limit);
return false;
}
// 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!
+ /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid form data, required field id/action not found');
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
+ /* 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;
}
$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
} // 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
$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
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!
- //* 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'];
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;
// 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;
}
// 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 = $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
// 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;
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!
- 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?
- addFatalMessage(__FILE__, __LINE__, '{--MYSQL_DATA_MISSING--}');
+ debug_report_bug(__FILE__, __LINE__, 'Database login is missing.');
}
} else {
// Default output is 'direct' for HTML output
* 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;
- //* DEBUG: */ debugOutput('----------------------- <font color="#00aa00">' . __FUNCTION__ . ' - ENTRY</font> ------------------------<ul><li>');
// Convert mode to upper-case
$addMode = strtoupper($addMode);
} // 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;
}
// "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();
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;
}
// 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]));
}
} // 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
- //* 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
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "NO-NICK!<br />");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . $userid . ' - USERID!');
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());
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
$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
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "fuzzyFound!<br />");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'fuzzyFound!');
$fuzzyFound = true;
break;
} // END - if
// 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!
- //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, "match={$match}<br />");
+ //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'match=' . $match);
$code = str_replace($match, '".' . $match . '."', $code);
$matchesFound[$match] = 1;
}
$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