From: Roland Häder Date: Wed, 17 Oct 2012 21:42:50 +0000 (+0000) Subject: Code style changed, ext-user continued: X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=596c8ab32594401ca84abfbfe35513ddfff31bec Code style changed, ext-user continued: - Changed true/false to TRUE/FALSE - Introduced validateSubId() and prepareFoundSubId() - Add validation of edited sub id by member - TODOs.txt updated --- diff --git a/DOCS/TODOs.txt b/DOCS/TODOs.txt index ed8609e4ae..2926d7139f 100644 --- a/DOCS/TODOs.txt +++ b/DOCS/TODOs.txt @@ -57,9 +57,9 @@ ./inc/functions.php:1090: // @TODO Move this SQL code into a function, let's say 'getTimestampFromPoolId($id) ? ./inc/functions.php:1176: // @TODO Are these convertions still required? ./inc/functions.php:1197:// @TODO Rewrite this function to use readFromFile() and writeToFile() -./inc/functions.php:1732: // @TODO Find a way to cache this -./inc/functions.php:1837: // @TODO This is still very static, rewrite it somehow -./inc/functions.php:2041: // @TODO Rename column data_type to e.g. mail_status +./inc/functions.php:1733: // @TODO Find a way to cache this +./inc/functions.php:1838: // @TODO This is still very static, rewrite it somehow +./inc/functions.php:2042: // @TODO Rename column data_type to e.g. mail_status ./inc/gen_sql_patches.php:95:// @TODO Rewrite this to a filter ./inc/header.php:66:// @TODO Find a way to not use direct module comparison ./inc/install-functions.php:91: // @TODO DEACTIVATED: changeDataInLocalConfigurationFile('OUTPUT-MODE', "setConfigEntry('OUTPUT_MODE', '", "');", postRequestElement('omode'), 0); @@ -95,7 +95,7 @@ ./inc/libs/theme_functions.php:94: // @TODO Can't this be rewritten to an API function? ./inc/libs/user_functions.php:325: // @TODO Make this filter working: $ADDON = runFilterChain('post_login_update', $content); ./inc/libs/user_functions.php:354: // @TODO Make this filter working: $url = runFilterChain('do_login', array('content' => $content, 'addon' => $ADDON)); -./inc/libs/yoomedia_functions.php:108: $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script +./inc/libs/yoomedia_functions.php:108: $response = YOOMEDIA_QUERY_API('out_textmail.php', TRUE); // @TODO Ask Yoo!Media for test script ./inc/load_config.php:75: // @TODO Rewrite them to avoid this else block ./inc/loader/load-extension.php:13: * @TODO Rewrite this whole file * ./inc/mails/doubler_mails.php:53:// @TODO Can this be rewritten to a filter? diff --git a/DOCS/tpl-validator.php b/DOCS/tpl-validator.php index 737d10675f..6fb9e3c21d 100644 --- a/DOCS/tpl-validator.php +++ b/DOCS/tpl-validator.php @@ -48,8 +48,8 @@ if ($_SERVER['argc'] < 2) { print "Validating template ".$_SERVER['argv'][1]."...\n"; $doc = new DOMDocument(); -$doc->formatOutput = true; -$doc->preserveWhiteSpace = false; +$doc->formatOutput = TRUE; +$doc->preserveWhiteSpace = FALSE; $doc->encoding = 'UTF-8'; $doc->xmlVersion = '1.1'; $doc->loadHTMLFile($_SERVER['argv'][1]); diff --git a/admin.php b/admin.php index 9505fa7de7..c2a9b72526 100644 --- a/admin.php +++ b/admin.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module $GLOBALS['__module'] = 'admin'; diff --git a/agb.php b/agb.php index a47be37f6d..d36ebc3ed7 100644 --- a/agb.php +++ b/agb.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module and output mode (raw) $GLOBALS['__module'] = 'agb'; diff --git a/ajax.php b/ajax.php index 3dcd835c8d..f6c0648339 100644 --- a/ajax.php +++ b/ajax.php @@ -42,7 +42,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); /* * Set output to "AJAX mode", proper module and prevent HTML headers/footers diff --git a/autoreg.php b/autoreg.php index de3548d399..a5bf978dcf 100644 --- a/autoreg.php +++ b/autoreg.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module $GLOBALS['__module'] = 'autoreg'; diff --git a/beg.php b/beg.php index 1e8ef5f93e..ba9bc75965 100644 --- a/beg.php +++ b/beg.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module and output mode (HTML) $GLOBALS['__module'] = 'beg'; @@ -61,7 +61,7 @@ if (isGetRequestElementSet('userid')) { $points = '0'; // Don't pay is the default... - $pay = false; + $pay = FALSE; // Validate if it is not a number if ((isExtensionActive('nickname')) && (isNicknameUsed(getRequestElement('userid')))) { @@ -90,8 +90,8 @@ if (isGetRequestElementSet('userid')) { // Set nickname / userid for template $content['userid'] = getRequestElement('userid'); $content['clicks'] = (getUserData('beg_clicks') + 1); - $content['header_banner'] = loadTemplate('beg_header_banner', true); - $content['footer_banner'] = loadTemplate('beg_footer_banner', true); + $content['header_banner'] = loadTemplate('beg_header_banner', TRUE); + $content['footer_banner'] = loadTemplate('beg_footer_banner', TRUE); $content['points'] = $points; } // END - if @@ -135,29 +135,29 @@ if (isGetRequestElementSet('userid')) { // Pay points? //* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'pay=' . intval($pay)); - if ($pay === true) { + if ($pay === TRUE) { // Add points to user or begging rallye account if (addPointsBeg(getUserData('userid'), $points)) { // Set 'done' message - $content['message'] = loadTemplate('beg_done', true, $content); + $content['message'] = loadTemplate('beg_done', TRUE, $content); } else { // Error! - $content['message'] = loadTemplate('beg_failed', true, $content); + $content['message'] = loadTemplate('beg_failed', TRUE, $content); } } else { // Error! - $content['message'] = loadTemplate('beg_failed', true, $content); + $content['message'] = loadTemplate('beg_failed', TRUE, $content); } } elseif (isMember()) { // Logged in user found - $content['message'] = loadTemplate('beg_login', true, $content); + $content['message'] = loadTemplate('beg_login', TRUE, $content); } elseif (getBegPayMode() != 'NONE') { // Other pay-mode active! // Load message template depending on pay-mode - $content['message'] = loadTemplate('beg_pay_mode_' . strtolower(getBegPayMode()), true, $content); - $pay = true; + $content['message'] = loadTemplate('beg_pay_mode_' . strtolower(getBegPayMode()), TRUE, $content); + $pay = TRUE; } else { // Clicked received while reload lock is active - $content['message'] = loadTemplate('beg_failed', true, $content); + $content['message'] = loadTemplate('beg_failed', TRUE, $content); } // Free memory @@ -167,20 +167,20 @@ if (isGetRequestElementSet('userid')) { loadIncludeOnce('inc/header.php'); // Load final template - loadTemplate('beg_link', false, $content); + loadTemplate('beg_link', FALSE, $content); // Tracker code enabled? (We don't track users here! - if ((getBegPayMode() != 'NONE') && ($pay === true)) { + if ((getBegPayMode() != 'NONE') && ($pay === TRUE)) { // Prepare content for template // @TODO Opps, what is missing here??? $content = array( ); // Include config-depending template - loadTemplate('beg_pay_code_' . strtolower(getBegPayMode()), false, $content); - } elseif (($pay === false) && (!isset($content['message']))) { + loadTemplate('beg_pay_code_' . strtolower(getBegPayMode()), FALSE, $content); + } elseif (($pay === FALSE) && (!isset($content['message']))) { // Cannot pay! :-( - $content['message'] = loadTemplate('beg_failed', true); + $content['message'] = loadTemplate('beg_failed', TRUE); } // Include footer diff --git a/birthday_confirm.php b/birthday_confirm.php index f1193741f4..469104d454 100644 --- a/birthday_confirm.php +++ b/birthday_confirm.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module $GLOBALS['__module'] = 'birthday_confirm'; @@ -58,7 +58,7 @@ redirectOnUninstalledExtension('birthday'); $userid = bigintval(getRequestElement('userid')); // Only allow numbers here... -$chk = bigintval(getRequestElement('check'), false); +$chk = bigintval(getRequestElement('check'), FALSE); // Check if link is not clicked so far $result = SQL_QUERY_ESC("SELECT @@ -85,7 +85,7 @@ $content = array(); // Is an entry there? if (SQL_NUMROWS($result) == 1) { // Ok, congratulation again! Here's your gift from us... - $data = SQL_FETCHARRAY($result, false); + $data = SQL_FETCHARRAY($result, FALSE); // Is the account confirmed? if ($data['status'] == 'CONFIRMED') { @@ -98,7 +98,7 @@ if (SQL_NUMROWS($result) == 1) { array($userid, $chk), __FILE__, __LINE__); // Load message from template - $content['message'] = loadTemplate('birthday_msg', true, $data); + $content['message'] = loadTemplate('birthday_msg', TRUE, $data); } else { // Unconfirmed / locked accounts cannot get points $content['message'] = '{%message,MEMBER_BIRTHDAY_CANNOT_STATUS=' . $data['status'] . '%}'; @@ -118,13 +118,13 @@ $GLOBALS['__module'] = 'birthday_confirm'; loadIncludeOnce('inc/header.php'); // Load birthday header template (for your banners, e.g.?) -$content['header'] = loadTemplate('birthday_header', true); +$content['header'] = loadTemplate('birthday_header', TRUE); // Load birthday footer template (for your banners, e.g.?) -$content['footer'] = loadTemplate('birthday_footer', true); +$content['footer'] = loadTemplate('birthday_footer', TRUE); // Load final template and output it -loadTemplate('birthday_confirm', false, $content); +loadTemplate('birthday_confirm', FALSE, $content); // Include footer loadIncludeOnce('inc/footer.php'); diff --git a/click.php b/click.php index 7a35e98a54..2647b5f7fa 100644 --- a/click.php +++ b/click.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module $GLOBALS['__module'] = 'click'; diff --git a/confirm.php b/confirm.php index 5df3718fb6..baddd4e53d 100644 --- a/confirm.php +++ b/confirm.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module to confirm and output-mode to raw $GLOBALS['__module'] = 'confirm'; diff --git a/css.php b/css.php index c75762c63c..f3ba59c4d6 100644 --- a/css.php +++ b/css.php @@ -42,7 +42,7 @@ require('inc/libs/security_functions.php'); $GLOBALS['__footer_sent'] = -1; // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // This is a CSS file loader $GLOBALS['__module'] = 'css'; diff --git a/debug.php b/debug.php index 77443cf126..694f377a7b 100644 --- a/debug.php +++ b/debug.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module and fake "CSS mode" $GLOBALS['__module'] = 'debug'; diff --git a/doubler.php b/doubler.php index fae376478f..b640d54d79 100644 --- a/doubler.php +++ b/doubler.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module and output mode $GLOBALS['__module'] = 'doubler'; @@ -132,7 +132,7 @@ if (isFormSent()) { updateConfiguration('doubler_counter', 1, '+'); // Set constant - $content['message'] = loadTemplate('doubler_reflink', true, postRequestElement('userid')); + $content['message'] = loadTemplate('doubler_reflink', TRUE, postRequestElement('userid')); } else { // Not enougth points left $content['message'] = '{--DOUBLER_FORM_NO_POINTS_LEFT--}'; @@ -180,11 +180,11 @@ if (getConfig('doubler_send_mode') == 'DIRECT') { loadIncludeOnce('inc/header.php'); // Banner in text -$content['banner'] = loadTemplate('doubler_banner', true); +$content['banner'] = loadTemplate('doubler_banner', TRUE); // Load header/footer templates -$content['header'] = loadTemplate('doubler_header', true); -$content['footer'] = loadTemplate('doubler_footer', true); +$content['header'] = loadTemplate('doubler_header', TRUE); +$content['footer'] = loadTemplate('doubler_footer', TRUE); if (isUserDataValid()) { // Transfer userid/nickname to constant @@ -210,7 +210,7 @@ $content['payout_time'] = '{--DOUBLER_PAYOUT_TIME_' . getConfig('doubler_send_mo $content['payout_history'] = generateDoublerTable(0, 'Y', 'N', 'DESC'); // Output neccessary form for this -loadTemplate('doubler_index', false, $content); +loadTemplate('doubler_index', FALSE, $content); // Output footer loadIncludeOnce('inc/footer.php'); diff --git a/img.php b/img.php index 6cb9043b66..0325c3f12a 100644 --- a/img.php +++ b/img.php @@ -39,7 +39,7 @@ require('inc/libs/security_functions.php'); // Init start time -$GLOBALS['__start_time'] = microtime(true); +$GLOBALS['__start_time'] = microtime(TRUE); // Set module and output mode $GLOBALS['__module'] = 'img'; diff --git a/inc/ajax-functions.php b/inc/ajax-functions.php index 47db96ca0b..6524909cfc 100644 --- a/inc/ajax-functions.php +++ b/inc/ajax-functions.php @@ -67,7 +67,7 @@ function initAjax () { // Setter for AJAX reply content function setAjaxReplyContent ($content) { // Set it, but with URL encoding - $GLOBALS['ajax_reply']['reply_content'] = urlencode(doFinalCompilation($content, false)); + $GLOBALS['ajax_reply']['reply_content'] = urlencode(doFinalCompilation($content, FALSE)); } /** @@ -76,7 +76,7 @@ function setAjaxReplyContent ($content) { */ function isAjaxRequestLevelValid () { // By default nothing is valid - $isValid = false; + $isValid = FALSE; // Switch on the 'level' value switch (postRequestElement('level')) { diff --git a/inc/ajax/ajax_admin.php b/inc/ajax/ajax_admin.php index ae95def44c..05d9d690f1 100644 --- a/inc/ajax/ajax_admin.php +++ b/inc/ajax/ajax_admin.php @@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { // "Generates" admin content by loading a message template function generateAdminContent () { // Return it - return displayMessage('{--ADMIN_AJAX_MENU_IS_LOADING--}', true); + return displayMessage('{--ADMIN_AJAX_MENU_IS_LOADING--}', TRUE); } // Processes AJAX requests for admin menu @@ -96,7 +96,7 @@ function doAjaxAdminRequestContent () { // Is the HTTP status still the same? (204 No Content) if (getHttpStatus() == '204 No Content') { // We use the current access level 'install' as prefix and construct a template name - setAjaxReplyContent(loadTemplate('admin_area_' . trim(postRequestElement('tab')), true)); + setAjaxReplyContent(loadTemplate('admin_area_' . trim(postRequestElement('tab')), TRUE)); // Has the template been loaded? if (isset($GLOBALS['template_content']['html']['admin_page_' . trim(postRequestElement('tab'))])) { diff --git a/inc/ajax/ajax_installer.php b/inc/ajax/ajax_installer.php index f9c50322d0..d6041f458c 100644 --- a/inc/ajax/ajax_installer.php +++ b/inc/ajax/ajax_installer.php @@ -77,7 +77,7 @@ function doAjaxProcessInstall () { // Processes installer request for testing function doAjaxInstallerTest () { // Load the "test passed" template - setAjaxReplyContent(loadTemplate('ajax_test_passed', true)); + setAjaxReplyContent(loadTemplate('ajax_test_passed', TRUE)); // All okay if we reach this point setHttpStatus('200 OK'); @@ -147,7 +147,7 @@ function doAjaxInstallerRequestContent () { // Is the HTTP status still the same? (204 No Content) if (getHttpStatus() == '204 No Content') { // We use the current access level 'install' as prefix and construct a template name - setAjaxReplyContent(loadTemplate('install_page_' . trim(postRequestElement('tab')), true)); + setAjaxReplyContent(loadTemplate('install_page_' . trim(postRequestElement('tab')), TRUE)); // Has the template been loaded? if (isset($GLOBALS['template_content']['html']['install_page_' . trim(postRequestElement('tab'))])) { @@ -185,10 +185,10 @@ function doAjaxInstallerChangeWarning () { if (in_array(postRequestElement('button'), array('previous', 'next'))) { // Load 'prefixed' template - setAjaxReplyContent(loadTemplate('install_warning_' . postRequestElement('button'), true, $content)); + setAjaxReplyContent(loadTemplate('install_warning_' . postRequestElement('button'), TRUE, $content)); } else { // Load 'tab' template - setAjaxReplyContent(loadTemplate('install_warning_tab', true, $content)); + setAjaxReplyContent(loadTemplate('install_warning_tab', TRUE, $content)); } // All okay if we reach this point @@ -217,12 +217,12 @@ function doAjaxInstallerSaveChanges () { 'status' => 'failed', 'message' => '{--INSTALLER_SAVE_CHANGES_FAILED--}', // Don't set this to false, or else it will be returned as 'failed' but is saved - 'is_saved' => true, + 'is_saved' => TRUE, 'failed_fields' => array() ); // Init overall status - $isAllSaved = true; + $isAllSaved = TRUE; // Now set all remaining data in session foreach (postRequestArray() as $key => $value) { @@ -236,12 +236,12 @@ function doAjaxInstallerSaveChanges () { ); // Save the overall status for below final check - $isAllSaved = (($isAllSaved === true) && ($saveStatus['is_saved'] === true)); + $isAllSaved = (($isAllSaved === TRUE) && ($saveStatus['is_saved'] === TRUE)); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ',is_saved=' . intval($saveStatus['is_saved']) . ',isAllSaved=' . intval($isAllSaved)); } // END - foreach // 'is_saved' is still true? - if ($isAllSaved === true) { + if ($isAllSaved === TRUE) { // Set 'done' and message $saveStatus['status'] = 'done'; $saveStatus['message'] = '{--INSTALLER_SAVE_CHANGES_DONE--}'; @@ -390,13 +390,13 @@ function doAjaxPrepareInstallerOverview () { // Status message (e.g. for output) 'message' => '{--INSTALLER_OVERVIEW_FINAL_CHECK_FAILED--}', // Don't set this to false, or else it will be returned as 'failed' but is saved - 'is_valid' => true, + 'is_valid' => TRUE, // Failed fields 'failed_fields' => array() ); // Init overall status and final output - $isAllValid = true; + $isAllValid = TRUE; $output = ''; // Check all data in session @@ -411,18 +411,18 @@ function doAjaxPrepareInstallerOverview () { $verificationStatus['is_valid'] = (isInstallerDataValid($verificationStatus, $key, $value)); // Is this step okay? - if ($verificationStatus['is_valid'] === true) { + if ($verificationStatus['is_valid'] === TRUE) { // Add this key/value pair to a overview group addKeyValueToInstallerOverviewGroup($key, $value); } // END - if // Save the overall status for below final check //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ',is_valid=' . intval($verificationStatus['is_valid']) . ',isAllValid=' . intval($isAllValid)); - $isAllValid = (($isAllValid === true) && ($verificationStatus['is_valid'] === true)); + $isAllValid = (($isAllValid === TRUE) && ($verificationStatus['is_valid'] === TRUE)); } // END - foreach // Is it still true? - if ($isAllValid === true) { + if ($isAllValid === TRUE) { // Set 'done' and message $verificationStatus['status'] = 'done'; $verificationStatus['message'] = '{--INSTALLER_OVERVIEW_FINAL_CHECK_DONE--}'; diff --git a/inc/callback-functions.php b/inc/callback-functions.php index 042781b9c1..4b9c5c8b59 100644 --- a/inc/callback-functions.php +++ b/inc/callback-functions.php @@ -1272,7 +1272,7 @@ function addXmlValueToCallbackAttributes ($element, $attributes, $extraKey = '', $GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][] = $attributes['VALUE']; } elseif (isset($GLOBALS['__XML_ARGUMENTS']['doXmlCallbackFunction'][$element][$attributes['NAME']])) { // Already created - reportBug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=
' . print_r($attributes, true) . '
'); + reportBug(__FUNCTION__, __LINE__, 'NAME=' . $attributes['NAME'] . ' already addded to ' . $element . ' attributes=
' . print_r($attributes, TRUE) . '
'); } else { // Use from NAME //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'element=' . $element . ',NAME=' . $attributes['NAME'] . ',VALUE[' . gettype($attributes['VALUE']) . ']=' . $attributes['VALUE'] . ' - NAME!'); @@ -1294,7 +1294,7 @@ function doXmlCallbackFunctionExecute ($callbackName, $args, $columnIndex) { } // END - if // Just call it - //* DEBUG: */ die('callbackFunction=' . $callbackName . ',columnIndex=' . $columnIndex . ',args=
'.print_r($args, true).'
'); + //* DEBUG: */ die('callbackFunction=' . $callbackName . ',columnIndex=' . $columnIndex . ',args=
'.print_r($args, TRUE).'
'); call_user_func_array($callbackName, $args); } diff --git a/inc/classes/cachesystem.class.php b/inc/classes/cachesystem.class.php index 713c1696ce..df3c14578c 100644 --- a/inc/classes/cachesystem.class.php +++ b/inc/classes/cachesystem.class.php @@ -49,7 +49,7 @@ class CacheSystem { var $fqfn = ''; // Resource to cache file - var $pointer = false; + var $pointer = FALSE; // Data array from cache var $data = array(); @@ -174,7 +174,7 @@ class CacheSystem { // Filter $GLOBALS['cache_array']['filter']['chains'][$data['filter_name']][$data['filter_function']] = $data['filter_active']; $GLOBALS['cache_array']['filter']['counter'][$data['filter_name']][$data['filter_function']] = $data['filter_counter']; - $GLOBALS['cache_array']['filter']['loaded'][$data['filter_name']][$data['filter_function']] = true; + $GLOBALS['cache_array']['filter']['loaded'][$data['filter_name']][$data['filter_function']] = TRUE; } elseif ($this->name == 'modules') { // Modules $GLOBALS['cache_array']['modules'][$k][$data['module']] = $v; @@ -224,10 +224,10 @@ class CacheSystem { $this->finalize(); // Remove cache - $this->removeCacheFile(true); + $this->removeCacheFile(TRUE); // Unsupported/unhandled cache detected - reportBug(__METHOD__, __LINE__, 'Unsupported cache ' . $this->name . ' detected, data=' . print_r($data, true) . ',k=' . $k . ',v=' . $v); + reportBug(__METHOD__, __LINE__, 'Unsupported cache ' . $this->name . ' detected, data=' . print_r($data, TRUE) . ',k=' . $k . ',v=' . $v); } // Write cache line to file @@ -259,7 +259,7 @@ class CacheSystem { // Remove pointer and status unset($this->status[$this->name]); - $this->pointer = false; + $this->pointer = FALSE; //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, 'name=' . $this->name . ' - FINALIZED!'); } // END - if } @@ -310,7 +310,7 @@ class CacheSystem { } // Destroy an existing cache file - function removeCacheFile ($force = false) { + function removeCacheFile ($force = FALSE) { // Reset read status $this->resetCacheReadStatus(); @@ -320,7 +320,7 @@ class CacheSystem { // Is the cache file not yet rebuilt? if ((!isset($this->rebuilt[$this->name])) && ($this->isCacheReadable())) { // Only run in regular output mode - if ((!isHtmlOutputMode()) && ($force === false)) { + if ((!isHtmlOutputMode()) && ($force === FALSE)) { // Debug message if allowed if (isDebugModeEnabled()) { // Debug message @@ -352,7 +352,7 @@ class CacheSystem { // The cache does no longer exist so kill the content unset($this->data[$this->name]); unset($this->version[$this->name]); - $this->rebuilt[$this->name] = true; + $this->rebuilt[$this->name] = TRUE; } else { // Not removed! reportBug(__METHOD__, __LINE__, '{%message,CACHE_CANNOT_UNLINK=' . $this->name . '%}'); @@ -424,7 +424,7 @@ class CacheSystem { if ((is_array($dummy)) && (isset($dummy[$search])) && (is_array($dummy[$search]))) { // Search for key in array $key_found = array_key_exists($search_key, $dummy[$search]); - if ($key_found == true) { + if ($key_found == TRUE) { $key = $search_key; // Key (hopefully) found? foreach ($dummy as $a => $v) { @@ -464,7 +464,7 @@ class CacheSystem { $this->version[$this->name][$ext_name] = $ext_ver; // Write cache line to file - $this->writeLine($this->rewriteEntry($ext_name, $ext_ver, 'version', true)); + $this->writeLine($this->rewriteEntry($ext_name, $ext_ver, 'version', TRUE)); } // END - if //* DEBUG: */ logDebugMessage(__METHOD__, __LINE__, 'name=' . $this->name . ',ext_name=' . $ext_name . ',ext_ver=' . $ext_ver); } else { @@ -478,7 +478,7 @@ class CacheSystem { // Check cache if (!isset($GLOBALS[__METHOD__][$ext_name])) { // Does never match by default - $GLOBALS[__METHOD__][$ext_name] = false; + $GLOBALS[__METHOD__][$ext_name] = FALSE; // Compare only if installed if (isExtensionInstalled($ext_name)) { @@ -494,11 +494,11 @@ class CacheSystem { logDebugMessage(__METHOD__, __LINE__, 'Cache ' . $this->name . ' has missing version entry for extension ' . $ext_name . '! Purging cache...'); // Remove the cache file - $this->removeCacheFile(true); + $this->removeCacheFile(TRUE); } } else { // Not installed, does always match - $GLOBALS[__METHOD__][$ext_name] = true; + $GLOBALS[__METHOD__][$ext_name] = TRUE; } } else { // Cache entry found, log debug message @@ -511,12 +511,12 @@ class CacheSystem { // Rewrit the entry so it can be stored in cache file // @TODO Add support for more types which break in last else-block - function rewriteEntry ($key, $value, $prefix = 'data', $single = false) { + function rewriteEntry ($key, $value, $prefix = 'data', $single = FALSE) { // Default is not single entry $extender = '[]'; // Add only for single array entry? - if ($single === true) { + if ($single === TRUE) { $extender = ''; } // END - if @@ -532,12 +532,12 @@ class CacheSystem { $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = NULL;'; } elseif (is_bool($value)) { // Boolean value - if ($value === true) { + if ($value === TRUE) { // True - $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = true;'; + $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = TRUE;'; } else { // False - $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = false;'; + $line = '$this->' . $prefix . "['" . $this->name . "']['" . $key . "']" . $extender . ' = FALSE;'; } } elseif (isset($value[0])) { // These lines needs fixing diff --git a/inc/classes/primera_api.class.php b/inc/classes/primera_api.class.php index c91d81ef9b..25e18681c4 100644 --- a/inc/classes/primera_api.class.php +++ b/inc/classes/primera_api.class.php @@ -175,7 +175,7 @@ class PrimeraApi { * @param string $Description Beschreibung (Sichtbar in Einzelauflistung) */ function payPrimera ($Receiver, $Amount, $Description = '') { - $valid = false; + $valid = FALSE; $postData = array('PrimusInterface_Action' => 'Pay', 'PrimusInterface_Receiver' => base64_encode($Receiver), 'PrimusInterface_Amount' => base64_encode($Amount), @@ -185,7 +185,7 @@ class PrimeraApi { $this->data = $postReturn; if ($postReturn['status'] == '200') { - $valid = true; + $valid = TRUE; } return $valid; } @@ -197,7 +197,7 @@ class PrimeraApi { * @param string/int $User Userid / Username */ function CheckPrimusUser($User) { - $valid = false; + $valid = FALSE; $postData = array('PrimusInterface_Action'=> 'CheckPrimusUser', 'PrimusInterface_CheckPrimusUser' => $User); @@ -206,7 +206,7 @@ class PrimeraApi { $this->data = $postReturn; if ($postReturn['status'] == self::PI_USER_CHECK_OK) { - $valid = true; + $valid = TRUE; } return $valid; } @@ -215,7 +215,7 @@ class PrimeraApi { * Die Funktion liefer den aktuellen Primerastand */ function getPrimera() { - $primera = false; + $primera = FALSE; $postData = array( 'PrimusInterface_Action' => 'GetPrimera' ); $postReturn = $this->parseContent( $this->queryApi($postData) ); diff --git a/inc/classes/rdf.class.php b/inc/classes/rdf.class.php index 78c7e95fbb..296e7d592e 100644 --- a/inc/classes/rdf.class.php +++ b/inc/classes/rdf.class.php @@ -61,7 +61,7 @@ class fase4_rdf { * @access private * @var boolean */ - var $_use_nl2br = true; + var $_use_nl2br = TRUE; /** * Sets the decoding mode of the read data (UTF8 scrambles some german umlauts here!) @@ -125,7 +125,7 @@ class fase4_rdf { * @see set_proxy() * @var bool */ - var $_use_proxy = false; + var $_use_proxy = FALSE; /** * just a flag for checking if proxy-support with authentication @@ -136,7 +136,7 @@ class fase4_rdf { * @see set_proxy() * @var boolean */ - var $_use_proxy_auth = false; + var $_use_proxy_auth = FALSE; /** * The time the Files will be cached (in seconds). @@ -160,7 +160,7 @@ class fase4_rdf { * @access private * @var boolean */ - var $_use_cached_file = true; + var $_use_cached_file = TRUE; /** * (fast|normal) depends on _use_dynamic_display(). _use_dynamic_display( TRUE ) -> 'normal', otherwise 'fast' @@ -192,7 +192,7 @@ class fase4_rdf { * @access private * @var boolean */ - var $_cache_dir_ok = false; + var $_cache_dir_ok = FALSE; /** * Type of the file to be parsed (RSS or RDF). @@ -239,7 +239,7 @@ class fase4_rdf { * @access private * @var array */ - var $_use_dynamic_display = false; + var $_use_dynamic_display = FALSE; /** * count @@ -255,7 +255,7 @@ class fase4_rdf { * @access private * @var boolean */ - var $_max_count = false; + var $_max_count = FALSE; /** * Array containing the content of @@ -401,7 +401,7 @@ class fase4_rdf { $this->out .= ""; $this->_output = ''; $this->_item_count = '0'; - return true; + return TRUE; } /** @@ -413,7 +413,7 @@ class fase4_rdf { * @return string Displays RDF Content ( using _display() ) * @see _remote_file, cache() */ - function finish($return = false) { + function finish($return = FALSE) { $this->out = str_replace('$', '$', $this->out); if (!$return) { @@ -441,7 +441,7 @@ class fase4_rdf { */ function use_dynamic_display( $bool ) { $this->_use_dynamic_display = $bool; - return true; + return TRUE; } /** @@ -479,12 +479,12 @@ class fase4_rdf { */ function set_refresh( $seconds ) { $this->_refresh = (time() - $seconds); - return true; + return TRUE; } function set_salt( $saltPara ) { $this->salt = $saltPara; - return true; + return TRUE; } /** @@ -499,7 +499,7 @@ class fase4_rdf { function set_max_item( $int ) { $this->_max_count = $int; - return true; + return TRUE; } /** @@ -529,7 +529,7 @@ class fase4_rdf { function _throw_exception( $msg ) { $this->out .= "
fase4 RDF Error: ".$msg."
"; - return true; + return TRUE; } /** @@ -703,7 +703,7 @@ class fase4_rdf { if (($this->_word_wrap > 0) && (strlen($this->_item['description']) > $this->_word_wrap)) { // Switch off _use_nl2br - $this->_use_nl2br = false; + $this->_use_nl2br = FALSE; // First remove all \n $this->_item['description'] = str_replace('\n', ' ', $this->_item['description']); // Wrap with
\n @@ -952,10 +952,10 @@ class fase4_rdf { { if(is_array( $options )) { $this->_display_opt = $options; - return true; + return TRUE; } else { unset($this->_display_opt); - return false; + return FALSE; } } @@ -970,7 +970,7 @@ class fase4_rdf { function set_table_width( $width = 400 ) { $this->_table_width = $width; - return true; + return TRUE; } /** @@ -1011,7 +1011,7 @@ class fase4_rdf { if(!$this->_cache_dir_ok) { $this->_create_cache_dir(); } - if($this->_use_dynamic_display == true) { + if($this->_use_dynamic_display == TRUE) { $this->_cached_file = md5('dynamic'.$this->salt.$this->_remote_file) . '.cache'; $this->_cache_type = 'normal'; } else { @@ -1023,11 +1023,11 @@ class fase4_rdf { if ( (!file_exists($_cache_f)) || (filemtime($_cache_f) < $this->_refresh) || (filesize($_cache_f) == 0)) { // We have to parse the remote file - $this->_use_cached_file = false; + $this->_use_cached_file = FALSE; // --> we want to provide proper Information for Use in // get_cache_update_time() clearstatcache(); - if($this->_use_dynamic_display == true) { + if($this->_use_dynamic_display == TRUE) { $_rdf = implode(' ', $this->_rdf_data()); // -> proxy if(!$_rdf) { $this->_throw_exception( $this->_remote_file.' is not available' ); @@ -1046,8 +1046,8 @@ class fase4_rdf { } } else { // we can use the cached file - $this->_use_cached_file = true; - if($this->_use_dynamic_display == true) { + $this->_use_cached_file = TRUE; + if($this->_use_dynamic_display == TRUE) { $this->_parse_xRDF( implode(' ', file($_cache_f)) ); $data = $this->_output; } else { @@ -1081,16 +1081,16 @@ class fase4_rdf { if(!@is_dir($path)) { if(!@mkdir($path, 0777)) { $this->_throw_exception("failed to create directory:".$this->_cache_dir.".

Exception on Line: ".__LINE__); - return false; + return FALSE; } } } } - $this->_cache_dir_ok = true; - return true; + $this->_cache_dir_ok = TRUE; + return TRUE; } else { - $this->_cache_dir_ok = true; - return true; + $this->_cache_dir_ok = TRUE; + return TRUE; } } // END _create_cache_dir() @@ -1107,15 +1107,15 @@ class fase4_rdf { $_local = @fopen( $this->_cache_dir.$this->_cached_file, 'w' ); if(!$_local) { $this->_throw_exception( 'Cannot open '.$this->_cached_file.'

Exception at Line: '.__LINE__ ); - return false; + return FALSE; } - if (fwrite( $_local, $content) === false) { + if (fwrite( $_local, $content) === FALSE) { $this->_throw_exception( 'Cannot write to '.$this->_cached_file.'
Exeception at Line: '.__LINE__); - return false; + return FALSE; } fclose( $_local ); @chmod( $this->_cache_dir.$this->_cached_file, 0666); - return true; + return TRUE; } // END _update_cache() /** @@ -1177,12 +1177,12 @@ class fase4_rdf { if (is_file($dir->path.$file) && substr($file, -6, 6) != '.cache' && substr($file, -4, 4) != '.log') { if(!@unlink($dir->path.$file)) { $this->_throw_exception("Unable to unlink ".$dir->path.$file."
\n
\nException at Line: ".__LINE__ ); - return false; + return FALSE; } // END - if } // END - if } // END - while $dir->close(); - return true; + return TRUE; } // END clear_cache() /** @@ -1235,7 +1235,7 @@ class fase4_rdf { */ function set_proxy($phost, $pport) { - $this->_use_proxy = true; + $this->_use_proxy = TRUE; if ($phost != '') $this->_phost = $phost; @@ -1254,7 +1254,7 @@ class fase4_rdf { */ function set_proxy_auth( $pname, $ppasswd ) { - $this->_use_proxy_auth = true; + $this->_use_proxy_auth = TRUE; if ($pname != '') $this->_pname = $pname; @@ -1277,7 +1277,7 @@ class fase4_rdf { */ function _rdf_data() { - if ( $this->_use_proxy == true ) + if ( $this->_use_proxy == TRUE ) { // we need a raw socket here to connect to proxy $fp = fsockopen($this->_phost,$this->_pport); @@ -1285,7 +1285,7 @@ class fase4_rdf { if (!$fp) { $this->_throw_exception( $this->_remote_file.' is not available with proxy' ); } else { - if ( $this->_use_proxy_auth == true ) { + if ( $this->_use_proxy_auth == TRUE ) { fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n"); } else { fputs($fp, "GET ".$this->_remote_file." HTTP/1.0\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\nProxy-Authorization: Basic ".base64_encode("$this->_pname:$this->_ppasswd") ."\r\n\r\n"); @@ -1365,7 +1365,7 @@ class fase4_rdf { $request = sprintf("GET %s HTTP/1.0\r\nHost: %s\r\nUser-Agent: Fase4 RDF-Reader/1.40 modified by Quix0r\r\n\r\n", $get, $host); // Send request out fputs($fp, $request); - $reply = ''; $isContent = false; $dummy = ''; + $reply = ''; $isContent = FALSE; $dummy = ''; // Read reply $i=0; while ( !feof($fp) ) { @@ -1373,7 +1373,7 @@ class fase4_rdf { if (substr($read, 0, 5) == ''.print_r($values[$idx], true).''); + reportBug(__FUNCTION__, __LINE__, 'values[' . $idx . '] should not be an array! Content=
'.print_r($values[$idx], TRUE).'
'); } elseif ($values[$idx] == 'UNIX_TIMESTAMP()') { // Function UNIX_TIMESTAMP() detected $SQL .= sprintf("`%s`=UNIX_TIMESTAMP(),", $entry); diff --git a/inc/daily/daily_holiday.php b/inc/daily/daily_holiday.php index b906bd0955..2f8ffb2963 100644 --- a/inc/daily/daily_holiday.php +++ b/inc/daily/daily_holiday.php @@ -107,7 +107,7 @@ SET WHERE `userid`=%s LIMIT 1", - array(bigintval($content['userid'])), __FILE__, __LINE__, false)); + array(bigintval($content['userid'])), __FILE__, __LINE__, FALSE)); } // END - if // Free memory diff --git a/inc/daily/daily_user.php b/inc/daily/daily_user.php index f475f80530..fa5e28e189 100644 --- a/inc/daily/daily_user.php +++ b/inc/daily/daily_user.php @@ -133,7 +133,7 @@ LIMIT 1", $columnName, bigintval($content['userid']), $content['ref_depth'] - ), __FILE__, __LINE__, false) + ), __FILE__, __LINE__, FALSE) ); } else { // Level zero @@ -152,7 +152,7 @@ LIMIT 1", $content['locked_' . $columnName], $columnName, bigintval($content['userid']) - ), __FILE__, __LINE__, false) + ), __FILE__, __LINE__, FALSE) ); } diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 660bcb2524..d5586ba552 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -41,7 +41,7 @@ if (!defined('__SECURITY')) { } // END - if // SQL queries -function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { +function SQL_QUERY ($sqlString, $F, $L, $enableCodes = TRUE) { // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$sqlString])) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called: ' . $sqlString); @@ -85,7 +85,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { } // Starting time - $querytimeBefore = microtime(true); + $querytimeBefore = microtime(TRUE); // Run SQL command //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . basename($F) . ',L=' . $L . ',sql=' . $GLOBALS['last_sql']); @@ -94,7 +94,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { //* DEBUG: */ logDebugMessage($F, $L, 'sql=' . $GLOBALS['last_sql'] . ',affected=' . SQL_AFFECTEDROWS() . ',numRows='.(is_resource($result) ? SQL_NUMROWS($result) : gettype($result))); // Calculate query time - $queryTime = microtime(true) - $querytimeBefore; + $queryTime = microtime(TRUE) - $querytimeBefore; // Add this query to array including timing addSqlToDebug($result, $GLOBALS['last_sql'], $queryTime, $F, $L); @@ -114,7 +114,7 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { if (!isset($GLOBALS['sql_first_entry'])) { // Write first entry appendLineToFile(getCachePath() . 'mysql.log', 'Module=' . getModule()); - $GLOBALS['sql_first_entry'] = true; + $GLOBALS['sql_first_entry'] = TRUE; } // END - if // Append debug line @@ -131,10 +131,10 @@ function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { // SQL num rows function SQL_NUMROWS ($resource) { // Valid link resource? - if (!SQL_IS_LINK_UP()) return false; + if (!SQL_IS_LINK_UP()) return FALSE; // Link is not up, no rows by default - $lines = false; + $lines = FALSE; // Is the result a valid resource? if (isset($GLOBALS['sql_numrows'][intval($resource)])) { @@ -158,7 +158,7 @@ function SQL_NUMROWS ($resource) { // SQL affected rows function SQL_AFFECTEDROWS() { // Valid link resource? - if (!SQL_IS_LINK_UP()) return false; + if (!SQL_IS_LINK_UP()) return FALSE; // Get affected rows $lines = mysql_affected_rows(SQL_GET_LINK()); @@ -170,7 +170,7 @@ function SQL_AFFECTEDROWS() { // SQL fetch row function SQL_FETCHROW ($resource) { // Is a result resource set? - if ((!is_resource($resource)) || (!SQL_IS_LINK_UP())) return false; + if ((!is_resource($resource)) || (!SQL_IS_LINK_UP())) return FALSE; // Fetch the data and return it return mysql_fetch_row($resource); @@ -179,7 +179,7 @@ function SQL_FETCHROW ($resource) { // SQL fetch array function SQL_FETCHARRAY ($resource) { // Is a result resource set? - if ((!is_resource($resource)) || (!SQL_IS_LINK_UP())) return false; + if ((!is_resource($resource)) || (!SQL_IS_LINK_UP())) return FALSE; // Load row from database $row = mysql_fetch_assoc($resource); @@ -190,14 +190,14 @@ function SQL_FETCHARRAY ($resource) { return $row; } else { // Return a false, else some loops would go endless... - return false; + return FALSE; } } // SQL result function SQL_RESULT ($resource, $row, $field = '0') { // Is $resource valid? - if ((!is_resource($resource)) || (!SQL_IS_LINK_UP())) return false; + if ((!is_resource($resource)) || (!SQL_IS_LINK_UP())) return FALSE; // Run the result command $result = mysql_result($resource, $row, $field); @@ -229,7 +229,7 @@ function SQL_CONNECT ($host, $login, $password, $F, $L) { // SQL select database function SQL_SELECT_DB ($dbName, $F, $L) { // Is there still a valid link? If not, skip it. - if (!SQL_IS_LINK_UP()) return false; + if (!SQL_IS_LINK_UP()) return FALSE; // Return the result return mysql_select_db($dbName, SQL_GET_LINK()) or SQL_ERROR($F, $L, mysql_error()); @@ -239,7 +239,7 @@ function SQL_SELECT_DB ($dbName, $F, $L) { function SQL_CLOSE ($F, $L) { if (!SQL_IS_LINK_UP()) { // Skip double close - return false; + return FALSE; } // END - if // Close database link and forget the link @@ -256,7 +256,7 @@ function SQL_CLOSE ($F, $L) { function SQL_FREERESULT ($resource) { if ((!is_resource($resource)) || (!SQL_IS_LINK_UP())) { // Abort here - return false; + return FALSE; } // END - if // Free result @@ -267,12 +267,12 @@ function SQL_FREERESULT ($resource) { } // SQL string escaping -function SQL_QUERY_ESC ($sqlString, $data, $F, $L, $run = true, $strip = true, $secure = true) { +function SQL_QUERY_ESC ($sqlString, $data, $F, $L, $run = TRUE, $strip = TRUE, $secure = TRUE) { // Link is there? if ((!SQL_IS_LINK_UP()) || (!is_array($data))) { // Link is down or data is not an array /* DEBUG: */ logDebugMessage($F, $L, 'SQL_IS_LINK_UP()=' . intval(SQL_IS_LINK_UP()) . ',data[]=' . gettype($data) . ',sqlString=' . $sqlString . ': ABORTING!'); - return false; + return FALSE; } // END - if // Init array for escaped data with SQL string @@ -288,7 +288,7 @@ function SQL_QUERY_ESC ($sqlString, $data, $F, $L, $run = true, $strip = true, $ // Generate query $query = call_user_func_array('sprintf', $dataSecured); - if ($run === true) { + if ($run === TRUE) { // Run SQL query (default) return SQL_QUERY($query, $F, $L); } else { @@ -299,19 +299,19 @@ function SQL_QUERY_ESC ($sqlString, $data, $F, $L, $run = true, $strip = true, $ // Get id from last INSERT command function SQL_INSERTID () { - if (!SQL_IS_LINK_UP()) return false; + if (!SQL_IS_LINK_UP()) return FALSE; return mysql_insert_id(); } // Escape a string for the database -function SQL_ESCAPE ($str, $secureString = true, $strip = true) { +function SQL_ESCAPE ($str, $secureString = TRUE, $strip = TRUE) { // Is there cache? if (!isset($GLOBALS['sql_escapes']['' . $str . ''])) { // Prepare the string here $str = SQL_PREPARE_SQL_STRING($str); // Secure string first? (which is the default behaviour!) - if ($secureString === true) { + if ($secureString === TRUE) { // Then do it here $str = secureString($str, $strip); } // END - if @@ -350,7 +350,7 @@ function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) { )); // Abort here with 'false' - return false; + return FALSE; } // END - if // Is this is a simple array? @@ -379,12 +379,12 @@ function SQL_RESULT_FROM_ARRAY ($table, $columns, $idRow, $id, $F, $L) { } // ALTER TABLE wrapper function -function SQL_ALTER_TABLE ($sql, $F, $L, $enableCodes = true) { +function SQL_ALTER_TABLE ($sql, $F, $L, $enableCodes = TRUE) { // Abort if link is down - if (!SQL_IS_LINK_UP()) return false; + if (!SQL_IS_LINK_UP()) return FALSE; // This is the default result... - $result = false; + $result = FALSE; // Determine index/fulltext/unique word $isAlterIndex = ( @@ -404,10 +404,10 @@ function SQL_ALTER_TABLE ($sql, $F, $L, $enableCodes = true) { $tableName = str_replace('`', '', $tableArray[2]); // Debug log - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sql=' . $sql . ',tableName=' . $tableName . ',tableArray=
' . print_r($tableArray, true) . '
,isAlterIndex=' . intval($isAlterIndex)); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'sql=' . $sql . ',tableName=' . $tableName . ',tableArray=
' . print_r($tableArray, TRUE) . '
,isAlterIndex=' . intval($isAlterIndex)); // Shall we add/drop? - if (((isInString('ADD', $sql)) || (isInString('DROP', $sql)) || (isInString('CHANGE', $sql))) && ($isAlterIndex === false)) { + if (((isInString('ADD', $sql)) || (isInString('DROP', $sql)) || (isInString('CHANGE', $sql))) && ($isAlterIndex === FALSE)) { // Try two columns, one should fix foreach (array(4,5) as $idx) { // If an entry is not set, abort here @@ -427,7 +427,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L, $enableCodes = true) { if (((!ifSqlColumnExists($tableName, $columnName)) && (isInString('ADD', $sql))) || ((ifSqlColumnExists($tableName, $columnName)) && ((isInString('DROP', $sql)) || ((isInString('CHANGE', $sql)) && ($idx == 4) && ((!ifSqlColumnExists($tableName, $tableArray[5])) || ($columnName == $tableArray[5])))))) { // Do the query //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Executing: ' . $sql); - $result = SQL_QUERY($sql, $F, $L, false); + $result = SQL_QUERY($sql, $F, $L, FALSE); // Skip further attempt(s) break; @@ -447,10 +447,10 @@ function SQL_ALTER_TABLE ($sql, $F, $L, $enableCodes = true) { } elseif ((getTableType() == 'InnoDB') && (isInString('FULLTEXT', $sql))) { // Skip this query silently because InnoDB does not understand fulltext indexes //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Skipped FULLTEXT: sql=%s,tableName=%s,hasZeroNums=%d,file=%s,line=%s", $sql, $tableName, intval((is_bool($result)) ? 0 : ifSqlColumnExists($columnName)), $F, $L)); - } elseif ($isAlterIndex === true) { + } elseif ($isAlterIndex === TRUE) { // And column name as well without backticks $keyName = str_replace('`', '', $tableArray[5]); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'keyName=' . $keyName . ',tableArray=
' . print_r($tableArray, true) . '
'); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'keyName=' . $keyName . ',tableArray=
' . print_r($tableArray, TRUE) . '
'); // Is this "UNIQUE" or so? FULLTEXT has been handled the elseif() block above if (in_array(strtoupper($tableArray[4]), array('INDEX', 'UNIQUE', 'KEY', 'FULLTEXT'))) { @@ -554,14 +554,14 @@ function SQL_HASZEROAFFECTED () { } // Private function to prepare the SQL query string -function SQL_PREPARE_SQL_STRING ($sqlString, $enableCodes = true) { +function SQL_PREPARE_SQL_STRING ($sqlString, $enableCodes = TRUE) { // Is it already cached? if (!isset($GLOBALS['sql_strings'][$sqlString])) { // Compile URI codes+config+expression code $sqlString2 = FILTER_COMPILE_EXPRESSION_CODE(FILTER_COMPILE_CONFIG(compileUriCode($sqlString))); // Do final compilation - $GLOBALS['sql_strings'][$sqlString] = doFinalCompilation($sqlString2, false, $enableCodes); + $GLOBALS['sql_strings'][$sqlString] = doFinalCompilation($sqlString2, FALSE, $enableCodes); } // END - if // Return it @@ -647,12 +647,12 @@ function isSqlTableIndexFound ($tableName, $keyName) { $result = SQL_QUERY_ESC("SHOW INDEX FROM `%s`", array($tableName), __FUNCTION__, __LINE__); // The column is not found by default - $GLOBALS[__FUNCTION__][$tableName][$keyName] = false; + $GLOBALS[__FUNCTION__][$tableName][$keyName] = FALSE; // Walk through all while ($content = SQL_FETCHARRAY($result)) { // Add all entries for better caching behavior - $GLOBALS[__FUNCTION__][$tableName][$content['Key_name']] = true; + $GLOBALS[__FUNCTION__][$tableName][$content['Key_name']] = TRUE; } // END - while // Free result @@ -701,7 +701,7 @@ function getArrayFromSupportedSqlEngines ($support = 'YES') { } // END - if } else { // No engines! :( - $engines = false; + $engines = FALSE; } // Free result diff --git a/inc/email-functions.php b/inc/email-functions.php index bb4f0e55eb..d854a993ad 100644 --- a/inc/email-functions.php +++ b/inc/email-functions.php @@ -91,7 +91,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = ' '); // This is always fine - return true; + return TRUE; } elseif (!empty($toEmail)) { // Send Mail away return sendRawEmail($toEmail, $subject, $message, $mailHeader); @@ -116,12 +116,12 @@ function isPhpMailerConfigured () { // Send out a raw email with PHPMailer class or plain mail() command function sendRawEmail ($toEmail, $subject, $message, $headers) { // Just compile all to put out all configs, etc. - $eval = '$toEmail = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($toEmail), false)) . '"); '; - $eval .= '$subject = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($subject), false)) . '"); '; - $eval .= '$headers = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($headers), false)) . '"); '; + $eval = '$toEmail = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($toEmail), FALSE)) . '"); '; + $eval .= '$subject = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($subject), FALSE)) . '"); '; + $eval .= '$headers = decodeEntities("' . escapeQuotes(doFinalCompilation(compileRawCode($headers), FALSE)) . '"); '; // Do not decode entities in the message because we also send HTML mails through this function - $eval .= '$message = "' . escapeQuotes(doFinalCompilation(compileRawCode($message), false)) . '";'; + $eval .= '$message = "' . escapeQuotes(doFinalCompilation(compileRawCode($message), FALSE)) . '";'; // Run the final eval() command eval($eval); @@ -142,7 +142,7 @@ function sendRawEmail ($toEmail, $subject, $message, $headers) { $mail->PluginDir = sprintf("%sinc/phpmailer/", getPath()); $mail->IsSMTP(); - $mail->SMTPAuth = true; + $mail->SMTPAuth = TRUE; $mail->Host = getConfig('SMTP_HOSTNAME'); $mail->Port = 25; $mail->Username = getConfig('SMTP_USER'); @@ -158,7 +158,7 @@ function sendRawEmail ($toEmail, $subject, $message, $headers) { $mail->Body = $message; $mail->AltBody = decodeEntities($message); $mail->WordWrap = 70; - $mail->IsHTML(true); + $mail->IsHTML(TRUE); } else { $mail->Body = decodeEntities(strip_tags($message)); } @@ -176,10 +176,10 @@ function sendRawEmail ($toEmail, $subject, $message, $headers) { logDebugMessage(__FUNCTION__, __LINE__, 'Error while sending mail: ' . $mail->ErrorInfo); // Raise an error - return false; + return FALSE; } else { // All fine! - return true; + return TRUE; } } else { // Use plain mail() command diff --git a/inc/expression-functions.php b/inc/expression-functions.php index c8f1bfdf76..4e7c7f264a 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -71,15 +71,15 @@ function isExpressionFunctionAvaiable ($data) { if (function_exists($functionName)) { // Cache it all $GLOBALS['expression_function_name'][$entry] = $functionName; - $GLOBALS['expression_function_available'][$entry] = true; + $GLOBALS['expression_function_available'][$entry] = TRUE; } else { // Not avaiable logDebugMessage(__FUNCTION__, __LINE__, 'Expression function ' . $functionName . ' not found. Please consider adding it to improve execution speed.'); // And cache it - $GLOBALS['expression_function_available'][$entry] = false; + $GLOBALS['expression_function_available'][$entry] = FALSE; } - } elseif ($GLOBALS['expression_function_available'][$entry] == false) { + } elseif ($GLOBALS['expression_function_available'][$entry] == FALSE) { // Debug message logDebugMessage(__FUNCTION__, __LINE__, 'Expression function for entry ' . $entry . ' requested but does not exist.'); } @@ -153,7 +153,7 @@ function doExpressionExt ($data) { $functionName = 'getExtension' . capitalizeUnderscoreString($data['callback']); // Construct call of the function - $replacer = "{DQUOTE} . call_user_func_array('" . $functionName . "', array('" . $data['matches'][4][$data['key']] . "', true)) . {DQUOTE}"; + $replacer = "{DQUOTE} . call_user_func_array('" . $functionName . "', array('" . $data['matches'][4][$data['key']] . "', TRUE)) . {DQUOTE}"; } // END - if // Generate replacer @@ -195,7 +195,7 @@ function doExpressionPipe ($data) { // Is there a call-back? Should always be there! if (!empty($data['callback'])) { - //* DEBUG: */ if ($data['callback'] == 'getMemberId') die('
'.encodeEntities(print_r($data, true)).'
'); + //* DEBUG: */ if ($data['callback'] == 'getMemberId') die('
'.encodeEntities(print_r($data, TRUE)).'
'); // If the value is empty, we don't add it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'value[' . gettype($data['value']) . ']=' . $data['value']); if ((empty($data['value'])) && ($data['value'] != '0')) { @@ -241,7 +241,7 @@ function doExpressionValidatorLinks ($data) { // Should we generally include validator links? if ((isExtensionInstalled('validator')) && (getConfig('enable_validator') == 'Y') && (!in_array(getModule(), array('admin', 'login')))) { // Load the validator template - $replacer = escapeQuotes(loadTemplate('validator_links', true)); + $replacer = escapeQuotes(loadTemplate('validator_links', TRUE)); } // END - if // Replace the code @@ -257,7 +257,7 @@ function doExpressionMessage ($data) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'callback=' . $data['callback'] . ',extra_func=' . $data['extra_func'] . ',value=' . $data['value']); // Message string replacement depends on if message is masked - if ((isMessageMasked($data['callback'], false)) && ((!empty($data['extra_func'])) || ($data['extra_func'] == '0'))) { + if ((isMessageMasked($data['callback'], FALSE)) && ((!empty($data['extra_func'])) || ($data['extra_func'] == '0'))) { // Message should be masked $replacer = "{DQUOTE} . getMaskedMessage('" . $data['callback'] . "', '" . $data['extra_func'] . "') . {DQUOTE}"; } elseif (!empty($data['value'])) { @@ -296,7 +296,7 @@ function doExpressionTemplate ($data) { } else { // Do the replacement //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'template='.$GLOBALS['current_template']); - $replacer = '{DQUOTE} . ' . $callbackFunction . '(' . chr(39) . $GLOBALS['current_template'] . chr(39) . ', true'; + $replacer = '{DQUOTE} . ' . $callbackFunction . '(' . chr(39) . $GLOBALS['current_template'] . chr(39) . ', TRUE'; // Is 'value' set? if (!empty($data['value'])) { diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index ca7717c091..ae3cf47a90 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -41,17 +41,17 @@ if (!defined('__SECURITY')) { } // END - if // Load the extension and maybe found language and function files. -function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $isDryRun = false, $previousExtension = NULL) { +function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $isDryRun = FALSE, $previousExtension = NULL) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_mode=' . $ext_mode . ',ext_ver=' . $ext_ver . ',isDryRun=' . intval($isDryRun) . ' - ENTERED!'); // Loading an extension in same mode, but not test/update, twice is not // good, so is the extension $ext_name already loaded in mode $ext_mode? if ((isset($GLOBALS['loaded_extension'][$ext_name][$ext_mode])) && (!in_array($ext_mode, array('update', 'test')))) { // If this happens twice, we need the bug report from you, except for updates/tests - reportBug(__FUNCTION__, __LINE__, __FUNCTION__ . '() is called twice: ext_name=' . $ext_name . ', ext_mode='. $ext_mode . ',ext_sqls=' . print_r(getExtensionSqls(), true) . ', ext_register_running=' . print_r($GLOBALS['ext_register_running'], true) . ', ext_running_updates=' . print_r($GLOBALS['ext_running_updates'], true)); + reportBug(__FUNCTION__, __LINE__, __FUNCTION__ . '() is called twice: ext_name=' . $ext_name . ', ext_mode='. $ext_mode . ',ext_sqls=' . print_r(getExtensionSqls(), TRUE) . ', ext_register_running=' . print_r($GLOBALS['ext_register_running'], TRUE) . ', ext_running_updates=' . print_r($GLOBALS['ext_running_updates'], TRUE)); } // END - if // Make sure this situation can only happen once - $GLOBALS['loaded_extension'][$ext_name][$ext_mode] = true; + $GLOBALS['loaded_extension'][$ext_name][$ext_mode] = TRUE; // Remember previous extension here $GLOBALS['previous_extension'][$ext_name] = $previousExtension; @@ -107,7 +107,7 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $isDryRun = fa logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension %s already loaded.", $ext_name)); // Abort here - return false; + return FALSE; } // END - if // Is the extension file NOT there? @@ -116,7 +116,7 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $isDryRun = fa logDebugMessage(__FUNCTION__, __LINE__, sprintf("Extension %s not found or not readable or the PHP script is deprecated.", $ext_name)); // Abort here - return false; + return FALSE; } // END - if // Load extension's own language file if not in test mode @@ -165,7 +165,7 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $isDryRun = fa // Abort here //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Extension load aborted, ext_name=' . $ext_name . ' - Extension is deprecated.'); - return false; + return FALSE; } // END - if // Mark it as loaded in normal mode @@ -176,11 +176,11 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $isDryRun = fa // All fine! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Extension successfully loaded, ext_name=' . $ext_name); - return true; + return TRUE; } // Registers an extension and possible update dependencies -function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdates = false, $previousExtension = NULL) { +function registerExtension ($ext_name, $taskId, $isDryRun = FALSE, $ignoreUpdates = FALSE, $previousExtension = NULL) { // Set current extension name //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId=' . intval($taskId) . ',isDryRun=' . intval($isDryRun) . ',ignoreUpdates=' . intval($ignoreUpdates) . ' - ENTERED!'); setCurrentExtensionName($ext_name); @@ -195,15 +195,15 @@ function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdate if (((!isAdmin()) && (!isInstallationPhase())) || (isExtensionInstalled($ext_name))) { // Abort here with 'false' //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - ABORTED: isAdmin()=' . intval(isAdmin()) . ',isInstallationPhase()=' . intval(isInstallationPhase()) . ',isExtensionInstalled()=' . intval(isExtensionInstalled($ext_name))); - return false; + return FALSE; } // END - if // When this extension is already in registration/update phase, all is fine - if ((isExtensionRegistrationRunning($ext_name)) || ((isExtensionUpdateRunning($ext_name)) && ($ignoreUpdates === false))) { + if ((isExtensionRegistrationRunning($ext_name)) || ((isExtensionUpdateRunning($ext_name)) && ($ignoreUpdates === FALSE))) { // Then abort here with 'true' becaus it is fine //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in registration/update phase, all fine,taskId=' . $taskId . ',isDryRun=' . intval($isDryRun) . ',ignoreUpdates=' . intval($ignoreUpdates)); //* BUG: */ reportBug(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId=' . $taskId . ',isDryRun=' . intval($isDryRun) . ',ignoreUpdates=' . intval($ignoreUpdates) . ' - Please investigate!'); - return true; + return TRUE; } // END - if // This registration is running @@ -241,8 +241,8 @@ function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdate initExtensionNotes(); // Init variables - $ret = false; - $processResult = false; + $ret = FALSE; + $processResult = FALSE; initIncludePool('extension'); // By default we have no failures @@ -298,7 +298,7 @@ function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdate if (($updateTaskId > 0) || (isInstallationPhase())) { // Try to register the extension //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',ext_update=' . $ext_update . ',updateTaskId=' . $updateTaskId . ',isExtensionDryRun()=' . intval(isExtensionDryRun())); - $processResult = registerExtension($ext_update, $updateTaskId, isExtensionDryRun(), true, $ext_name); + $processResult = registerExtension($ext_update, $updateTaskId, isExtensionDryRun(), TRUE, $ext_name); // Reset extension name setCurrentExtensionName($ext_name); @@ -317,14 +317,14 @@ function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdate //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',currVer=' . getCurrentExtensionVersion()); // All okay! - $processResult = true; + $processResult = TRUE; } else { // Nothing to register / update before... - $processResult = true; + $processResult = TRUE; } } else { // Required file for update does not exists! - $processResult = true; + $processResult = TRUE; // But this is fine for the first time... } @@ -336,7 +336,7 @@ function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdate if (countExtensionUpdateDependencies(getCurrentExtensionName()) == 0) { // Then test is passed! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',processResult=true,countExtensionUpdateDependencies()=0 - Test passed!'); - $processResult = true; + $processResult = TRUE; } // END - if // Switch back to register mode @@ -344,20 +344,20 @@ function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdate // Remains true if extension registration reports no failures //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',processResult=' . intval($processResult)); - $processResult = (($processResult === true) && (isExtensionReportingFailure() === false)); + $processResult = (($processResult === TRUE) && (isExtensionReportingFailure() === FALSE)); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currName=' . getCurrentExtensionName() . ',processResult=' . intval($processResult)); // Does everthing before wents ok? - if ($processResult === true) { + if ($processResult === TRUE) { // "Dry-run-mode" activated? - if ((isExtensionDryRun() === false) && (!isExtensionOnRemovalList())) { + if ((isExtensionDryRun() === FALSE) && (!isExtensionOnRemovalList())) { // Init SQLs and transfer ext->generic //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . getCurrentExtensionName()); initSqls(); setSqlsArray(getExtensionSqls()); // Run installation pre-installation filters - runFilterChain('pre_extension_installed', array('dry_run' => isExtensionDryRun(), 'enable_codes' => false)); + runFilterChain('pre_extension_installed', array('dry_run' => isExtensionDryRun(), 'enable_codes' => FALSE)); // Register extension //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'insert=' . getCurrentExtensionName() . '/' . getCurrentExtensionVersion() . ' - INSERT!'); @@ -387,7 +387,7 @@ function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdate $GLOBALS['cache_array']['extension']['ext_name'][SQL_INSERTID()] = getCurrentExtensionName(); // Mark it as installed - $GLOBALS['ext_is_installed'][getCurrentExtensionName()] = true; + $GLOBALS['ext_is_installed'][getCurrentExtensionName()] = TRUE; // Remove cache file(s) if extension is active runFilterChain('post_extension_installed', array( @@ -397,22 +397,22 @@ function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdate )); // Re-init queries and notes - initExtensionSqls(true); - initExtensionNotes(true); + initExtensionSqls(TRUE); + initExtensionNotes(TRUE); // In normal mode return a true on success - $ret = true; - } elseif (isExtensionDryRun() === true) { + $ret = TRUE; + } elseif (isExtensionDryRun() === TRUE) { // In "dry-run" mode do always return a true - $ret = true; + $ret = TRUE; } else { // Extension has been removed for updates, so all is fine! - $ret = true; + $ret = TRUE; } } else { // No, an error occurs while registering extension :-( //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName()); - $ret = false; + $ret = FALSE; } } elseif (($taskId > 0) && (getCurrentExtensionName() != '')) { // Remove task from system when id and extension's name is valid @@ -422,7 +422,7 @@ function registerExtension ($ext_name, $taskId, $isDryRun = false, $ignoreUpdate } // @TODO This redirect is still needed to register sql_patches! Please try to avoid it - if (($ret === true) && ($isDryRun === false) && ($ext_name == 'sql_patches') && (!isInstallationPhase())) { + if (($ret === TRUE) && ($isDryRun === FALSE) && ($ext_name == 'sql_patches') && (!isInstallationPhase())) { /* * This is a really dirty hack to prevent an error about a missing * configuration entry which should be there after registration of @@ -442,7 +442,7 @@ function doExtensionSqls ($ext_id, $load_mode) { // This shall never do a non-admin user but installation phase is okay if ((!isAdmin()) && (!isInstallationPhase())) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_id=' . $ext_id. ',load_mode=' . $load_mode . ',isAdmin()=' . intval(isAdmin()) . ',isInstallationPhase()=' . intval(isInstallationPhase()) . ' - ABORT!'); - return false; + return FALSE; } // END - if // Get extension's name @@ -458,14 +458,14 @@ function doExtensionSqls ($ext_id, $load_mode) { } // END - if // Init array - initExtensionSqls(true); + initExtensionSqls(TRUE); // By default no SQL has been executed - $sqlRan = false; + $sqlRan = FALSE; // Load extension in detected mode //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name[' . $ext_id . ']=' . getCurrentExtensionName() . ',load_mode=' . $load_mode); - loadExtension(getCurrentExtensionName(), $load_mode, '0.0.0', false); + loadExtension(getCurrentExtensionName(), $load_mode, '0.0.0', FALSE); // Init these SQLs initSqls(); @@ -484,7 +484,7 @@ function doExtensionSqls ($ext_id, $load_mode) { runFilterChain('extension_' . $load_mode); // Remove cache file(s) if extension is active - if (((isExtensionActive('cache')) && ((!SQL_HASZEROAFFECTED()) || ($sqlRan === true) || ($load_mode == 'activate') || ($load_mode == 'deactivate')))) { + if (((isExtensionActive('cache')) && ((!SQL_HASZEROAFFECTED()) || ($sqlRan === TRUE) || ($load_mode == 'activate') || ($load_mode == 'deactivate')))) { // Run filters runFilterChain('post_extension_run_sql', getCurrentExtensionName()); } // END - if @@ -508,7 +508,7 @@ function isExtensionInstalled ($ext_name) { } // END - if // By default non is installed - $isInstalled = false; + $isInstalled = FALSE; // Check if there is a cache entry if (isset($GLOBALS['ext_is_installed'][$ext_name])) { @@ -518,7 +518,7 @@ function isExtensionInstalled ($ext_name) { } elseif (isset($GLOBALS['cache_array']['extension']['ext_id'][$ext_name])) { // Found! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - FOUND!'); - $isInstalled = true; + $isInstalled = TRUE; // Count cache hits incrementStatsEntry('cache_hits'); @@ -536,9 +536,9 @@ function isExtensionInstalled ($ext_name) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_id=' . $ext_id . ',isInstalled=' . intval($isInstalled)); // Is it installed, then cache the entry - if ($isInstalled === true) { + if ($isInstalled === TRUE) { // Dummy call (get is okay here) - getExtensionId($ext_name, true); + getExtensionId($ext_name, TRUE); } // END - if // Remember the status @@ -555,14 +555,14 @@ function isExtensionActive ($ext_name) { if (isInstallationPhase()) { // Extensions are all inactive during installation //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Extensions are always inactive while installation phase. ext_name=' . $ext_name); - return false; + return FALSE; } elseif (empty($ext_name)) { // Empty extension names must befixed reportBug(__FUNCTION__, __LINE__, 'Empty extension name provided.'); } elseif (!isExtensionInstalled($ext_name)) { // Not installed extensions are always inactive //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Not installed extensions are always inactive. ext_name=' . $ext_name); - return false; + return FALSE; } // Not active is the default @@ -611,7 +611,7 @@ function isExtensionActive ($ext_name) { } // Get version from extensions -function getExtensionVersion ($ext_name, $force = false) { +function getExtensionVersion ($ext_name, $force = FALSE) { // By default no extension is found //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - ENTERED!'); $data['ext_version'] = 'false'; @@ -660,7 +660,7 @@ function getExtensionVersion ($ext_name, $force = false) { } // Extension version should not be invalid - if (($data['ext_version'] == 'false') && ($force === false)) { + if (($data['ext_version'] == 'false') && ($force === FALSE)) { // Please report this trouble reportBug(__FUNCTION__, __LINE__, sprintf("Extension %s has empty version!", $ext_name)); } // END - if @@ -671,7 +671,7 @@ function getExtensionVersion ($ext_name, $force = false) { } // Updates a given extension with current extension version to latest version -function updateExtension ($ext_name, $ext_ver, $isDryRun = false, $ignoreDependencies = false) { +function updateExtension ($ext_name, $ext_ver, $isDryRun = FALSE, $ignoreDependencies = FALSE) { // Only admins are allowed to update extensions //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_ver=' . $ext_ver . ',isDryRun=' . intval($isDryRun) . ',ignoreDependencies=' . intval($ignoreDependencies) . ' - ENTERED!'); if ((!isAdmin()) || (empty($ext_name))) { @@ -683,11 +683,11 @@ function updateExtension ($ext_name, $ext_ver, $isDryRun = false, $ignoreDepende setCurrentExtensionName($ext_name); // Is this extension update already running? - if ((isExtensionUpdateRunning($ext_name, $ignoreDependencies)) && ($isDryRun === false)) { + if ((isExtensionUpdateRunning($ext_name, $ignoreDependencies)) && ($isDryRun === FALSE)) { // This is fine but needs logging ATM //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in update phase, all fine.'); //* BUG: */ reportBug(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - already in update phase, please investigate!'); - return true; + return TRUE; } // END - if // Init arrays @@ -734,12 +734,12 @@ function updateExtension ($ext_name, $ext_ver, $isDryRun = false, $ignoreDepende setCurrentExtensionName($ext_depend); // Mark it as already updated before we update it - $GLOBALS['ext_updated'][$ext_depend] = true; + $GLOBALS['ext_updated'][$ext_depend] = TRUE; // Is the extension there? if (isExtensionInstalled($ext_depend)) { // Update another extension first! - $processResult = updateExtension($ext_depend, getExtensionVersion($ext_depend), isExtensionDryRun(), true); + $processResult = updateExtension($ext_depend, getExtensionVersion($ext_depend), isExtensionDryRun(), TRUE); } else { // Register new extension $processResult = registerExtension($ext_depend, NULL, isExtensionDryRun()); @@ -759,7 +759,7 @@ function updateExtension ($ext_name, $ext_ver, $isDryRun = false, $ignoreDepende } // END - for // In real-mode execute any existing includes - if (isExtensionDryRun() === false) { + if (isExtensionDryRun() === FALSE) { $GLOBALS['ext_inc_pool'][getCurrentExtensionName()] = getIncludePool('extension'); runFilterChain('load_includes', 'extension'); setIncludePool('extension', $GLOBALS['ext_inc_pool'][getCurrentExtensionName()]); @@ -771,9 +771,9 @@ function updateExtension ($ext_name, $ext_ver, $isDryRun = false, $ignoreDepende setSqlsArray(getExtensionSqls()); // Run SQLs - runFilterChain('run_sqls', array('dry_run' => isExtensionDryRun(), 'enable_codes' => false)); + runFilterChain('run_sqls', array('dry_run' => isExtensionDryRun(), 'enable_codes' => FALSE)); - if (isExtensionDryRun() === false) { + if (isExtensionDryRun() === FALSE) { // Run filters on success extension update runFilterChain('extension_update', getCurrentExtensionName()); } // END - if @@ -815,7 +815,7 @@ function addExtensionVerboseSqlTable ($title = '{--ADMIN_SQLS_EXECUTED_ON_REMOVA ); // Load row template - $OUT .= loadTemplate('admin_extension_sql_row', true, $content); + $OUT .= loadTemplate('admin_extension_sql_row', TRUE, $content); // Count up $idx++; @@ -830,10 +830,10 @@ function addExtensionVerboseSqlTable ($title = '{--ADMIN_SQLS_EXECUTED_ON_REMOVA ); // Load main template - $OUT = loadTemplate('admin_extension_sql_table', true, $content); + $OUT = loadTemplate('admin_extension_sql_table', TRUE, $content); } else { // No addional SQL commands to run - $OUT = displayMessage('{--ADMIN_EXTENSION_VERBOSE_SQLS_404--}', true); + $OUT = displayMessage('{--ADMIN_EXTENSION_VERBOSE_SQLS_404--}', TRUE); } } // END - if @@ -930,18 +930,18 @@ function isExtensionNameValid ($ext_name) { // Determines whether the given extension id is valid function isExtensionIdValid ($ext_id) { // Default is nothing valid - $isValid = false; + $isValid = FALSE; // Check in cache then in database if (isset($GLOBALS['cache_array']['extension']['ext_name'][$ext_id])) { // Valid! - $isValid = true; + $isValid = TRUE; // Count cache hits incrementStatsEntry('cache_hits'); } else { // Query database - $isValid = (countSumTotalData($ext_id, 'extensions', 'id', 'id', true) == 1); + $isValid = (countSumTotalData($ext_id, 'extensions', 'id', 'id', TRUE) == 1); } // Return result @@ -965,7 +965,7 @@ function doActivateExtension ($ext_name) { } // Deactivate given extension -function doDeactivateExtension ($ext_name, $inRebuild = false) { +function doDeactivateExtension ($ext_name, $inRebuild = FALSE) { // Is the extension installed? if (!isExtensionInstalled($ext_name)) { // Non-installed extensions cannot be activated @@ -983,7 +983,7 @@ function doDeactivateExtension ($ext_name, $inRebuild = false) { createExtensionDeactivationTask($ext_name); // Do not rebuild cache if it is already been rebuild - if ($inRebuild === false) { + if ($inRebuild === FALSE) { // Rebuild cache rebuildCache('extension', 'extension'); } // END - if @@ -1057,14 +1057,14 @@ function createNewExtensionTask ($ext_name) { // Load text for task if found if (isFileReadable($FQFN)) { // Load extension's description template (but do not compile the code) - $message = loadTemplate('ext_' . $ext_name, true, array(), false); + $message = loadTemplate('ext_' . $ext_name, TRUE, array(), FALSE); } else { // Write this in debug.log as well logDebugMessage(__FUNCTION__, __LINE__, $message); } // Task not created so it's a brand-new extension which we need to register and create a task for! - $taskId = createNewTask($subject, $message, 'EXTENSION', 0, getCurrentAdminId(), false); + $taskId = createNewTask($subject, $message, 'EXTENSION', 0, getCurrentAdminId(), FALSE); } // END - if // Return task id @@ -1083,7 +1083,7 @@ function createExtensionDeactivationTask ($ext_name) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',taskId[' . gettype($taskId) . ']=' . $taskId); if (((is_null($taskId)) || ($taskId == '0')) && (isExtensionInstalled($ext_name))) { // Task not created so add it - $taskId = createNewTask($subject, SQL_ESCAPE(loadTemplate('task_EXTENSION_deactivated', true, $ext_name)), 'EXTENSION_DEACTIVATION'); + $taskId = createNewTask($subject, SQL_ESCAPE(loadTemplate('task_EXTENSION_deactivated', TRUE, $ext_name)), 'EXTENSION_DEACTIVATION'); } // END - if // Return task id @@ -1182,7 +1182,7 @@ function addExtensionNotes ($ext_ver) { } // Load template - $out = loadTemplate('admin_extension_notes', true, $content); + $out = loadTemplate('admin_extension_notes', TRUE, $content); } // END - if // Add the notes @@ -1353,20 +1353,20 @@ function isExtensionUpdateDependenciesInitialized () { } // Checks whether an update is already running for given extension -function isExtensionUpdateRunning ($ext_name, $ignoreDependencies = false) { +function isExtensionUpdateRunning ($ext_name, $ignoreDependencies = FALSE) { // Current and given extensions means whole array //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'currentExtension=' . getCurrentExtensionName() . ',ext_name=' . $ext_name . ',ignoreDependencies=' . intval($ignoreDependencies) . ' - ENTERED!'); if ($ext_name == getCurrentExtensionName()) { // Default is not found - $isRunning = false; + $isRunning = FALSE; // Walk through whole array foreach ($GLOBALS['ext_running_updates'] as $ext1 => $depends) { // Is it found? - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext1=' . $ext1 . ',ext_name=' . $ext_name . ',depends=' . print_r($depends, true)); - if (($ext1 == $ext_name) || ((in_array($ext_name, $depends)) && ($ignoreDependencies === false))) { + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext1=' . $ext1 . ',ext_name=' . $ext_name . ',depends=' . print_r($depends, TRUE)); + if (($ext1 == $ext_name) || ((in_array($ext_name, $depends)) && ($ignoreDependencies === FALSE))) { // Found - $isRunning = true; + $isRunning = TRUE; //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext1=' . $ext1 . ',ext_name=' . $ext_name . ',isRunning=true - FOUND!'); break; } // END - if @@ -1421,7 +1421,7 @@ function removeExtensionDependency ($ext_name) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',key[' . gettype($key) . ']=' . $key); // Is it valid? - if ($key !== false) { + if ($key !== FALSE) { // Then remove it unset($GLOBALS['ext_update_depends'][getCurrentExtensionName()][$key]); @@ -1456,7 +1456,7 @@ function incrementExtensionUpdateIterator () { } // Setter for EXT_REPORTS_FAILURE flag -function enableExtensionReportingFailure ($reportsFailure = false) { +function enableExtensionReportingFailure ($reportsFailure = FALSE) { $GLOBALS['ext_reports_failure'] = (bool) $reportsFailure; } @@ -1504,9 +1504,9 @@ function isExtensionUpdateNoteSet ($ext_ver) { } // Init extension notice -function initExtensionNotes ($force = false) { +function initExtensionNotes ($force = FALSE) { // Is it already initialized? - if (($force === false) && (isset($GLOBALS['ext_notes'][getCurrentExtensionName()]))) { + if (($force === FALSE) && (isset($GLOBALS['ext_notes'][getCurrentExtensionName()]))) { // This is mostly not wanted, so please report it reportBug(__FUNCTION__, __LINE__, 'ext_notes already set for extension ' . getCurrentExtensionName()); } // END - if @@ -1543,9 +1543,9 @@ function getCurrentExtensionName () { } // Init SQLs array for current extension -function initExtensionSqls ($force = false) { +function initExtensionSqls ($force = FALSE) { // Auto-init the array or if forced - if (($force === true) || (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()]))) { + if (($force === TRUE) || (!isset($GLOBALS['ext_sqls'][getCurrentExtensionName()]))) { // Set the array $GLOBALS['ext_sqls'][getCurrentExtensionName()] = array(); @@ -1685,7 +1685,7 @@ function getExtensionMode () { } // Setter for dry-run -function enableExtensionDryRun ($isDryRun = true) { +function enableExtensionDryRun ($isDryRun = TRUE) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'getCurrentExtensionName()='.getCurrentExtensionName().',isDryRun='.intval($isDryRun)); $GLOBALS['ext_isDryRun'] = (bool) $isDryRun; } @@ -1731,7 +1731,7 @@ function removeExtensionFromArray () { $key = array_search($ext_name, $cacheArray); // Is it there? - if ($key !== false) { + if ($key !== FALSE) { // Found, so remove it unset($cacheArray[$key]); $GLOBALS['cache_array']['extension'][$cacheName] = $cacheArray; @@ -1864,7 +1864,7 @@ function addDropTableSql ($tableName) { addExtensionSql('DROP TABLE `{?_MYSQL_PREFIX?}_' . $tableName . '`'); // Mark it as gone - $GLOBALS['ifSqlTableExists'][$tableName] = false; + $GLOBALS['ifSqlTableExists'][$tableName] = FALSE; } // END - if } @@ -1876,8 +1876,8 @@ function addRenameTableSql ($fromTable, $toTable) { addExtensionSql('RENAME TABLE `{?_MYSQL_PREFIX?}_' . $fromTable . '` TO `{?_MYSQL_PREFIX?}_' . $toTable . '`'); // Mark both tables - $GLOBALS['ifSqlTableExists'][$fromTable] = false; - $GLOBALS['ifSqlTableExists'][$toTable] = true; + $GLOBALS['ifSqlTableExists'][$fromTable] = FALSE; + $GLOBALS['ifSqlTableExists'][$toTable] = TRUE; } // END - if } @@ -2051,7 +2051,7 @@ function registerExtensionPointsData ($subject, $columnName, $lockedMode, $payme // Is the 'subject' there? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ifSqlTableExists(points_data)=' . ifSqlTableExists('points_data') . ',getExtensionMode()=' . getExtensionMode() . ',add=' . $add); - if (((!ifSqlTableExists('points_data')) && ((getExtensionMode() == 'register') || (getExtensionMode() == 'update'))) || (countSumTotalData($subject, 'points_data', 'id', 'subject', true, $add) == 0)) { + if (((!ifSqlTableExists('points_data')) && ((getExtensionMode() == 'register') || (getExtensionMode() == 'update'))) || (countSumTotalData($subject, 'points_data', 'id', 'subject', TRUE, $add) == 0)) { // Not found so: if ((isset($GLOBALS['previous_extension'][getCurrentExtensionName()])) && (!ifSqlTableExists('points_data'))) { $dummy = $GLOBALS['previous_extension'][getCurrentExtensionName()]; @@ -2083,7 +2083,7 @@ function unregisterExtensionPointsData ($subject) { } // END - if // Is the 'subject' there? - if (countSumTotalData($subject, 'points_data', 'id', 'subject', true, $add) == 1) { + if (countSumTotalData($subject, 'points_data', 'id', 'subject', TRUE, $add) == 1) { // Found one or more, so add an SQL query addExtensionSql(sprintf("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_points_data` WHERE `subject`='%s'" . $add . " LIMIT 1", $subject @@ -2094,7 +2094,7 @@ function unregisterExtensionPointsData ($subject) { // Enables/disables productive mode for current extension (used only while // registration). // @TODO This should be rewrittten to allow, more development states, e.g. 'planing','alpha','beta','beta2','stable' -function enableExtensionProductive ($isProductive = true) { +function enableExtensionProductive ($isProductive = TRUE) { // Log debug message //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . getCurrentExtensionName() . ',isProductive=', intval($isProductive)); @@ -2121,7 +2121,7 @@ function isExtensionProductive ($ext_name = '') { } // END - if // Determine it - $GLOBALS[__FUNCTION__][$ext_name] = ((isset($GLOBALS['ext_productive'][$ext_name])) && ($GLOBALS['ext_productive'][$ext_name] === true)); + $GLOBALS[__FUNCTION__][$ext_name] = ((isset($GLOBALS['ext_productive'][$ext_name])) && ($GLOBALS['ext_productive'][$ext_name] === TRUE)); } // END - if // Return result @@ -2139,13 +2139,13 @@ function markExtensionAsLoaded ($ext_name) { // Mark it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ',ext_loaded=true'); - $GLOBALS['ext_loaded']['ext_name'][$ext_name] = true; + $GLOBALS['ext_loaded']['ext_name'][$ext_name] = TRUE; } // Determine whether the given extension is already loaded function isExtensionLoaded ($ext_name) { // Is it there? - return ((isset($GLOBALS['ext_loaded']['ext_name'][$ext_name])) && ($GLOBALS['ext_loaded']['ext_name'][$ext_name] === true)); + return ((isset($GLOBALS['ext_loaded']['ext_name'][$ext_name])) && ($GLOBALS['ext_loaded']['ext_name'][$ext_name] === TRUE)); } // Mark extension's library file as loaded @@ -2157,13 +2157,13 @@ function markExtensionLibraryAsLoaded ($ext_name) { } // END - if // Mark it - $GLOBALS['ext_loaded']['library'][$ext_name] = true; + $GLOBALS['ext_loaded']['library'][$ext_name] = TRUE; } // Determine whether the given extension's library is already loaded function isExtensionLibraryLoaded ($ext_name) { // Is it there? - return ((isset($GLOBALS['ext_loaded']['library'][$ext_name])) && ($GLOBALS['ext_loaded']['library'][$ext_name] === true)); + return ((isset($GLOBALS['ext_loaded']['library'][$ext_name])) && ($GLOBALS['ext_loaded']['library'][$ext_name] === TRUE)); } // [EOF] diff --git a/inc/extensions/ext- b/inc/extensions/ext- index 6626f11285..a0375d5f2f 100644 --- a/inc/extensions/ext- +++ b/inc/extensions/ext- @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-active.php b/inc/extensions/ext-active.php index 6fda7310df..340eeb4592 100644 --- a/inc/extensions/ext-active.php +++ b/inc/extensions/ext-active.php @@ -58,7 +58,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_active'"); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'online_extra_links', 'ADD_LINK_ACTIVE_LIST', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'online_extra_links', 'ADD_LINK_ACTIVE_LIST', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -121,7 +121,7 @@ switch (getExtensionMode()) { addExtensionDependency('online'); // Register filter - registerFilter(__FILE__, __LINE__, 'online_extra_links', 'ADD_LINK_ACTIVE_LIST', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'online_extra_links', 'ADD_LINK_ACTIVE_LIST', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für den "Wer ist Online" Block hinzugefügt und ist von online abhängig."); diff --git a/inc/extensions/ext-admins.php b/inc/extensions/ext-admins.php index 44a223c773..9f0e42a260 100644 --- a/inc/extensions/ext-admins.php +++ b/inc/extensions/ext-admins.php @@ -65,10 +65,10 @@ switch (getExtensionMode()) { addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_admins` DROP `default_acl`"); // Remove filters - unregisterFilter(__FILE__, __LINE__, 'sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'do_admin_login_done', 'REHASH_ADMINS_PASSWORD', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'do_admin_login_done', 'REHASH_ADMINS_PASSWORD', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -295,7 +295,7 @@ INDEX (`admin_id`)", addExtensionDependency('sql_patches'); // Add filters - registerFilter(__FILE__, __LINE__, 'sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'sql_admin_extra_data', 'ADD_EXTRA_SQL_DATA', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); @@ -321,8 +321,8 @@ INDEX (`admin_id`)", case '0.7.4': // SQL queries for v0.7.4 // Add filter - registerFilter(__FILE__, __LINE__, 'do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'do_admin_login_done', 'RESET_ADMINS_LOGIN_FAILURES', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'do_admin_login_pass', 'COUNT_ADMINS_LOGIN_FAILURE', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefuegt."); @@ -330,7 +330,7 @@ INDEX (`admin_id`)", case '0.7.5': // SQL queries for v0.7.5 // Add filter - registerFilter(__FILE__, __LINE__, 'do_admin_login_done', 'REHASH_ADMINS_PASSWORD', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'do_admin_login_done', 'REHASH_ADMINS_PASSWORD', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Rehashen des Adminpassworts nach erfolgtem Login hinzugefügt."); diff --git a/inc/extensions/ext-announcement.php b/inc/extensions/ext-announcement.php index 154ccca501..c4274b44d0 100644 --- a/inc/extensions/ext-announcement.php +++ b/inc/extensions/ext-announcement.php @@ -48,7 +48,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-autoreg.php b/inc/extensions/ext-autoreg.php index 13c36161b3..78c6292d3a 100644 --- a/inc/extensions/ext-autoreg.php +++ b/inc/extensions/ext-autoreg.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-bank.php b/inc/extensions/ext-bank.php index 7b1f349b28..0d5779de92 100644 --- a/inc/extensions/ext-bank.php +++ b/inc/extensions/ext-bank.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-beg.php b/inc/extensions/ext-beg.php index da485c63be..744a08408c 100644 --- a/inc/extensions/ext-beg.php +++ b/inc/extensions/ext-beg.php @@ -90,8 +90,8 @@ INDEX (`userid`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='beg' LIMIT 1"); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'BEG_RALLYE_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'init', 'BEG_PURGE_IPS_NOTIFY_USER', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'BEG_RALLYE_USER_REGISTRATION_ADD_SQL_COLUMNS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'BEG_PURGE_IPS_NOTIFY_USER', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -347,8 +347,8 @@ INDEX (`userid`)", case '0.3.3': // SQL queries for v0.3.3 // Register a filter - registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'BEG_RALLYE_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'init', 'BEG_PURGE_IPS_NOTIFY_USER', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'BEG_RALLYE_USER_REGISTRATION_ADD_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'BEG_PURGE_IPS_NOTIFY_USER', FALSE, TRUE, isExtensionDryRun()); // This depends on ext-register addExtensionDependency('register'); diff --git a/inc/extensions/ext-bitcoins.php b/inc/extensions/ext-bitcoins.php index 0a32e0262e..33e7ccb09d 100644 --- a/inc/extensions/ext-bitcoins.php +++ b/inc/extensions/ext-bitcoins.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index c2ff1730f8..93f9f92809 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -92,11 +92,11 @@ INDEX (`cat_id`)", unregisterExtensionPointsData('monthly_bonus'); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'ADD_LOGIN_BONUS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'generate_admin_mail_links', 'GENERATE_BONUS_MAIL_LINKS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'add_bonus_points_user_columns', 'ADD_BONUS_POINTS_USER_COLUMNS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'BONUS_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'init', 'SEND_BONUS_NOTIFICATIONS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'ADD_LOGIN_BONUS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'generate_admin_mail_links', 'GENERATE_BONUS_MAIL_LINKS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'add_bonus_points_user_columns', 'ADD_BONUS_POINTS_USER_COLUMNS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'BONUS_USER_REGISTRATION_ADD_SQL_COLUMNS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'SEND_BONUS_NOTIFICATIONS', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -565,7 +565,7 @@ ORDER BY case '0.9.0': // SQL queries for v0.9.0 // Register filter - registerFilter(__FILE__, __LINE__, 'member_login_check', 'ADD_LOGIN_BONUS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_login_check', 'ADD_LOGIN_BONUS', FALSE, TRUE, isExtensionDryRun()); // Update notes setExtensionUpdateNotes("Filter hinzugefügt der den Login-Bonus aktualisiert (bzw. soll) (internes TODO)."); @@ -608,7 +608,7 @@ ORDER BY case '0.9.5': // SQL queries for v0.9.5 // Register filter - registerFilter(__FILE__, __LINE__, 'generate_admin_mail_links', 'GENERATE_BONUS_MAIL_LINKS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'generate_admin_mail_links', 'GENERATE_BONUS_MAIL_LINKS', FALSE, TRUE, isExtensionDryRun()); // Update notes setExtensionUpdateNotes("Filter zum Generieren von Admin-Links für Bonus-Mails hinzugefügt."); @@ -633,7 +633,7 @@ ORDER BY addConfigChangeSql('bonus_click_yn', 'include_bonus_click', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); // Register filter - registerFilter(__FILE__, __LINE__, 'add_bonus_points_user_columns', 'ADD_BONUS_POINTS_USER_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'add_bonus_points_user_columns', 'ADD_BONUS_POINTS_USER_COLUMNS', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Konfigurationseinträge umbenannt."); @@ -641,7 +641,7 @@ ORDER BY case '0.9.8': // SQL queries for v0.9.8 // Register filter - registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'BONUS_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'BONUS_USER_REGISTRATION_ADD_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun()); // Add dependency to ext-register addExtensionDependency('register'); @@ -652,7 +652,7 @@ ORDER BY case '0.9.9': // SQL queries for v0.9.9 // Register filter - registerFilter(__FILE__, __LINE__, 'init', 'SEND_BONUS_NOTIFICATIONS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'SEND_BONUS_NOTIFICATIONS', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Hinzufügen von SQL-Spalten bei der Mitgliederanmeldung."); diff --git a/inc/extensions/ext-booking.php b/inc/extensions/ext-booking.php index 6afac46583..827d4151bf 100644 --- a/inc/extensions/ext-booking.php +++ b/inc/extensions/ext-booking.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -77,9 +77,9 @@ INDEX (`userid`)", addMemberMenuSql('main', 'booking', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Kontoauszug', 5); // Add the filters - registerFilter(__FILE__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_BOOKING_MEMBER_ACTION', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_BOOKING_MEMBER_ACTION', FALSE, TRUE, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -88,9 +88,9 @@ INDEX (`userid`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='booking'"); // Remove the filters - unregisterFilter(__FILE__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_BOOKING_MEMBER_ACTION', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_add_points', 'ADD_BOOKING_RECORD', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_sub_points', 'ADD_BOOKING_RECORD', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_BOOKING_MEMBER_ACTION', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-cache.php b/inc/extensions/ext-cache.php index 35010eed7a..152d58cba2 100644 --- a/inc/extensions/ext-cache.php +++ b/inc/extensions/ext-cache.php @@ -60,15 +60,15 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('cache_stats','config_config')"); // Unregister all filters - unregisterFilter(__FILE__, __LINE__, 'extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_form_submited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_form_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_form_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'extension_remove', 'CACHE_DESTROY_ALL', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'shutdown', 'CACHE_DESTROY_FILTER', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_form_submited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_form_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_form_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'extension_remove', 'CACHE_DESTROY_ALL', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'shutdown', 'CACHE_DESTROY_FILTER', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -193,14 +193,14 @@ switch (getExtensionMode()) { case '0.2.1': // SQL queries for v0.2.1 // Register the new filter - registerFilter(__FILE__, __LINE__, 'extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'post_form_submited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'post_form_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'post_form_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'extension_remove', 'CACHE_DESTROY_ALL', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'extension_update', 'CACHE_DESTROY_ON_EXT_CHANGE', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_extension_installed', 'CACHE_DESTROY_ON_EXT_CHANGE', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_extension_run_sql', 'CACHE_DESTROY_ON_EXT_CHANGE', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_admin_added', 'CACHE_DESTROY_ON_ADMIN_CHANGE', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_form_submited', 'CACHE_DESTROY_ON_ADMIN_CHANGE', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_form_deleted', 'CACHE_DESTROY_ON_ADMIN_CHANGE', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_form_reset_pass', 'CACHE_DESTROY_ON_ADMIN_CHANGE', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'extension_remove', 'CACHE_DESTROY_ALL', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für Erweiterungsmanagement hinzugefügt."); @@ -218,7 +218,7 @@ switch (getExtensionMode()) { setExtensionUpdateNotes("Cachen von Filtern hinzugefügt."); // Register a new filter - registerFilter(__FILE__, __LINE__, 'shutdown', 'CACHE_DESTROY_FILTER', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'shutdown', 'CACHE_DESTROY_FILTER', FALSE, TRUE, isExtensionDryRun()); break; case '0.2.4': // SQL queries for v0.2.4 diff --git a/inc/extensions/ext-clickbanner.php b/inc/extensions/ext-clickbanner.php index 3e21291bcd..3cec8a7b28 100644 --- a/inc/extensions/ext-clickbanner.php +++ b/inc/extensions/ext-clickbanner.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-country.php b/inc/extensions/ext-country.php index cdf0382a34..5e62d49da6 100644 --- a/inc/extensions/ext-country.php +++ b/inc/extensions/ext-country.php @@ -82,7 +82,7 @@ UNIQUE INDEX (`code`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='country'"); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'COUNTRY_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'COUNTRY_USER_REGISTRATION_ADD_SQL_COLUMNS', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -119,7 +119,7 @@ UNIQUE INDEX (`code`)", case '0.0.5': // SQL queries for v0.0.5 // Register a filter - registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'COUNTRY_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'COUNTRY_USER_REGISTRATION_ADD_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun()); // This depends on ext-register addExtensionDependency('register'); diff --git a/inc/extensions/ext-coupon.php b/inc/extensions/ext-coupon.php index 6d44289001..d1eac3651a 100644 --- a/inc/extensions/ext-coupon.php +++ b/inc/extensions/ext-coupon.php @@ -102,7 +102,7 @@ UNIQUE INDEX (`coupon_code`)", addMemberMenuSql('coupon', 'list_coupon', 'Eingelöste auflisten', 2); // Add filter (for changing user_points column dynamically - registerFilter(__FILE__, __LINE__, 'determine_points_column_name', 'COUPON_CHANGE_POINTS_COLUMN_NAME', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'determine_points_column_name', 'COUPON_CHANGE_POINTS_COLUMN_NAME', FALSE, TRUE, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -116,8 +116,8 @@ UNIQUE INDEX (`coupon_code`)", unregisterExtensionPointsData('coupon_cashed'); // Remove all filters - unregisterFilter(__FILE__, __LINE__, 'determine_points_column_name', 'COUPON_CHANGE_POINTS_COLUMN_NAME', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_cash_coupon', 'POST_CASH_COUPON', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'determine_points_column_name', 'COUPON_CHANGE_POINTS_COLUMN_NAME', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_cash_coupon', 'POST_CASH_COUPON', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -157,7 +157,7 @@ UNIQUE INDEX (`coupon_code`)", break; case '0.0.3': // SQL queries for v0.0.3 - registerFilter(__FILE__, __LINE__, 'post_cash_coupon', 'POST_CASH_COUPON', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_cash_coupon', 'POST_CASH_COUPON', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes('Filter zum Post- und Pre-Filter hinzugefügt.'); diff --git a/inc/extensions/ext-cprping.php b/inc/extensions/ext-cprping.php index 6d42efc5ed..a6f0771ced 100644 --- a/inc/extensions/ext-cprping.php +++ b/inc/extensions/ext-cprping.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-currency.php b/inc/extensions/ext-currency.php index f79d750a1c..23d34dd0ee 100644 --- a/inc/extensions/ext-currency.php +++ b/inc/extensions/ext-currency.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index 2e080a7c99..13201425de 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -50,7 +50,7 @@ setExtensionVersionHistory(array('0.0.0')); setExtensionAlwaysActive('Y'); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-demo.php b/inc/extensions/ext-demo.php index c24c9e66d0..33fec7e5bb 100644 --- a/inc/extensions/ext-demo.php +++ b/inc/extensions/ext-demo.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.1'); setExtensionVersionHistory(array('0.0.0', '0.0.1')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-earning.php b/inc/extensions/ext-earning.php index b9974d7648..ac8a212f57 100644 --- a/inc/extensions/ext-earning.php +++ b/inc/extensions/ext-earning.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -86,7 +86,7 @@ INDEX (`earning_userid`)", 'User->Earning connections'); // Register filter - registerFilter(__FILE__, __LINE__, 'member_footer_extras', 'ADD_EARNING_GROUP_POPUP', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_footer_extras', 'ADD_EARNING_GROUP_POPUP', FALSE, TRUE, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -99,7 +99,7 @@ INDEX (`earning_userid`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='list_earning' LIMIT 1"); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'member_footer_extras', 'ADD_EARNING_GROUP_POPUP', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_footer_extras', 'ADD_EARNING_GROUP_POPUP', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-events.php b/inc/extensions/ext-events.php index 0e6559b729..7b2877aa08 100644 --- a/inc/extensions/ext-events.php +++ b/inc/extensions/ext-events.php @@ -48,7 +48,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-forced.php b/inc/extensions/ext-forced.php index 18b79dfd7d..b517e04259 100644 --- a/inc/extensions/ext-forced.php +++ b/inc/extensions/ext-forced.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -140,10 +140,10 @@ INDEX (`forced_stats_userid`)", addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_earning_data` (`earning_group`, `earning_provider`, `earning_sorting`) VALUES ('POPUP','FORCED_POPUP',1)"); // Register filters - registerFilter(__FILE__, __LINE__, 'add_forced_ads_types', 'FORCED_AD_TYPE_DEFAULTS', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'member_earning_table_data', 'FORCED_POPUP_TABLE_DATA', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'post_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_STATUS', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'pre_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'add_forced_ads_types', 'FORCED_AD_TYPE_DEFAULTS', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_earning_table_data', 'FORCED_POPUP_TABLE_DATA', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_STATUS', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA', FALSE, TRUE, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -164,10 +164,10 @@ INDEX (`forced_stats_userid`)", } // END - if // Remove filter - unregisterFilter(__FILE__, __LINE__, 'add_forced_ads_types', 'FORCED_AD_TYPE_DEFAULTS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'member_earning_table_data', 'FORCED_POPUP_TABLE_DATA', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_STATUS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'pre_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'add_forced_ads_types', 'FORCED_AD_TYPE_DEFAULTS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_earning_table_data', 'FORCED_POPUP_TABLE_DATA', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_STATUS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_change_forced_campaign_status', 'FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-geoip.php b/inc/extensions/ext-geoip.php index 75cfe18b9c..00192560cf 100644 --- a/inc/extensions/ext-geoip.php +++ b/inc/extensions/ext-geoip.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-grade.php b/inc/extensions/ext-grade.php index 4f2c430f2b..f2a46c62ee 100644 --- a/inc/extensions/ext-grade.php +++ b/inc/extensions/ext-grade.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-imprint.php b/inc/extensions/ext-imprint.php index af8ad211a5..f2f8bf5acf 100644 --- a/inc/extensions/ext-imprint.php +++ b/inc/extensions/ext-imprint.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-jackpot.php b/inc/extensions/ext-jackpot.php index 74beef759f..29411f4a74 100644 --- a/inc/extensions/ext-jackpot.php +++ b/inc/extensions/ext-jackpot.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-lead.php b/inc/extensions/ext-lead.php index ad2186adee..1a97a22600 100644 --- a/inc/extensions/ext-lead.php +++ b/inc/extensions/ext-lead.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-mediadata.php b/inc/extensions/ext-mediadata.php index 6c7cbd8405..64c71107e6 100644 --- a/inc/extensions/ext-mediadata.php +++ b/inc/extensions/ext-mediadata.php @@ -55,8 +55,8 @@ switch (getExtensionMode()) { addExtensionSql(''); // Add the filters - registerFilter(__FILE__, __LINE__, 'post_add_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'post_sub_points', 'UPDATE_MEDIADATA_ENTRY', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_add_points', 'UPDATE_MEDIADATA_ENTRY', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_sub_points', 'UPDATE_MEDIADATA_ENTRY', FALSE, TRUE, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -66,8 +66,8 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `what`='mediadata'"); // Remove the filters - unregisterFilter(__FILE__, __LINE__, 'post_add_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_sub_points', 'UPDATE_MEDIADATA_ENTRY', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_add_points', 'UPDATE_MEDIADATA_ENTRY', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_sub_points', 'UPDATE_MEDIADATA_ENTRY', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-network.php b/inc/extensions/ext-network.php index 8a38c4f69e..1056cb5859 100644 --- a/inc/extensions/ext-network.php +++ b/inc/extensions/ext-network.php @@ -76,7 +76,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-newsletter.php b/inc/extensions/ext-newsletter.php index ba672dd795..f262a5889a 100644 --- a/inc/extensions/ext-newsletter.php +++ b/inc/extensions/ext-newsletter.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.2.0'); setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.2.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-online.php b/inc/extensions/ext-online.php index 9113646dfa..6cfe876588 100644 --- a/inc/extensions/ext-online.php +++ b/inc/extensions/ext-online.php @@ -79,7 +79,7 @@ INDEX `admin_member` (`is_admin`, `is_member`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_guest_menu` WHERE `action`='online'"); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'init', 'UPDATE_ONLINE_LIST', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'UPDATE_ONLINE_LIST', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -119,7 +119,7 @@ INDEX `admin_member` (`is_admin`, `is_member`)", addGuestMenuSql('online', NULL, 'Jetzt Online', 2); // Register filter - registerFilter(__FILE__, __LINE__, 'init', 'UPDATE_ONLINE_LIST', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'UPDATE_ONLINE_LIST', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Hinzufügen des Menüpunktes "Jetzt Online" wird nun von dieser Erweiterung erledigt. Filter hinzugefügt."); diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 4c6757f7e4..3c24781bb3 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -59,12 +59,12 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='order'"); // Remove these filters - unregisterFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -342,8 +342,8 @@ INDEX (`pool_id`)", addExtensionDependency('user'); // Register filters for gathering points - registerFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Weiteres Verwendungszwecke "Werbeguthaben" hinzugefügt (verschoben von ext-user) und neue Filter zum Zurückliefern des Werbeguthabens hinzugefügt."); @@ -351,10 +351,10 @@ INDEX (`pool_id`)", case '0.5.4': // SQL queries for v0.5.4 // Register filter for handling locked points - registerFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', FALSE, TRUE, isExtensionDryRun()); // Register filter for all column names - registerFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für gesperrtes Werbeguthaben hinzugefügt."); @@ -362,7 +362,7 @@ INDEX (`pool_id`)", case '0.5.5': // SQL queries for v0.5.5 // Register filter - registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für gesperrtes Werbeguthaben hinzugefügt."); @@ -370,7 +370,7 @@ INDEX (`pool_id`)", case '0.5.6': // SQL queries for v0.5.6 // Register filter - registerFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für Spaltenname des gesperrten Werbeguthabens hinzugefügt."); diff --git a/inc/extensions/ext-other.php b/inc/extensions/ext-other.php index 83a90646a0..4e6a3faf36 100644 --- a/inc/extensions/ext-other.php +++ b/inc/extensions/ext-other.php @@ -60,7 +60,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_other'"); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_DEBUG_SQL', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_DEBUG_SQL', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -215,7 +215,7 @@ switch (getExtensionMode()) { case '0.2.4': // SQL queries for v0.2.4 // Register filter - registerFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_DEBUG_SQL', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_DEBUG_SQL', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Anzeigen (Debug) von ausgeführten SQL-Anweisungen hinzugefügt."); diff --git a/inc/extensions/ext-partner.php b/inc/extensions/ext-partner.php index d7d2e68ba0..7eb2cdbc44 100644 --- a/inc/extensions/ext-partner.php +++ b/inc/extensions/ext-partner.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-politician-stop.php b/inc/extensions/ext-politician-stop.php index 407b0aa6d1..5809ed4ae3 100644 --- a/inc/extensions/ext-politician-stop.php +++ b/inc/extensions/ext-politician-stop.php @@ -53,12 +53,12 @@ switch (getExtensionMode()) { addAdminMenuSql('config','config_politician_stop','Politiker-Stopp-Aktion','Einstellungen zur Satire-Aktion "Politiker-Stopp - Jetzt wird zurück zensiert."', 7); // Register filter - registerFilter(__FILE__, __LINE__, 'outside_masterbox', 'DISPLAY_POLITICIAN_STOP_SNIPPET', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'outside_masterbox', 'DISPLAY_POLITICIAN_STOP_SNIPPET', FALSE, TRUE, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'outside_masterbox', 'DISPLAY_POLITICIAN_STOP_SNIPPET', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'outside_masterbox', 'DISPLAY_POLITICIAN_STOP_SNIPPET', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-rallye.php b/inc/extensions/ext-rallye.php index 967cdeb52a..852ac1de84 100644 --- a/inc/extensions/ext-rallye.php +++ b/inc/extensions/ext-rallye.php @@ -117,9 +117,9 @@ INDEX (`userid`)", unregisterExtensionPointsData('rallye_winner'); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'init', 'RALLYE_NOTIFY_USERS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'add_rallye_notify_sqls', 'ADD_RALLYE_SQL_COLUMNS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'RALLYE_NOTIFY_USERS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'add_rallye_notify_sqls', 'ADD_RALLYE_SQL_COLUMNS', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -317,7 +317,7 @@ Zudem sollten Sie mindestens folgende Templates (in templates/".getLangu addExtensionDependency('sql_patches'); // Register filter - registerFilter(__FILE__, __LINE__, 'extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'extra_autopurge', 'RALLYE_EXTRA_AUTOPURGE', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); @@ -336,8 +336,8 @@ Zudem sollten Sie mindestens folgende Templates (in templates/".getLangu case '0.3.7': // SQL queries for v0.3.7 // Register filter - registerFilter(__FILE__, __LINE__, 'init', 'RALLYE_NOTIFY_USERS', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'add_rallye_notify_sqls', 'ADD_RALLYE_SQL_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'RALLYE_NOTIFY_USERS', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'add_rallye_notify_sqls', 'ADD_RALLYE_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun()); // Update notes setExtensionUpdateNotes("Weitere Filter hinzugefügt."); diff --git a/inc/extensions/ext-refsell.php b/inc/extensions/ext-refsell.php index 1addee44ef..a43c205080 100644 --- a/inc/extensions/ext-refsell.php +++ b/inc/extensions/ext-refsell.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-register.php b/inc/extensions/ext-register.php index 4f61667a6b..85bfcb4632 100644 --- a/inc/extensions/ext-register.php +++ b/inc/extensions/ext-register.php @@ -64,8 +64,8 @@ switch (getExtensionMode()) { unregisterExtensionPointsData('referral_bonus_ref'); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_GENERIC', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_GENERIC', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -321,7 +321,7 @@ PRIMARY KEY (`id`)", case '0.5.3': // SQL queries for v0.5.3 // Register a filter - registerFilter(__FILE__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'register_must_fillout', 'REGISTER_MUST_FILLOUT', FALSE, TRUE, isExtensionDryRun()); // Run these SQLs addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('gender','Y')"); @@ -360,7 +360,7 @@ PRIMARY KEY (`id`)", case '0.5.7': // SQL queries for v0.5.7 // Register a filter - registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_GENERIC', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'PRE_USER_REGISTRATION_GENERIC', FALSE, TRUE, isExtensionDryRun()); // Register points data registerExtensionPointsData('referral_bonus', 'points', 'LOCKED', 'DIRECT'); diff --git a/inc/extensions/ext-removeip.php b/inc/extensions/ext-removeip.php index 01d29159df..f258946227 100644 --- a/inc/extensions/ext-removeip.php +++ b/inc/extensions/ext-removeip.php @@ -66,7 +66,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_removeip' LIMIT 1"); // Remove filters - unregisterFilter(__FILE__, __LINE__, 'post_youhere_line', 'ADD_ANONYMITY_NOTICE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_youhere_line', 'ADD_ANONYMITY_NOTICE', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -84,7 +84,7 @@ switch (getExtensionMode()) { addExtensionDependency('sql_patches'); // Add filters - registerFilter(__FILE__, __LINE__, 'post_youhere_line', 'ADD_ANONYMITY_NOTICE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_youhere_line', 'ADD_ANONYMITY_NOTICE', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter hinzugefügt und ist von sql_patches abhängig."); diff --git a/inc/extensions/ext-report.php b/inc/extensions/ext-report.php index a835dc0b5f..c1eb6d598f 100644 --- a/inc/extensions/ext-report.php +++ b/inc/extensions/ext-report.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-rewrite.php b/inc/extensions/ext-rewrite.php index b783e4cf9e..f4cbf23d6b 100644 --- a/inc/extensions/ext-rewrite.php +++ b/inc/extensions/ext-rewrite.php @@ -53,7 +53,7 @@ switch (getExtensionMode()) { case 'register': // Do stuff when installation is running // Check if mod_rewrite is loadeded if (!isApacheModuleLoaded('mod_rewrite')) { - enableExtensionReportingFailure(true); + enableExtensionReportingFailure(TRUE); addFatalMessage(__FILE__, __LINE__, '{--MOD_REWRITE_ERROR--}'); } // END - if @@ -70,7 +70,7 @@ switch (getExtensionMode()) { // Check if mod_rewrite is loadeded if (!isApacheModuleLoaded('mod_rewrite')) { SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__); - enableExtensionReportingFailure(true); + enableExtensionReportingFailure(TRUE); addFatalMessage(__FILE__, __LINE__, '{--MOD_REWRITE_ERROR--}'); } // END - if @@ -148,7 +148,7 @@ switch (getExtensionMode()) { case '0.1.3': // Check if mod_rewrite is loadeded if (!isApacheModuleLoaded('mod_rewrite')) { - enableExtensionReportingFailure(true); + enableExtensionReportingFailure(TRUE); //addFatalMessage(__FILE__, __LINE__, '{--MOD_REWRITE_ERROR--}'); } // END - if setExtensionUpdateNotes("Es wird beim Registrieren und aktivieren geprüft, ob im Apache das Modul mod_rewrite geladen wurde. Wenn mod_rewrite nicht gefunden werden konnte, wird abgebrochen."); @@ -165,7 +165,7 @@ switch (getExtensionMode()) { case 'init': // Do stuff when extension is initialized // Check if mod_rewrite is loadeded if (!isApacheModuleLoaded('mod_rewrite')) { - enableExtensionReportingFailure(true); + enableExtensionReportingFailure(TRUE); SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_extensions` SET `ext_active`='N' WHERE `ext_name`='rewrite' LIMIT 1", __FILE__, __LINE__); if (!isAdmin()) { addFatalMessage(__FILE__, __LINE__, '{--MOD_REWRITE_ERROR--}'); diff --git a/inc/extensions/ext-safe.php b/inc/extensions/ext-safe.php index 057f758564..4b4a0e51b7 100644 --- a/inc/extensions/ext-safe.php +++ b/inc/extensions/ext-safe.php @@ -48,7 +48,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-seo.php b/inc/extensions/ext-seo.php index cc70660e54..ce98b5f7bd 100644 --- a/inc/extensions/ext-seo.php +++ b/inc/extensions/ext-seo.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-shredder.php b/inc/extensions/ext-shredder.php index 56d867e52b..276e507f12 100644 --- a/inc/extensions/ext-shredder.php +++ b/inc/extensions/ext-shredder.php @@ -49,7 +49,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installtion is running diff --git a/inc/extensions/ext-signup.php b/inc/extensions/ext-signup.php index 9595313c58..cb07afe680 100644 --- a/inc/extensions/ext-signup.php +++ b/inc/extensions/ext-signup.php @@ -49,7 +49,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installtion is running diff --git a/inc/extensions/ext-sponsor.php b/inc/extensions/ext-sponsor.php index 697a546dae..7184d636a4 100644 --- a/inc/extensions/ext-sponsor.php +++ b/inc/extensions/ext-sponsor.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 828f4c43df..34dd773e49 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -104,9 +104,9 @@ IN ( unregisterExtensionPointsData('admin_add_all_ref'); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -717,7 +717,7 @@ UNIQUE INDEX `name_function` (`filter_name`, `filter_function`)", case '0.6.9': // SQL queries for 0.6.9 // Register filter - registerFilter(__FILE__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_login_check', 'RESET_USER_LOGIN_FAILURE', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Zurücksetzens des fehlgeschlagenen Mitgliederlogins hinzugefügt (internes TODO)."); @@ -738,7 +738,7 @@ INDEX (`ip`)", addConfigAddSql('dns_cache_timeout', 'BIGINT(20) NOT NULL DEFAULT ' . (60*60*24)); // Register filter - registerFilter(__FILE__, __LINE__, 'reset', 'CLEANUP_DNS_CACHE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'reset', 'CLEANUP_DNS_CACHE', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("IP-Resolver-Klasse hinzugefügt, um bei der Erweiterung ext-network DNS-Anfragen einzusparen."); @@ -875,7 +875,7 @@ INDEX (`history_last_used` DESC)", 'History of used data'); // Register filter - registerFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'add_history_entry', 'ADD_HISTORY_ENTRY', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Allgemeine Historie-Tabelle hinzugefügt."); @@ -921,7 +921,7 @@ INDEX (`history_last_used` DESC)", case '0.9.0': // SQL queries for v0.9.0 // Register filter - registerFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'GENERATE_FILE_SECRET_HASH', FALSE, TRUE, isExtensionDryRun()); // Register points data registerExtensionPointsData('admin_add_single', 'points', 'LOCKED', 'DIRECT'); diff --git a/inc/extensions/ext-surfbar.php b/inc/extensions/ext-surfbar.php index bcba549557..31e5299cdc 100644 --- a/inc/extensions/ext-surfbar.php +++ b/inc/extensions/ext-surfbar.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -203,8 +203,8 @@ UNIQUE INDEX `status_action` (`actions_status`, `actions_action`)", addExtensionDependency('sql_patches'); // Register filters - registerFilter(__FILE__, __LINE__, 'post_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_STATUS', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'pre_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_VALIDATE_DATA', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_STATUS', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_VALIDATE_DATA', FALSE, TRUE, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -224,8 +224,8 @@ UNIQUE INDEX `status_action` (`actions_status`, `actions_action`)", unregisterExtensionPointsData('monthly_surfbar'); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'post_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_STATUS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'pre_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_VALIDATE_DATA', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_STATUS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_change_surfbar_url_status', 'SURFBAR_CHANGE_URL_VALIDATE_DATA', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-teams.php b/inc/extensions/ext-teams.php index 57c7433f86..91aedfa99e 100644 --- a/inc/extensions/ext-teams.php +++ b/inc/extensions/ext-teams.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-terms.php b/inc/extensions/ext-terms.php index a05a889031..16bccda7ae 100644 --- a/inc/extensions/ext-terms.php +++ b/inc/extensions/ext-terms.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-theme.php b/inc/extensions/ext-theme.php index 2df24a983b..5d8c6743e7 100644 --- a/inc/extensions/ext-theme.php +++ b/inc/extensions/ext-theme.php @@ -65,9 +65,9 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='themes' OR `what`='themes'"); // Unregister filters - unregisterFilter(__FILE__, __LINE__, 'init', 'HANDLE_THEME_CHANGE', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'SET_USERS_THEME', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'THEME_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'HANDLE_THEME_CHANGE', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_login_check', 'SET_USERS_THEME', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'THEME_USER_REGISTRATION_ADD_SQL_COLUMNS', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -163,7 +163,7 @@ INDEX (`theme_active`)", 'Themes'); case '0.1.0': // SQL queries for v0.1.0 // Register filter - registerFilter(__FILE__, __LINE__, 'init', 'HANDLE_THEME_CHANGE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'HANDLE_THEME_CHANGE', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Ändern des Designs nun im Filter (internes TODO)."); @@ -171,7 +171,7 @@ INDEX (`theme_active`)", 'Themes'); case '0.1.1': // SQL queries for v0.1.1 // Register filter - registerFilter(__FILE__, __LINE__, 'member_login_check', 'SET_USERS_THEME', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_login_check', 'SET_USERS_THEME', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Setzen des Mitgliedes' eigener Design-Auswahl per Filter (internes TODO)."); @@ -187,7 +187,7 @@ INDEX (`theme_active`)", 'Themes'); case '0.1.3': // SQL queries for v0.1.3 // Register filter - registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'THEME_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'THEME_USER_REGISTRATION_ADD_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun()); // This depends on ext-register addExtensionDependency('register'); diff --git a/inc/extensions/ext-timezone.php b/inc/extensions/ext-timezone.php index fdc7460acd..26a7791671 100644 --- a/inc/extensions/ext-timezone.php +++ b/inc/extensions/ext-timezone.php @@ -55,7 +55,7 @@ switch (getExtensionMode()) { addAdminMenuSql('setup', 'config_timezone', 'Zeitzone', 'Einstellungen an der Zeitzone können hier konfiguriert werden.', 10); // Register filter - registerFilter(__FILE__, __LINE__, 'init', 'INIT_TIMEZONE', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'init', 'INIT_TIMEZONE', FALSE, TRUE, isExtensionDryRun()); break; case 'remove': // Do stuff when removing extension @@ -63,7 +63,7 @@ switch (getExtensionMode()) { addExtensionSQL("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_timezone' LIMIT 1"); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'init', 'INIT_TIMEZONE', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'init', 'INIT_TIMEZONE', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension diff --git a/inc/extensions/ext-uberwach.php b/inc/extensions/ext-uberwach.php index 49915fd3e8..8c537882b2 100644 --- a/inc/extensions/ext-uberwach.php +++ b/inc/extensions/ext-uberwach.php @@ -56,7 +56,7 @@ switch (getExtensionMode()) { addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_uberwach' LIMIT 1"); // Unregister filter - unregisterFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_UBERWACH_SNIPPET', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_UBERWACH_SNIPPET', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -70,7 +70,7 @@ switch (getExtensionMode()) { case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - registerFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_UBERWACH_SNIPPET', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'page_footer', 'DISPLAY_UBERWACH_SNIPPET', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Anzeigen des Snippets hinzugefügt"); diff --git a/inc/extensions/ext-update.php b/inc/extensions/ext-update.php index f53fd1d922..e0e6b3a446 100644 --- a/inc/extensions/ext-update.php +++ b/inc/extensions/ext-update.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 5436f59e6a..15db492729 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -186,20 +186,20 @@ INDEX (`stats_type`)", addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what` IN ('subids')"); // Register new filters for gathering points - unregisterFilter(__FILE__, __LINE__, 'get_total_points', 'USER_POINTS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'get_own_points', 'USER_POINTS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_USER_POINTS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_USER_POINTS_COLUMN_NAMES', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'TESTER_USER_EXCLUSION_SQL', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'user_inclusion_sql', 'TESTER_USER_INCLUSION_SQL', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'TESTER_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'convert_user_data_columns', 'ADD_USER_DATA_CONVERT_SQL_COLUMNS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'post_refid_validation', 'HANDLE_USER_SUBID', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'SUBID_USER_REGISTRATION_ADD_SQL_COLUMNS', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'update_referral_data', 'GENERIC_UPDATE_USER_REFERRAL', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'update_referral_data', 'UPDATE_USER_SUBID', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_USER_SUBID_MEMBER_ACTION', true, isExtensionDryRun()); - unregisterFilter(__FILE__, __LINE__, 'member_reflink_extra_content', 'MEMBER_REFLINK_USER_SUBIDS_CONTENT', true, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_total_points', 'USER_POINTS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_own_points', 'USER_POINTS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_USER_POINTS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_USER_POINTS_COLUMN_NAMES', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'TESTER_USER_EXCLUSION_SQL', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'user_inclusion_sql', 'TESTER_USER_INCLUSION_SQL', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'TESTER_USER_REGISTRATION_ADD_SQL_COLUMNS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'convert_user_data_columns', 'ADD_USER_DATA_CONVERT_SQL_COLUMNS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'post_refid_validation', 'HANDLE_USER_SUBID', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'pre_user_registration', 'SUBID_USER_REGISTRATION_ADD_SQL_COLUMNS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'update_referral_data', 'GENERIC_UPDATE_USER_REFERRAL', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'update_referral_data', 'UPDATE_USER_SUBID', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_USER_SUBID_MEMBER_ACTION', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'member_reflink_extra_content', 'MEMBER_REFLINK_USER_SUBIDS_CONTENT', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -439,8 +439,8 @@ INDEX (`userid`)", case '0.4.0': // SQL queries for v0.4.0 // Register new filters for gathering points - registerFilter(__FILE__, __LINE__, 'get_total_points', 'USER_POINTS', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'get_own_points', 'USER_POINTS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_total_points', 'USER_POINTS', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_own_points', 'USER_POINTS', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter registriert, die das eigene {?POINTS?}-Guthaben des Mitgliedes zurückliefern."); @@ -526,10 +526,10 @@ INDEX (`refid`)", addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `last_module` `last_what` VARCHAR(255) NULL DEFAULT NULL'); // Register filter locked points - registerFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_USER_POINTS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_USER_POINTS', FALSE, TRUE, isExtensionDryRun()); // Register filter for all column names - registerFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_USER_POINTS_COLUMN_NAMES', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_USER_POINTS_COLUMN_NAMES', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Die Spalte last_module ist nach last_what umbenannt und hat nun NULL als Ausgangswert und Filter für gesperrtes Guthaben hinzugefügt."); @@ -557,8 +557,8 @@ INDEX (`refid`)", addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `zip` `zip` INT(6) NOT NULL DEFAULT 0'); // Register filter for WHERE/AND exclusion/inclusion statements - registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'TESTER_USER_EXCLUSION_SQL', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'user_inclusion_sql', 'TESTER_USER_INCLUSION_SQL', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'TESTER_USER_EXCLUSION_SQL', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'user_inclusion_sql', 'TESTER_USER_INCLUSION_SQL', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Es können nun Test-Benutzer angelegt werden. Noch müssen diese überall ausgeschlossen werden, damit die Mediadaten nicht unnötig verfälscht werden."); @@ -566,7 +566,7 @@ INDEX (`refid`)", case '0.5.1': // SQL queries for v0.5.1 // Register a filter - registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'TESTER_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'TESTER_USER_REGISTRATION_ADD_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Hinzufügen von SQL-Spalten für die Mitgliederanmeldung hinzugefügt."); @@ -574,7 +574,7 @@ INDEX (`refid`)", case '0.5.2': // SQL queries for v0.5.2 // Register a filter - registerFilter(__FILE__, __LINE__, 'convert_user_data_columns', 'ADD_USER_DATA_CONVERT_SQL_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'convert_user_data_columns', 'ADD_USER_DATA_CONVERT_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter zum Hinzufügen von SQL-Spalten für die Mitgliederanmeldung hinzugefügt."); @@ -582,8 +582,8 @@ INDEX (`refid`)", case '0.5.3': // SQL queries for v0.5.3 // Register filter - registerFilter(__FILE__, __LINE__, 'post_refid_validation', 'HANDLE_USER_SUBID', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'SUBID_USER_REGISTRATION_ADD_SQL_COLUMNS', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'post_refid_validation', 'HANDLE_USER_SUBID', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'SUBID_USER_REGISTRATION_ADD_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun()); // Admin menu addAdminMenuSql('user', 'list_user_subid', 'Sub-Ids', 'Listet alle pro vom Mitglied eingegebenen Sub-Ids und ermittelten Referral-URLs auf.', 7); @@ -630,8 +630,8 @@ INDEX (`subid`)", case '0.5.4': // SQL queries for v0.5.4 // Register filter - registerFilter(__FILE__, __LINE__, 'update_referral_data', 'GENERIC_UPDATE_USER_REFERRAL', false, true, isExtensionDryRun()); - registerFilter(__FILE__, __LINE__, 'update_referral_data', 'UPDATE_USER_SUBID', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'update_referral_data', 'GENERIC_UPDATE_USER_REFERRAL', FALSE, TRUE, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'update_referral_data', 'UPDATE_USER_SUBID', FALSE, TRUE, isExtensionDryRun()); // Add user agent addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_subid_log` ADD `user_agent` TINYTEXT NOT NULL AFTER `remote_address`'); @@ -642,7 +642,7 @@ INDEX (`subid`)", case '0.5.5': // SQL queries for v0.5.5 // Register filter - registerFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_USER_SUBID_MEMBER_ACTION', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_admin_actions', 'ADD_USER_SUBID_MEMBER_ACTION', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Weiteren Filter für Mitglieder-Aktionen im Adminbereich hinzugefügt."); @@ -650,7 +650,7 @@ INDEX (`subid`)", case '0.5.6': // SQL queries for v0.5.6 // Register filter - registerFilter(__FILE__, __LINE__, 'member_reflink_extra_content', 'MEMBER_REFLINK_USER_SUBIDS_CONTENT', false, true, isExtensionDryRun()); + registerFilter(__FILE__, __LINE__, 'member_reflink_extra_content', 'MEMBER_REFLINK_USER_SUBIDS_CONTENT', FALSE, TRUE, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Weiteren Filter für Mitglieder-Aktionen im Adminbereich hinzugefügt."); diff --git a/inc/extensions/ext-yacy.php b/inc/extensions/ext-yacy.php index 1c3e71d094..ccfb59992d 100644 --- a/inc/extensions/ext-yacy.php +++ b/inc/extensions/ext-yacy.php @@ -47,7 +47,7 @@ setThisExtensionVersion('0.0.0'); setExtensionVersionHistory(array('0.0.0')); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running diff --git a/inc/filter-functions.php b/inc/filter-functions.php index 2048ba28ae..39f980c267 100644 --- a/inc/filter-functions.php +++ b/inc/filter-functions.php @@ -54,7 +54,7 @@ function initFilterSystem () { prepareFilterArray(); // Mark it as initialized - $GLOBALS['filter_init'] = true; + $GLOBALS['filter_init'] = TRUE; } elseif ((!isInstallationPhase()) && (isExtensionInstalledAndNewer('sql_patches', '0.5.9'))) { // Init add $add = ''; @@ -85,7 +85,7 @@ ORDER BY $GLOBALS['cache_array']['filter']['counter'][$filterName][$filterFunction] = '0'; // Mark this filter as loaded (from database) - $GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction] = true; + $GLOBALS['cache_array']['filter']['loaded'][$filterName][$filterFunction] = TRUE; // Set this filter $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = $filterArray['filter_active']; @@ -201,7 +201,7 @@ ORDER BY } // "Registers" a new filter function -function registerFilter ($F, $L, $filterName, $filterFunction, $silentAbort = true, $force = false, $isDryRun = false) { +function registerFilter ($F, $L, $filterName, $filterFunction, $silentAbort = TRUE, $force = FALSE, $isDryRun = FALSE) { // Extend the filter function name $filterFunction = 'FILTER_' . strtoupper($filterFunction); @@ -209,24 +209,24 @@ function registerFilter ($F, $L, $filterName, $filterFunction, $silentAbort = tr //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ENTRY: filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',F=' . basename($F) . ',L=' . $L . ' - ENTERED!'); // Is that filter already there? - if ((isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction])) && ($force === false)) { + if ((isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction])) && ($force === FALSE)) { // In installation phase we always want to abort - if (($silentAbort === false) || (isInstallationPhase())) { + if (($silentAbort === FALSE) || (isInstallationPhase())) { // Add fatal message reportBug(__FUNCTION__, __LINE__, sprintf("Filter chain %s has already filter function %s registered! F=%s,L=%s,force=%d", $filterName, $filterFunction, basename($F), $L, intval($force))); } // END - if // Abort here - return false; + return FALSE; } // END - if // Shall we add it? - if ($isDryRun === false) { + if ($isDryRun === FALSE) { // Is the function there? if (!function_exists($filterFunction)) { // Then abort here addFatalMessage(__FUNCTION__, __LINE__, sprintf("Filter function %s could not be added to filter chain %s. F=%s,L=%s,force=%d", $filterFunction, $filterName, basename($F), $L, intval($force))); - return false; + return FALSE; } // END - if // Simply add it to the array @@ -239,7 +239,7 @@ function registerFilter ($F, $L, $filterName, $filterFunction, $silentAbort = tr } // "Unregisters" a filter from the given chain -function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = false, $isDryRun = false) { +function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = FALSE, $isDryRun = FALSE) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ',force=' . intval($force) . ',isDryRun=' . intval($isDryRun) . ' - ENTERED!'); // Extend the filter function name only if not loaded from database @@ -248,14 +248,14 @@ function unregisterFilter ($F, $L, $filterName, $filterFunction, $force = false, } // END - if // Is that filter there? - if ((!isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction])) && ($force === false)) { + if ((!isset($GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction])) && ($force === FALSE)) { // Not found, so abort here addFatalMessage(__FUNCTION__, __LINE__, sprintf(getMessage('FILTER_FAILED_NOT_REMOVED'), $filterFunction, $filterName)); - return false; + return FALSE; } // END - if // Shall we remove? (default, not while just showing an extension removal) - if ($isDryRun === false) { + if ($isDryRun === FALSE) { // Mark for filter removal //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'F=' . $F . ',L=' . $L . ',filterName=' . $filterName . ',filterFunction=' . $filterFunction . ' - REMOVE!'); $GLOBALS['cache_array']['filter']['chains'][$filterName][$filterFunction] = 'R'; @@ -331,7 +331,7 @@ function prepareFilterArray () { // Abort here if array is absend (e.g. not cached) if (!isset($GLOBALS['cache_array']['filter']['filter_name'])) { // Abort silently - return false; + return FALSE; } // END - if // Init dummy array @@ -348,7 +348,7 @@ function prepareFilterArray () { // Add the element with mapped index $filterArray['counter'][$filterName][$filterFunction] = $GLOBALS['cache_array']['filter']['filter_counter'][$idx]; - $filterArray['loaded'][$filterName][$filterFunction] = true; + $filterArray['loaded'][$filterName][$filterFunction] = TRUE; $filterArray['chains'][$filterName][$filterFunction] = $GLOBALS['cache_array']['filter']['filter_active'][$idx]; } // END - foreach @@ -370,7 +370,7 @@ function loadExtensionFilters ($ext_name) { // Is there a cache entry? if (!isset($GLOBALS[__FUNCTION__][$ext_name])) { // Default is not found - $GLOBALS[__FUNCTION__][$ext_name] = false; + $GLOBALS[__FUNCTION__][$ext_name] = FALSE; // Construct include file name $incFileName = sprintf("inc/filter/%s_filter.php", $ext_name); @@ -381,7 +381,7 @@ function loadExtensionFilters ($ext_name) { loadIncludeOnce($incFileName); // Mark the file as loaded - $GLOBALS[__FUNCTION__][$ext_name] = true; + $GLOBALS[__FUNCTION__][$ext_name] = TRUE; } elseif (isDebugModeEnabled()) { // Log missing file //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Filter include file ' . $incFileName . ' for extension ' . $ext_name . ' is missing.'); diff --git a/inc/filter/active_filter.php b/inc/filter/active_filter.php index ecb2506f1d..5c83520648 100644 --- a/inc/filter/active_filter.php +++ b/inc/filter/active_filter.php @@ -54,7 +54,7 @@ function FILTER_ADD_LINK_ACTIVE_LIST ($filterData) { ); // Add link to "we were active today" page - $GLOBALS['rows'] .= loadTemplate('guest_menu_bottom', true, $content); + $GLOBALS['rows'] .= loadTemplate('guest_menu_bottom', TRUE, $content); } // END - if // Return data diff --git a/inc/filter/beg_filter.php b/inc/filter/beg_filter.php index c96ba0b254..7c3cfc1c45 100644 --- a/inc/filter/beg_filter.php +++ b/inc/filter/beg_filter.php @@ -52,7 +52,7 @@ function FILTER_BEG_RALLYE_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) { // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); - //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,true).'
'; + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; } diff --git a/inc/filter/bonus_filter.php b/inc/filter/bonus_filter.php index 63aafff993..0403890eae 100644 --- a/inc/filter/bonus_filter.php +++ b/inc/filter/bonus_filter.php @@ -50,7 +50,7 @@ function FILTER_ADD_LOGIN_BONUS ($filterData) { } // END - if // Bonus is not given by default ;-) - $bonus = false; + $bonus = FALSE; if ((isExtensionInstalledAndNewer('sql_patches', '0.2.8')) && (isBonusRallyeActive()) && (getConfig('include_bonus_login') == 'Y')) { // Update last login if far enougth away // @TODO This query isn't right, it will only update if the user was for a longer time away! @@ -71,7 +71,7 @@ LIMIT 1', $bonus = (!SQL_HASZEROAFFECTED()); } // END - if - if (($bonus === true) && (getRequestElement('do') == 'bonus')) { + if (($bonus === TRUE) && (getRequestElement('do') == 'bonus')) { // Output message with added points $GLOBALS['message'] .= '
{--MEMBER_BONUS_LOGIN_BONUS_ADDED--}
'; } else { @@ -91,7 +91,7 @@ function FILTER_GENERATE_BONUS_MAIL_LINKS ($filterData) { // Is the type 'bid'? if ($filterData['type'] == 'bid') { // Load template - $filterData['__output'] .= loadTemplate('admin_links_bonus_mail', true, $filterData); + $filterData['__output'] .= loadTemplate('admin_links_bonus_mail', TRUE, $filterData); } // END - if // Return data @@ -133,7 +133,7 @@ function FILTER_BONUS_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) { // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); - //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,true).'
'; + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; } @@ -148,7 +148,7 @@ function FILTER_SEND_BONUS_NOTIFICATIONS ($filterData) { // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); - //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,true).'
'; + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; } diff --git a/inc/filter/cache_filter.php b/inc/filter/cache_filter.php index 4ec2318e2e..d675aa43be 100644 --- a/inc/filter/cache_filter.php +++ b/inc/filter/cache_filter.php @@ -45,7 +45,7 @@ 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 false; + return FALSE; } // END - if // Remove cache @@ -67,7 +67,7 @@ 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 false; + return FALSE; } // END - if // Remove cache @@ -85,7 +85,7 @@ function FILTER_CACHE_DESTROY_ALL ($filterData) { // Skip this step if the cache instance is not there //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called!'); if (!isCacheInstanceValid()) { - return false; + return FALSE; } // END - if // Remove cache files @@ -107,7 +107,7 @@ 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'))) { - return false; + return FALSE; } // END - if // Remove cache files diff --git a/inc/filter/country_filter.php b/inc/filter/country_filter.php index ebf345108b..9ae9032077 100644 --- a/inc/filter/country_filter.php +++ b/inc/filter/country_filter.php @@ -50,7 +50,7 @@ function FILTER_COUNTRY_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) { // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); - //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,true).'
'; + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; } diff --git a/inc/filter/forced_filter.php b/inc/filter/forced_filter.php index 418746971f..d3843ca622 100644 --- a/inc/filter/forced_filter.php +++ b/inc/filter/forced_filter.php @@ -107,11 +107,11 @@ function FILTER_FORCED_CHANGE_CAMPAIGN_VALIDATE_DATA ($filterData) { if ((!is_string($filterData['new_status'])) || (empty($filterData['new_status']))) { // Abort here, not fine //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newStatus[' . gettype($filterData['new_status']) . ']=' . $filterData['new_status'] . ' - EXIT!'); - $filterData['abort'] = false; + $filterData['abort'] = FALSE; } elseif ($filterData['data']['forced_campaign_status'] != $filterData['prev_status']) { // Status is not like prevStatus //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $filterData['data']['forced_campaign_status'] . '!=' . $filterData['prev_status'] . ' - EXIT!'); - $filterData['abort'] = false; + $filterData['abort'] = FALSE; } // END - if // Return filter data diff --git a/inc/filter/mediadata_filter.php b/inc/filter/mediadata_filter.php index bf811ae78d..cc60137100 100644 --- a/inc/filter/mediadata_filter.php +++ b/inc/filter/mediadata_filter.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { function FILTER_UPDATE_MEDIADATA_ENTRY ($filterData) { // Execute the filter function //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'added[' . gettype($filterData['added']) . ']=' . intval($filterData['added']) . ' - Called!'); - $filterData['added'] = ($filterData['added'] === true && updateMediadataEntry(array('total_points'), $filterData['points_mode'], $filterData['points'])); + $filterData['added'] = ($filterData['added'] === TRUE && updateMediadataEntry(array('total_points'), $filterData['points_mode'], $filterData['points'])); // Return data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'added[' . gettype($filterData['added']) . ']=' . intval($filterData['added']) . ' - Done!'); diff --git a/inc/filter/online_filter.php b/inc/filter/online_filter.php index 43c4ed97aa..31c22ee117 100644 --- a/inc/filter/online_filter.php +++ b/inc/filter/online_filter.php @@ -60,7 +60,7 @@ function FILTER_UPDATE_ONLINE_LIST ($filterData) { $userid = NULL; $isMember = convertBooleanToYesNo(isMember()); $isAdmin = convertBooleanToYesNo(isAdmin()); - $action = getActionFromModuleWhat(getModule(), getWhat(false)); + $action = getActionFromModuleWhat(getModule(), getWhat(FALSE)); // Valid userid? if (isMember()) { @@ -93,7 +93,7 @@ LIMIT 1", array( getModule(), $action, - getWhat(false), + getWhat(FALSE), convertZeroToNull($userid), convertZeroToNull(determineReferralId()), $isMember, @@ -107,7 +107,7 @@ LIMIT 1", array( getModule(), $action, - getWhat(false), + getWhat(FALSE), convertZeroToNull($userid), convertZeroToNull(determineReferralId()), $isMember, diff --git a/inc/filter/politician-stop_filter.php b/inc/filter/politician-stop_filter.php index f16dda3381..915e6613c9 100644 --- a/inc/filter/politician-stop_filter.php +++ b/inc/filter/politician-stop_filter.php @@ -49,7 +49,7 @@ function FILTER_DISPLAY_POLITICIAN_STOP_SNIPPET ($filterData) { if ((isFullPage()) && (isExtensionActive('politician-stop')) && (getModule() != 'admin') && ($GLOBALS['__header_sent'] == 2)) { // Then display it here //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Going to load template ...'); - $filterData .= loadTemplate('politician_stop_snippet', true); + $filterData .= loadTemplate('politician_stop_snippet', TRUE); } // END - if // Return data diff --git a/inc/filter/register_filter.php b/inc/filter/register_filter.php index 58a1da787d..14adc971c1 100644 --- a/inc/filter/register_filter.php +++ b/inc/filter/register_filter.php @@ -110,11 +110,11 @@ function FILTER_PRE_USER_REGISTRATION_GENERIC ($filterData) { setPostRequestElement('remote_addr', detectRemoteAddr()); // Generic initialization is done - $filterData['init_done'] = true; + $filterData['init_done'] = TRUE; // Return it //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); - //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,true).'
'; + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; } diff --git a/inc/filter/surfbar_filter.php b/inc/filter/surfbar_filter.php index ca61910cf5..258954dc9e 100644 --- a/inc/filter/surfbar_filter.php +++ b/inc/filter/surfbar_filter.php @@ -73,11 +73,11 @@ function FILTER_SURFBAR_CHANGE_URL_VALIDATE_DATA ($filterData) { 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!'); - $filterData['abort'] = true; + $filterData['abort'] = TRUE; } elseif ($filterData['data'][$filterData['url_id']]['url_status'] != $filterData['prev_status']) { // Status is not like prevStatus //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, $filterData['data'][$filterData['url_id']]['url_status'] . '!=' . $filterData['prev_status'] . ' - EXIT!'); - $filterData['abort'] = false; + $filterData['abort'] = FALSE; } // END - if // Return filter data diff --git a/inc/filter/theme_filter.php b/inc/filter/theme_filter.php index 9cd0749e5c..742f6b08c8 100644 --- a/inc/filter/theme_filter.php +++ b/inc/filter/theme_filter.php @@ -95,7 +95,7 @@ function FILTER_THEME_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) { // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); - //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,true).'
'; + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; } diff --git a/inc/filter/user_filter.php b/inc/filter/user_filter.php index 150568dbdf..62e6a195fb 100644 --- a/inc/filter/user_filter.php +++ b/inc/filter/user_filter.php @@ -131,7 +131,7 @@ function FILTER_TESTER_USER_REGISTRATION_ADD_SQL_COLUMNS ($filterData) { // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); - //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,true).'
'; + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; } @@ -153,7 +153,7 @@ function FILTER_HANDLE_USER_SUBID ($filterData) { // Return filter data //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Done!'); - //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,true).'
'; + //* NOISY-DEBUG: */ print __FUNCTION__.':filterData=
'.print_r($filterData,TRUE).'
'; return $filterData; } @@ -194,7 +194,7 @@ function FILTER_UPDATE_USER_SUBID ($filterData) { $subId = SQL_ESCAPE(getRequestElement('subid')); // Is the sub id available and registered with referral id? - if (countSumTotalData(getReferralId(), 'user_subids', 'id', 'userid', true, sprintf(" AND `subid`='%s'", $subId)) == 1) { + if (countSumTotalData(getReferralId(), 'user_subids', 'id', 'userid', TRUE, sprintf(" AND `subid`='%s'", $subId)) == 1) { // Sub id is assigned to referral id, so add a record SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_subid_log` @@ -257,11 +257,11 @@ function FILTER_MEMBER_REFLINK_USER_SUBIDS_CONTENT ($content = '') { $out = ''; while ($row = SQL_FETCHARRAY($result)) { // Load row template - $out .= loadTemplate('member_list_reflink_user_subids_row', true, $row); + $out .= loadTemplate('member_list_reflink_user_subids_row', TRUE, $row); } // END - while // Load main template - $content .= loadTemplate('member_list_reflink_user_subids', true, $out); + $content .= loadTemplate('member_list_reflink_user_subids', TRUE, $out); // Free result SQL_FREERESULT($result); diff --git a/inc/filters.php b/inc/filters.php index d69f999d26..1a8a984f0c 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -62,7 +62,7 @@ function FILTER_FLUSH_FILTERS () { } // END - if // Abort silently here - return false; + return FALSE; } // END - if // Nothing is added/remove by default @@ -193,7 +193,7 @@ function FILTER_SOLVE_TASK ($filterData) { adminSolveTask($filterData['task_id']); } else { // Not detectable! - reportBug(__FUNCTION__, __LINE__, sprintf("Cannot resolve task. data[%s]=
%s
", gettype($filterData), print_r($filterData, true))); + reportBug(__FUNCTION__, __LINE__, sprintf("Cannot resolve task. data[%s]=
%s
", gettype($filterData), print_r($filterData, TRUE))); } // Return the data @@ -248,11 +248,11 @@ function FILTER_RUN_SQLS ($filterData) { $count = 0; // Debug message - //* DEBUG: */ die('getSqls()=
'.print_r(getSqls(), true).'
ext_update_depends=
'.print_r($GLOBALS['ext_update_depends'], true).'
'); + //* DEBUG: */ die('getSqls()=
'.print_r(getSqls(), TRUE).'
ext_update_depends=
'.print_r($GLOBALS['ext_update_depends'], TRUE).'
'); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '- Entered!'); // Is the array there? - if ((isSqlsValid()) && ((!isset($filterData['dry_run'])) || ($filterData['dry_run'] == false))) { + if ((isSqlsValid()) && ((!isset($filterData['dry_run'])) || ($filterData['dry_run'] == FALSE))) { // Run SQL commands //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, '- Found ' . countSqls() . ' queries to run.'); foreach (getSqls() as $mode => $sqls) { @@ -266,7 +266,7 @@ function FILTER_RUN_SQLS ($filterData) { // Is 'enable_codes' not set? Then set it to true if (!isset($filterData['enable_codes'])) { - $filterData['enable_codes'] = true; + $filterData['enable_codes'] = TRUE; } // END - if // Is there still a query left? @@ -311,7 +311,7 @@ function FILTER_UPDATE_LOGIN_DATA () { // Recheck if logged in if ((!isMember()) || ((isAdmin()) && (!isDebugModeEnabled()))) { - return false; + return FALSE; } // END - if // Secure user id @@ -430,7 +430,7 @@ function FILTER_DETERMINE_USERNAME () { } // Filter for compiling config entries -function FILTER_COMPILE_CONFIG ($code, $compiled = false) { +function FILTER_COMPILE_CONFIG ($code, $compiled = FALSE) { // Save the uncompiled code $uncompiled = $code; @@ -472,7 +472,7 @@ function FILTER_COMPILE_CONFIG ($code, $compiled = false) { } // END - if // Should we compile it? - if ($compiled === true) { + if ($compiled === TRUE) { // Run the code $eval = "\$GLOBALS['compiled_config'][\$uncompiled] = \"" . $GLOBALS['compiled_config'][$uncompiled] . '";'; //* DEBUG: */ debugOutput(__FUNCTION__.'['.__LINE__.']:
' . encodeEntities($eval) . '
'); @@ -488,7 +488,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($filterData) { // Compile {%cmd,callback,extraFunction=some_value%} to get expression code snippets // See switch() command below for supported commands preg_match_all('/\{%(([a-zA-Z0-9-_,]+)(=([^\}]+)){0,1})*%\}/', $filterData, $matches); - //* DEBUG: */ debugOutput(__FUNCTION__.'['.__LINE__.']:
'.print_r($matches, true).'
'); + //* DEBUG: */ debugOutput(__FUNCTION__.'['.__LINE__.']:
'.print_r($matches, TRUE).'
'); // Default is from outputHtml() $outputMode = getScriptOutputMode(); @@ -832,7 +832,7 @@ function FILTER_LOAD_RUNTIME_INCLUDES () { // Filter for checking admin ACL function FILTER_CHECK_ADMIN_ACL () { // Extension not installed so it's always allowed to access everywhere! - $ret = true; + $ret = TRUE; // Ok, Cookie-Update done if ((isExtensionInstalledAndNewer('admins', '0.3.0')) && (isExtensionActive('admins'))) { @@ -880,7 +880,7 @@ function FILTER_HANDLE_FATAL_ERRORS () { // Is there errors to handle and right output mode? if ((!ifFatalErrorsDetected()) || (!isHtmlOutputMode())) { // Abort executing here - return false; + return FALSE; } // END - if // Set content type @@ -904,11 +904,11 @@ function FILTER_HANDLE_FATAL_ERRORS () { ); // Load row template - $OUT .= loadTemplate('install_fatal_row', true, $content); + $OUT .= loadTemplate('install_fatal_row', TRUE, $content); } // Load main template - $content = loadTemplate('install_fatal_table', true, $OUT); + $content = loadTemplate('install_fatal_table', TRUE, $OUT); } elseif (isInstalled()) { // Display all runtime fatal errors $OUT = ''; @@ -920,11 +920,11 @@ function FILTER_HANDLE_FATAL_ERRORS () { ); // Load row template - $OUT .= loadTemplate('runtime_fatal_row', true, $content); + $OUT .= loadTemplate('runtime_fatal_row', TRUE, $content); } // Load main template - $content = loadTemplate('runtime_fatal_table', true, $OUT); + $content = loadTemplate('runtime_fatal_table', TRUE, $OUT); } // Message to regular users (non-admin) @@ -945,7 +945,7 @@ function FILTER_HANDLE_FATAL_ERRORS () { loadIncludeOnce('inc/header.php'); // Load main template - loadTemplate('fatal_errors', false, $content); + loadTemplate('fatal_errors', FALSE, $content); // Delete all to prevent double-display initFatalMessages(); @@ -964,10 +964,10 @@ function FILTER_DISPLAY_COPYRIGHT () { // Backlink enabled? if (((isConfigEntrySet('ENABLE_BACKLINK')) && (getConfig('ENABLE_BACKLINK') == 'Y')) || (isInstalling())) { // Copyright with backlink, thanks! :-) - $GLOBALS['__page_footer'] .= loadTemplate('copyright_backlink', true); + $GLOBALS['__page_footer'] .= loadTemplate('copyright_backlink', TRUE); } else { // No backlink in Copyright note - $GLOBALS['__page_footer'] .= loadTemplate('copyright', true); + $GLOBALS['__page_footer'] .= loadTemplate('copyright', TRUE); } } // END - if } @@ -1064,12 +1064,12 @@ function FILTER_DO_LOGIN_ADMIN ($filterData) { // Filter for loading page header, this should be ran first! function FILTER_LOAD_PAGE_HEADER () { // Output page header code - $GLOBALS['__page_header'] = loadTemplate('page_header', true); + $GLOBALS['__page_header'] = loadTemplate('page_header', TRUE); // Include meta data in 'guest' module if ((isModuleSet()) && (getModule() == 'index')) { // Load meta data template - $GLOBALS['__page_header'] .= loadTemplate('metadata', true); + $GLOBALS['__page_header'] .= loadTemplate('metadata', TRUE); // Add meta description to header if ((isInstalled()) && (isAdminRegistered()) && (SQL_IS_LINK_UP())) { @@ -1118,7 +1118,7 @@ function FILTER_SET_CURRENT_DATE () { // Filter for marking extension as installed function FILTER_EXTENSION_MARK_INSTALLED ($filterData) { // Mark it as installed - $GLOBALS['ext_is_installed'][$filterData['ext_name']] = true; + $GLOBALS['ext_is_installed'][$filterData['ext_name']] = TRUE; } // Filter for generating mails links for 'pool' mails @@ -1126,7 +1126,7 @@ function FILTER_GENERATE_POOL_MAIL_LINKS ($filterData) { // Is type 'mid'? if ($filterData['type'] == 'mid') { // Load template - $filterData['__output'] .= loadTemplate('admin_links_' . strtolower($filterData['mail_status']) . '_pool_mail', true, $filterData); + $filterData['__output'] .= loadTemplate('admin_links_' . strtolower($filterData['mail_status']) . '_pool_mail', TRUE, $filterData); } // END - if // Return data @@ -1138,7 +1138,7 @@ function FILTER_ACTIVATE_EXCHANGE () { // Is the extension 'user' there? if ((!isExtensionActive('user')) || (getActivateXchange() == '0')) { // Silently abort here - return false; + return FALSE; } // END - if // Check total amount of users diff --git a/inc/fix_filters.php b/inc/fix_filters.php index a181b258ab..299b052f94 100644 --- a/inc/fix_filters.php +++ b/inc/fix_filters.php @@ -55,7 +55,7 @@ if (!SQL_HASZERONUMS($result)) { // Load row by row while ($filter = SQL_FETCHARRAY($result)) { // Now search again for this filter and get it's total count - $count = countSumTotalData($filter['filter_name'], 'filters', 'filter_id', 'filter_name', true, sprintf(" AND `filter_function`='%s'", SQL_ESCAPE($filter['filter_function']))); + $count = countSumTotalData($filter['filter_name'], 'filters', 'filter_id', 'filter_name', TRUE, sprintf(" AND `filter_function`='%s'", SQL_ESCAPE($filter['filter_function']))); // Is there more than one entry? if ($count > 1) { diff --git a/inc/fix_menu.php b/inc/fix_menu.php index 02696bb908..5fbfcab34d 100644 --- a/inc/fix_menu.php +++ b/inc/fix_menu.php @@ -59,10 +59,10 @@ foreach (array('guest','member','admin') as $menu) { // Double entry, so get count if (is_null($entry['what'])) { // Main menu - $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', true, " AND `what` IS NULL"); + $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', TRUE, " AND `what` IS NULL"); } else { // Sub menu - $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', true, sprintf(" AND `what`='%s'", $entry['what'])); + $entries = countSumTotalData($entry['action'], $menu . '_menu', 'action', 'action', TRUE, sprintf(" AND `what`='%s'", $entry['what'])); } //* DEBUG: */ debugOutput('menu='.$menu.',action='.$entry['action'].',what='.$entry['what'].',entries='.$entries); diff --git a/inc/footer.php b/inc/footer.php index 58a447e4f5..cd68a84503 100644 --- a/inc/footer.php +++ b/inc/footer.php @@ -50,7 +50,7 @@ if ((((!isset($GLOBALS['__footer_sent'])) || (($GLOBALS['__footer_sent'] != 1) & runFilterChain('page_footer'); // Load page footer - $GLOBALS['__page_footer'] .= loadTemplate('page_footer', true); + $GLOBALS['__page_footer'] .= loadTemplate('page_footer', TRUE); } // END - if // Footer has been reached diff --git a/inc/functions.php b/inc/functions.php index 951f7e0e18..2a74c533cf 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -192,7 +192,7 @@ function translateYesNo ($yn) { // Translates the american decimal dot into a german comma // OPPOMENT: convertCommaToDot() -function translateComma ($dotted, $cut = true, $max = '0') { +function translateComma ($dotted, $cut = TRUE, $max = '0') { // First, cast all to double, due to PHP changes $dotted = (double) $dotted; @@ -210,7 +210,7 @@ function translateComma ($dotted, $cut = true, $max = '0') { } // END - if // Cut zeros off? - if (($cut === true) && ($max == '0')) { + if (($cut === TRUE) && ($max == '0')) { // Test for commata if in cut-mode $com = explode('.', $dotted); if (count($com) < 2) { @@ -306,7 +306,7 @@ function translateMenuVisibleLocked ($content, $prefix = '') { break; default: // Please report this - reportBug(__FUNCTION__, __LINE__, 'Unsupported visible value detected. content=
' . print_r($content, true) . '
'); + reportBug(__FUNCTION__, __LINE__, 'Unsupported visible value detected. content=
' . print_r($content, TRUE) . '
'); break; } // END - switch @@ -321,7 +321,7 @@ function translateMenuVisibleLocked ($content, $prefix = '') { break; default: // Please report this - reportBug(__FUNCTION__, __LINE__, 'Unsupported locked value detected. content=
' . print_r($content, true) . '
'); + reportBug(__FUNCTION__, __LINE__, 'Unsupported locked value detected. content=
' . print_r($content, TRUE) . '
'); break; } // END - switch @@ -401,7 +401,7 @@ function makeTime ($hours, $minutes, $seconds, $stamp) { } // Redirects to an URL and if neccessarry extends it with own base URL -function redirectToUrl ($url, $allowSpider = true) { +function redirectToUrl ($url, $allowSpider = TRUE) { // Is the output mode -2? if (isAjaxOutputMode()) { // This is always (!) an AJAX request and shall not be redirected @@ -433,11 +433,11 @@ function redirectToUrl ($url, $allowSpider = true) { // We should not sent a redirect if headers are already sent if (!headers_sent()) { // Load URL when headers are not sent - sendRawRedirect(doFinalCompilation(str_replace('&', '&', $url), false)); + sendRawRedirect(doFinalCompilation(str_replace('&', '&', $url), FALSE)); } else { // Output error message loadInclude('inc/header.php'); - loadTemplate('redirect_url', false, str_replace('&', '&', $url)); + loadTemplate('redirect_url', FALSE, str_replace('&', '&', $url)); loadInclude('inc/footer.php'); } @@ -454,26 +454,26 @@ function redirectToUrl ($url, $allowSpider = true) { * $a_sort - Array, das die Sortiereihenfolge der ersten Elementeben * * $primary_key - Primaerschl.ssel aus $a_sort, nach dem sortiert wird * * $order - Sortiereihenfolge: -1 = a-Z, 0 = keine, 1 = Z-a * - * $nums - true = Als Zahlen sortieren, false = Als Zeichen sortieren * + * $nums - TRUE = Als Zahlen sortieren, FALSE = Als Zeichen sortieren * * * * $a_sort muss Elemente enthalten, deren Wert Schluessel von $array * * sind... Klingt kompliziert, suchen Sie mal mein Beispiel, dann sehen * * Sie, dass es doch nicht so schwer ist! :-) * * * ************************************************************************/ -function array_pk_sort (&$array, $a_sort, $primary_key = '0', $order = -1, $nums = false) { +function array_pk_sort (&$array, $a_sort, $primary_key = '0', $order = -1, $nums = FALSE) { $temporaryArray = $array; while ($primary_key < count($a_sort)) { foreach ($temporaryArray[$a_sort[$primary_key]] as $key => $value) { foreach ($temporaryArray[$a_sort[$primary_key]] as $key2 => $value2) { - $match = false; - if ($nums === false) { + $match = FALSE; + if ($nums === FALSE) { // Sort byte-by-byte (also numbers will be interpreted as chars! E.g.: "9" > "10") - if (($key != $key2) && (strcmp(strtolower($temporaryArray[$a_sort[$primary_key]][$key]), strtolower($temporaryArray[$a_sort[$primary_key]][$key2])) == $order)) $match = true; + if (($key != $key2) && (strcmp(strtolower($temporaryArray[$a_sort[$primary_key]][$key]), strtolower($temporaryArray[$a_sort[$primary_key]][$key2])) == $order)) $match = TRUE; } elseif ($key != $key2) { // Sort numbers (E.g.: 9 < 10) - if (($temporaryArray[$a_sort[$primary_key]][$key] < $temporaryArray[$a_sort[$primary_key]][$key2]) && ($order == -1)) $match = true; - if (($temporaryArray[$a_sort[$primary_key]][$key] > $temporaryArray[$a_sort[$primary_key]][$key2]) && ($order == 1)) $match = true; + if (($temporaryArray[$a_sort[$primary_key]][$key] < $temporaryArray[$a_sort[$primary_key]][$key2]) && ($order == -1)) $match = TRUE; + if (($temporaryArray[$a_sort[$primary_key]][$key] > $temporaryArray[$a_sort[$primary_key]][$key2]) && ($order == 1)) $match = TRUE; } if ($match) { @@ -567,19 +567,19 @@ function generateRandomCode ($length, $code, $userid, $extraData = '') { } // Does only allow numbers -function bigintval ($num, $castValue = true, $abortOnMismatch = true) { +function bigintval ($num, $castValue = TRUE, $abortOnMismatch = TRUE) { //* DEBUG: */ debugOutput('[' . __FUNCTION__ . ':' . __LINE__ . '] ' . 'num=' . $num . ',castValue=' . intval($castValue) . ',abortOnMismatch=' . intval($abortOnMismatch) . ' - ENTERED!'); // Filter all numbers out $ret = preg_replace('/[^0123456789]/', '', $num); // Shall we cast? - if ($castValue === true) { + if ($castValue === TRUE) { // Cast to biggest numeric type $ret = (double) $ret; } // END - if // Has the whole value changed? - if (('' . $ret . '' != '' . $num . '') && ($abortOnMismatch === true) && (!is_null($num))) { + if (('' . $ret . '' != '' . $num . '') && ($abortOnMismatch === TRUE) && (!is_null($num))) { // Log the values reportBug(__FUNCTION__, __LINE__, 'Problem with number found. ret[' . gettype($ret) . ']=' . $ret . ', num[' . gettype($num) . ']='. $num); } // END - if @@ -632,7 +632,7 @@ function createEpocheTimeFromSelections ($prefix, $postData) { // Creates a 'fancy' human-readable timestamp from a Uni* stamp function createFancyTime ($stamp) { // Get data array with years/months/weeks/days/... - $data = createTimeSelections($stamp, '', '', '', true); + $data = createTimeSelections($stamp, '', '', '', TRUE); $ret = ''; foreach ($data as $k => $v) { if ($v > 0) { @@ -680,21 +680,21 @@ function isEmailValid ($email) { } // Function taken from user comments on www.php.net / function isInStringIgnoreCase() -function isUrlValid ($url, $compile = true) { +function isUrlValid ($url, $compile = TRUE) { // Trim URL a little $url = trim(urldecode($url)); //* DEBUG: */ debugOutput($url); // Compile some chars out... - if ($compile === true) { - $url = compileUriCode($url, false, false, false); + if ($compile === TRUE) { + $url = compileUriCode($url, FALSE, FALSE, FALSE); } // END - if //* DEBUG: */ debugOutput($url); // Check for the extension filter if (isExtensionActive('filter')) { // Use the extension's filter set - return FILTER_VALIDATE_URL($url, false); + return FILTER_VALIDATE_URL($url, FALSE); } // END - if /* @@ -705,7 +705,7 @@ function isUrlValid ($url, $compile = true) { } // Generate a hash for extra-security for all passwords -function generateHash ($plainText, $salt = '', $hash = true) { +function generateHash ($plainText, $salt = '', $hash = TRUE) { // Debug output //* DEBUG: */ debugOutput('plainText('.strlen($plainText).')=' . $plainText . ',salt('.strlen($salt).')=' . $salt . ',hash=' . intval($hash)); @@ -713,7 +713,7 @@ function generateHash ($plainText, $salt = '', $hash = true) { // 123 4 43 3 4 432 2 3 32 2 3 32 2 3 3 21 if (((isExtensionInstalledAndOlder('sql_patches', '0.3.6')) && (empty($salt))) || (!isExtensionActive('sql_patches')) || (!isExtensionInstalledAndNewer('other', '0.2.5')) || (strlen($salt) == 32)) { // Extension ext-sql_patches is missing/outdated so we hash the plain text with MD5 - if ($hash === true) { + if ($hash === TRUE) { // Is plain password return md5($plainText); } else { @@ -737,7 +737,7 @@ function generateHash ($plainText, $salt = '', $hash = true) { $keys = getSiteKey() . getEncryptSeparator() . getDateKey() . getEncryptSeparator() . getSecretKey() . getEncryptSeparator() . getFileHash() . getEncryptSeparator() . getDateFromRepository() . getEncryptSeparator() . getMasterSalt(); // Additional data - $data = $plainText . getEncryptSeparator() . uniqid(mt_rand(), true) . getEncryptSeparator() . time(); + $data = $plainText . getEncryptSeparator() . uniqid(mt_rand(), TRUE) . getEncryptSeparator() . time(); // Calculate number for generating the code $a = time() + getConfig('_ADD') - 1; @@ -1020,7 +1020,7 @@ function debug_get_mailable_backtrace () { // Generates a ***weak*** seed function generateSeed () { - return microtime(true) * 100000; + return microtime(TRUE) * 100000; } // Converts a message code to a human-readable message @@ -1071,7 +1071,7 @@ function getMessageFromErrorCode ($code) { case getCode('LOGIN_EMPTY_PASSWORD'): $message = '{--LOGIN_PASSWORD_IS_EMPTY--}'; break; case getCode('ERROR_MAILID'): - if (isExtensionActive('mailid', true)) { + if (isExtensionActive('mailid', TRUE)) { $message = '{--ERROR_CONFIRMING_MAIL--}'; } else { $message = '{%pipe,generateExtensionInactiveNotInstalledMessage=mailid%}'; @@ -1110,7 +1110,7 @@ function getMessageFromErrorCode ($code) { $content['seconds'] = round(getUrlTlock() - $content['hours'] * 60 * 60 - $content['minutes'] * 60); // Finally contruct the message - $message = loadTemplate('tlock_message', true, $content); + $message = loadTemplate('tlock_message', TRUE, $content); break; default: @@ -1169,7 +1169,7 @@ function isUrlValidSimple ($url) { $pattern['ipg12'] = $http . $ip . $getstring1; // Test all patterns - $reg = false; + $reg = FALSE; foreach ($pattern as $key => $pat) { // Debug regex? if (isDebugRegularExpressionEnabled()) { @@ -1183,7 +1183,7 @@ function isUrlValidSimple ($url) { $reg = ($reg || preg_match(('^' . $pat . '^'), $url)); // Does it match? - if ($reg === true) { + if ($reg === TRUE) { break; } // END - if } // END - foreach @@ -1197,10 +1197,10 @@ function isUrlValidSimple ($url) { // @TODO Rewrite this function to use readFromFile() and writeToFile() function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek=0) { // Initialize some variables - $done = false; + $done = FALSE; $seek++; $next = -1; - $found = false; + $found = FALSE; // Is the file there and read-/write-able? if ((isFileReadable($FQFN)) && (is_writeable($FQFN))) { @@ -1218,7 +1218,7 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek=0 // Is the resource again valid? if (is_resource($fp_tmp)) { // Mark temporary file as readable - $GLOBALS['file_readable'][$tmp] = true; + $GLOBALS['file_readable'][$tmp] = TRUE; // Start reading while (!feof($fp)) { @@ -1227,7 +1227,7 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek=0 if (isInString($search, $line)) { $next = '0'; - $found = true; + $found = TRUE; } // END - if if ($next > -1) { @@ -1247,17 +1247,17 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek=0 fclose($fp_tmp); // Finished writing tmp file - $done = true; + $done = TRUE; } // END - if // Close source file fclose($fp); - if (($done === true) && ($found === true)) { + if (($done === TRUE) && ($found === TRUE)) { // Copy back tmp file and delete tmp :-) copyFileVerified($tmp, $FQFN, 0644); return removeFile($tmp); - } elseif ($found === false) { + } elseif ($found === FALSE) { outputHtml('CHANGE: 404!'); } else { outputHtml('TMP: UNDONE!'); @@ -1269,18 +1269,18 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek=0 } // An error was detected! - return false; + return FALSE; } // Debug message logger function logDebugMessage ($funcFile, $line, $message, $force=true) { // Is debug mode enabled? - if ((isDebugModeEnabled()) || ($force === true)) { + if ((isDebugModeEnabled()) || ($force === TRUE)) { // Remove CRLF $message = str_replace(array(chr(13), chr(10)), array('', ''), $message); // Log this message away - appendLineToFile(getPath() . getCachePath() . 'debug.log', generateDateTime(time(), '4') . '|' . getModule(false) . '|' . basename($funcFile) . '|' . $line . '|' . $message); + appendLineToFile(getPath() . getCachePath() . 'debug.log', generateDateTime(time(), '4') . '|' . getModule(FALSE) . '|' . basename($funcFile) . '|' . $line . '|' . $message); } // END - if } @@ -1294,7 +1294,7 @@ function handleExtraValues ($filterFunction, $value, $extraValue) { // Does the filter function exist? if (function_exists($filterFunction)) { // Is there extra parameters here? - if (!empty($extraValue)) { + if ((!is_null($extraValue)) && (!empty($extraValue))) { // Put both parameters in one new array by default $args = array($value, $extraValue); @@ -1308,16 +1308,17 @@ function handleExtraValues ($filterFunction, $value, $extraValue) { $ret = call_user_func_array($filterFunction, $args); // Is $ret 'true'? - if ($ret === true) { + if ($ret === TRUE) { // Test passed, so write direct value $ret = $args; } // END - if } else { // One parameter call $ret = call_user_func($filterFunction, $value); + //* BUG */ die('ret['.gettype($ret).']=' . $ret . ',value=' . $value.',filterFunction=' . $filterFunction); // Is $ret 'true'? - if ($ret === true) { + if ($ret === TRUE) { // Test passed, so write direct value $ret = $value; } // END - if @@ -1332,7 +1333,7 @@ function handleExtraValues ($filterFunction, $value, $extraValue) { // Converts timestamp selections into a timestamp function convertSelectionsToEpocheTime (array &$postData, array &$content, &$id, &$skip) { // Init test variable - $skip = false; + $skip = FALSE; $test2 = ''; // Get last three chars @@ -1346,7 +1347,7 @@ function convertSelectionsToEpocheTime (array &$postData, array &$content, &$id, // Generate timestamp $postData[$test] = createEpocheTimeFromSelections($test, $postData); array_push($content, sprintf("`%s`='%s'", $test, $postData[$test])); - $GLOBALS['skip_config'][$test] = true; + $GLOBALS['skip_config'][$test] = TRUE; // Remove data from array foreach (array('ye', 'mo', 'we', 'da', 'ho', 'mi', 'se') as $rem) { @@ -1355,7 +1356,7 @@ function convertSelectionsToEpocheTime (array &$postData, array &$content, &$id, // Skip adding unset($id); - $skip = true; + $skip = TRUE; $test2 = $test; } // END - if } // END - if @@ -1365,7 +1366,7 @@ function convertSelectionsToEpocheTime (array &$postData, array &$content, &$id, // OPPOMENT: translateComma() function convertCommaToDot ($str) { // Default float is not a float... ;-) - $float = false; + $float = FALSE; // Which language is selected? switch (getLanguage()) { @@ -1404,7 +1405,7 @@ function handleLoginFailures ($accessLevel) { ); // Load template - $OUT = loadTemplate('login_failures', true, $content); + $OUT = loadTemplate('login_failures', TRUE, $content); } // END - if // Reset session data @@ -1417,7 +1418,7 @@ function handleLoginFailures ($accessLevel) { } // Rebuild cache -function rebuildCache ($cache, $inc = '', $force = false) { +function rebuildCache ($cache, $inc = '', $force = FALSE) { // Debug message //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("cache=%s, inc=%s, force=%s", $cache, $inc, intval($force))); @@ -1448,7 +1449,7 @@ function rebuildCache ($cache, $inc = '', $force = false) { } // Determines the real remote address -function determineRealRemoteAddress ($remoteAddr = false) { +function determineRealRemoteAddress ($remoteAddr = FALSE) { // Default is 127.0.0.1 $address = '127.0.0.1'; @@ -1476,7 +1477,7 @@ function determineRealRemoteAddress ($remoteAddr = false) { // Adds a bonus mail to the queue // This is a high-level function! -function addNewBonusMail ($data, $mode = '', $output = true) { +function addNewBonusMail ($data, $mode = '', $output = TRUE) { // Use mode from data if not set and availble ;-) if ((empty($mode)) && (isset($data['mail_mode']))) { $mode = $data['mail_mode']; @@ -1501,10 +1502,10 @@ function addNewBonusMail ($data, $mode = '', $output = true) { ); // Mail inserted into bonus pool - if ($output === true) { + if ($output === TRUE) { displayMessage('{--ADMIN_BONUS_SEND--}'); } // END - if - } elseif ($output === true) { + } elseif ($output === TRUE) { // More entered than can be reached! displayMessage('{--ADMIN_MORE_SELECTED--}'); } else { @@ -1516,7 +1517,7 @@ function addNewBonusMail ($data, $mode = '', $output = true) { // Enables the reset mode and runs it function doReset () { // Enable the reset mode - $GLOBALS['reset_enabled'] = true; + $GLOBALS['reset_enabled'] = TRUE; // Run filters runFilterChain('reset'); @@ -1525,7 +1526,7 @@ function doReset () { // Enables the reset mode (hourly, weekly and monthly) and runs it function doHourly () { // Enable the hourly reset mode - $GLOBALS['hourly_enabled'] = true; + $GLOBALS['hourly_enabled'] = TRUE; // Run filters (one always!) runFilterChain('hourly'); @@ -1623,7 +1624,7 @@ function isExtraTitleSet () { * @param $suffix Suffix for positive matches ($extension will be appended, too) * @return $foundMatches All found positive matches for above criteria */ -function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $addBaseDir = true, $excludeArray = array(), $extension = '.php', $excludePattern = '@(\.|\.\.)$@', $recursive = true, $suffix = '') { +function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = FALSE, $addBaseDir = TRUE, $excludeArray = array(), $extension = '.php', $excludePattern = '@(\.|\.\.)$@', $recursive = TRUE, $suffix = '') { // Add default entries we should always exclude array_unshift($excludeArray, '.', '..', '.svn', '.htaccess'); @@ -1637,7 +1638,7 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad // Read all entries while ($baseFile = readdir($dirPointer)) { // Exclude '.', '..' and entries in $excludeArray automatically - if (in_array($baseFile, $excludeArray, true)) { + if (in_array($baseFile, $excludeArray, TRUE)) { // Exclude them //* DEBUG: */ debugOutput('excluded=' . $baseFile); continue; @@ -1660,7 +1661,7 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad } // END - if // Skip also files with non-matching prefix genericly - if (($recursive === true) && (isDirectory($FQFN))) { + if (($recursive === TRUE) && (isDirectory($FQFN))) { // Is a redirectory so read it as well $foundMatches = merge_array($foundMatches, getArrayFromDirectory($baseDir . $baseFile . '/', $prefix, $fileIncludeDirs, $addBaseDir, $excludeArray, $extension, $excludePattern, $recursive)); @@ -1692,14 +1693,14 @@ function getArrayFromDirectory ($baseDir, $prefix, $fileIncludeDirs = false, $ad // Is the file a PHP script or other? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'baseDir=' . $baseDir . ',prefix=' . $prefix . ',baseFile=' . $baseFile); - if (($fileExtension == '.php') || (($fileIncludeDirs === true) && (isDirectory($FQFN)))) { + if (($fileExtension == '.php') || (($fileIncludeDirs === TRUE) && (isDirectory($FQFN)))) { // Is this a valid include file? if ($extension == '.php') { // Remove both for extension name $extName = substr($baseFile, strlen($prefix), -4); // Add file with or without base path - if ($addBaseDir === true) { + if ($addBaseDir === TRUE) { // With base path array_push($foundMatches, $fileName); } else { @@ -1761,7 +1762,7 @@ function addSqlToDebug ($result, $sqlString, $timing, $F, $L) { } // END - if // Don't execute anything here if we don't need or ext-other is missing - if ($GLOBALS['debug_sql_available'] === false) { + if ($GLOBALS['debug_sql_available'] === FALSE) { return; } // END - if @@ -1772,7 +1773,7 @@ function addSqlToDebug ($result, $sqlString, $timing, $F, $L) { } // END - if // Remeber this as profiled (or not, but we don't care here) - $GLOBALS['debug_sqls'][$F][$L][$sqlString] = true; + $GLOBALS['debug_sqls'][$F][$L][$sqlString] = TRUE; // Generate record $record = array( @@ -1864,7 +1865,7 @@ function encodeUrl ($url, $outputMode = '0') { } // END - if // Is there a valid session? - if (((!isset($GLOBALS['valid_session'])) || ($GLOBALS['valid_session'] === false) || (!isset($_COOKIE[session_name()]))) && (isSpider() === false)) { + if (((!isset($GLOBALS['valid_session'])) || ($GLOBALS['valid_session'] === FALSE) || (!isset($_COOKIE[session_name()]))) && (isSpider() === FALSE)) { // Determine right separator $separator = '&'; if (!isInString('?', $url)) { @@ -1900,12 +1901,12 @@ function encodeUrl ($url, $outputMode = '0') { // Simple check for spider function isSpider () { // Get the UA and trim it down - $userAgent = trim(detectUserAgent(true)); + $userAgent = trim(detectUserAgent(TRUE)); // It should not be empty, if so it is better a spider/bot if (empty($userAgent)) { // It is a spider/bot - return true; + return TRUE; } // END - if // Is it a spider? @@ -1920,7 +1921,7 @@ function searchDirsRecursive ($dir, &$last_changed, $lookFor = 'Date') { // RegexPattern to exclude ., .., .revision, .svn, debug.log or .cache in the filenames $excludePattern = '@(\.revision|\.svn|debug\.log|\.cache|config\.php)$@'; - $ds = getArrayFromDirectory($dir, '', false, true, array(), '.php', $excludePattern); + $ds = getArrayFromDirectory($dir, '', FALSE, TRUE, array(), '.php', $excludePattern); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count(ds)='.count($ds)); // Walk through all entries @@ -2147,7 +2148,7 @@ function detectMultiBytePrefix ($str) { $mbPrefix = ''; // Detect multi-byte (strictly) - if (mb_detect_encoding($str, 'auto', true) !== false) { + if (mb_detect_encoding($str, 'auto', TRUE) !== FALSE) { // With multi-byte encoded string $mbPrefix = 'mb_'; } // END - if @@ -2165,7 +2166,7 @@ function getArrayKeysFromSubStrArray ($heystack, $needles, $offset = 0) { foreach ($needles as $key => $needle) { // Is there found a partial string? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'heystack='.$heystack.',key='.$key.',needle='.$needle.',offset='.$offset); - if (strpos($heystack, $needle, $offset) !== false) { + if (strpos($heystack, $needle, $offset) !== FALSE) { // Add the found key array_push($keys, $key); } // END - if @@ -2182,7 +2183,7 @@ function determinePointsColumnFromSubjectLocked ($subject, $locked) { $pointsColumn = 'points'; // Which points, locked or normal? - if ($locked === true) { + if ($locked === TRUE) { $pointsColumn = 'locked_points'; } // END - if @@ -2208,7 +2209,7 @@ function determinePointsColumnFromSubjectLocked ($subject, $locked) { function convertBooleanToYesNo ($boolean) { // Default is 'N' $converted = 'N'; - if ($boolean === true) { + if ($boolean === TRUE) { // Set 'Y' $converted = 'Y'; } // END - if @@ -2287,7 +2288,7 @@ function memberAddEntries ($tableName, $columns = array(), $filterFunctions = ar // Is it a member? if (!isMember()) { // Then abort here - return false; + return FALSE; } // END - if // Set POST data generic userid @@ -2297,7 +2298,7 @@ function memberAddEntries ($tableName, $columns = array(), $filterFunctions = ar doGenericAddEntries($tableName, $columns, $filterFunctions, $extraValues, $timeColumns, $columnIndex); // Entry has been added? - if ((!SQL_HASZEROAFFECTED()) && ($GLOBALS['__XML_PARSE_RESULT'] === true)) { + if ((!SQL_HASZEROAFFECTED()) && ($GLOBALS['__XML_PARSE_RESULT'] === TRUE)) { // Display success message displayMessage('{--MEMBER_ENTRY_ADDED--}'); } else { @@ -2307,7 +2308,7 @@ function memberAddEntries ($tableName, $columns = array(), $filterFunctions = ar } // Edit rows by given id numbers -function memberEditEntriesConfirm ($tableName, $columns = array(), $filterFunctions = array(), $extraValues = array(), $timeColumns = array(), $editNow = array(false), $idColumn = array('id'), $userIdColumn = array('userid'), $rawUserId = array('userid'), $cacheFiles = array()) { +function memberEditEntriesConfirm ($tableName, $columns = array(), $filterFunctions = array(), $extraValues = array(), $timeColumns = array(), $editNow = array(FALSE), $idColumn = array('id'), $userIdColumn = array('userid'), $rawUserId = array('userid'), $cacheFiles = array()) { // $tableName must be an array if ((!is_array($tableName)) || (count($tableName) != 1)) { // No tableName specified @@ -2324,7 +2325,7 @@ function memberEditEntriesConfirm ($tableName, $columns = array(), $filterFuncti } // END - if // Shall we change here or list for editing? - if ($editNow[0] === true) { + if ($editNow[0] === TRUE) { // Add generic userid field setPostRequestElement('userid', getMemberId()); @@ -2346,7 +2347,7 @@ function memberEditEntriesConfirm ($tableName, $columns = array(), $filterFuncti } // Delete rows by given id numbers -function memberDeleteEntriesConfirm ($tableName, $columns = array(), $filterFunctions = array(), $extraValues = array(), $deleteNow = array(false), $idColumn = array('id'), $userIdColumn = array('userid'), $rawUserId = array('userid'), $cacheFiles = array()) { +function memberDeleteEntriesConfirm ($tableName, $columns = array(), $filterFunctions = array(), $extraValues = array(), $deleteNow = array(FALSE), $idColumn = array('id'), $userIdColumn = array('userid'), $rawUserId = array('userid'), $cacheFiles = array()) { // Do this only for members assert(isMember()); @@ -2366,7 +2367,7 @@ function memberDeleteEntriesConfirm ($tableName, $columns = array(), $filterFunc } // END - if // Shall we delete here or list for deletion? - if ($deleteNow[0] === true) { + if ($deleteNow[0] === TRUE) { // Add generic userid field setPostRequestElement('userid', getMemberId()); diff --git a/inc/gen_mediadata.php b/inc/gen_mediadata.php index 686808daca..6821e945fa 100644 --- a/inc/gen_mediadata.php +++ b/inc/gen_mediadata.php @@ -65,7 +65,7 @@ SQL_FREERESULT($result_media); // Check for bonus extension if (isExtensionActive('bonus')) { // Count bonus mails - $bcount = countSumTotalData('', 'bonus', 'id', '', true); + $bcount = countSumTotalData('', 'bonus', 'id', '', TRUE); // Check for bonus mails $result_media = SQL_QUERY('SELECT @@ -88,7 +88,7 @@ loadIncludeOnce('inc/libs/mediadata_functions.php'); // Insert info to database updateMediadataEntry(array('total_send' , 'normal_send') , 'init', $content['normal_send']); updateMediadataEntry(array('total_clicks', 'normal_clicks'), 'init', $content['normal_clicks']); -updateMediadataEntry(array('total_orders', 'normal_orders'), 'init', countSumTotalData('', 'user_stats', 'id', '', true)); +updateMediadataEntry(array('total_orders', 'normal_orders'), 'init', countSumTotalData('', 'user_stats', 'id', '', TRUE)); updateMediadataEntry(array('total_send' , 'bonus_send' ) , 'init', $content['bonus_send']); updateMediadataEntry(array('total_clicks', 'bonus_clicks') , 'init', $content['bonus_clicks']); updateMediadataEntry(array('total_orders', 'bonus_orders') , 'init', $bcount); diff --git a/inc/handler.php b/inc/handler.php index 8aa40ee08f..84176c10b7 100644 --- a/inc/handler.php +++ b/inc/handler.php @@ -56,7 +56,7 @@ function __errorHandler ($errno, $errstr, $errfile, $errline) { // Init error handler function initErrorHandler () { - enableExitOnError(false); + enableExitOnError(FALSE); } // Enable exit on error diff --git a/inc/http-functions.php b/inc/http-functions.php index 5715c6edd0..4b59018c63 100644 --- a/inc/http-functions.php +++ b/inc/http-functions.php @@ -144,7 +144,7 @@ function removeHttpHostNameFromUrl ($url) { } // Sends a HTTP request (GET, POST, HEAD are currently supported) -function sendHttpRequest ($requestType, $baseUrl, $requestData = array(), $removeHeader = false) { +function sendHttpRequest ($requestType, $baseUrl, $requestData = array(), $removeHeader = FALSE) { // Init response $response = array(); @@ -189,7 +189,7 @@ function sendHeadRequest ($baseUrl, $requestData = array()) { $host = extractHostnameFromUrl($baseUrl); // Generate HEAD request header - $request = 'HEAD ' . (isProxyUsed() === true ? $baseUrl : '') . trim($getUrl) . ' HTTP/1.1' . getConfig('HTTP_EOL'); + $request = 'HEAD ' . (isProxyUsed() === TRUE ? $baseUrl : '') . trim($getUrl) . ' HTTP/1.1' . getConfig('HTTP_EOL'); $request .= 'Host: ' . $host . getConfig('HTTP_EOL'); $request .= 'Referer: ' . getUrl() . '/admin.php' . getConfig('HTTP_EOL'); if (isConfigEntrySet('FULL_VERSION')) { @@ -211,7 +211,7 @@ function sendHeadRequest ($baseUrl, $requestData = array()) { } // Send a GET request -function sendGetRequest ($baseUrl, $requestData = array(), $removeHeader = false) { +function sendGetRequest ($baseUrl, $requestData = array(), $removeHeader = FALSE) { // Generate full GET URL $getUrl = generateGetUrlFromBaseUrlData($baseUrl, $requestData); @@ -228,7 +228,7 @@ function sendGetRequest ($baseUrl, $requestData = array(), $removeHeader = false $host = extractHostnameFromUrl($baseUrl); // Generate GET request header - $request = 'GET ' . (isProxyUsed() === true ? $baseUrl : '') . trim($getUrl) . ' HTTP/1.1' . getConfig('HTTP_EOL'); + $request = 'GET ' . (isProxyUsed() === TRUE ? $baseUrl : '') . trim($getUrl) . ' HTTP/1.1' . getConfig('HTTP_EOL'); $request .= 'Host: ' . $host . getConfig('HTTP_EOL'); $request .= 'Referer: ' . getUrl() . '/admin.php' . getConfig('HTTP_EOL'); if (isConfigEntrySet('FULL_VERSION')) { @@ -246,7 +246,7 @@ function sendGetRequest ($baseUrl, $requestData = array(), $removeHeader = false $response = sendRawRequest($host, $request); // Should we remove header lines? - if ($removeHeader === true) { + if ($removeHeader === TRUE) { // Okay, remove them $response = removeHttpHeaderFromResponse($response); } // END - if @@ -256,7 +256,7 @@ function sendGetRequest ($baseUrl, $requestData = array(), $removeHeader = false } // Send a POST request, sometimes even POST requests have no parameters -function sendPostRequest ($baseUrl, $requestData = array(), $removeHeader = false) { +function sendPostRequest ($baseUrl, $requestData = array(), $removeHeader = FALSE) { // Copy baseUrl to getUrl $getUrl = $baseUrl; @@ -276,7 +276,7 @@ function sendPostRequest ($baseUrl, $requestData = array(), $removeHeader = fals $body = http_build_query($requestData, '', '&'); // Generate POST request header - $request = 'POST ' . (isProxyUsed() === true ? $baseUrl : '') . trim($baseUrl) . ' HTTP/1.0' . getConfig('HTTP_EOL'); + $request = 'POST ' . (isProxyUsed() === TRUE ? $baseUrl : '') . trim($baseUrl) . ' HTTP/1.0' . getConfig('HTTP_EOL'); $request .= 'Host: ' . $host . getConfig('HTTP_EOL'); $request .= 'Referer: ' . getUrl() . '/admin.php' . getConfig('HTTP_EOL'); if (isConfigEntrySet('FULL_VERSION')) { @@ -299,7 +299,7 @@ function sendPostRequest ($baseUrl, $requestData = array(), $removeHeader = fals $response = sendRawRequest($host, $request); // Should we remove header lines? - if ($removeHeader === true) { + if ($removeHeader === TRUE) { // Okay, remove them $response = removeHttpHeaderFromResponse($response); } // END - if @@ -322,7 +322,7 @@ function sendRawRequest ($host, $request) { $response = array('', '', ''); // Default is non-broken HTTP server implementation - $GLOBALS['is_http_server_broken'] = false; + $GLOBALS['is_http_server_broken'] = FALSE; // Load include loadIncludeOnce('inc/classes/resolver.class.php'); @@ -345,7 +345,7 @@ function sendRawRequest ($host, $request) { $proxyHost = compileRawCode(getProxyHost()); // Open connection - if (isProxyUsed() === true) { + if (isProxyUsed() === TRUE) { // Resolve hostname into IP address $ip = $resolver->resolveHostname($proxyHost); @@ -372,7 +372,7 @@ function sendRawRequest ($host, $request) { } // Shall proxy be used? - if (isProxyUsed() === true) { + if (isProxyUsed() === TRUE) { // Setup proxy tunnel $response = setupProxyTunnel($host, $proxyHost, $port, $resource); @@ -388,7 +388,7 @@ function sendRawRequest ($host, $request) { fwrite($resource, $request); // Start counting - $start = microtime(true); + $start = microtime(TRUE); // Read response while (!feof($resource)) { @@ -396,7 +396,7 @@ function sendRawRequest ($host, $request) { $info = stream_get_meta_data($resource); // Is it timed out? 15 seconds is a really patient... - if (($info['timed_out'] == true) || (microtime(true) - $start) > 15) { + if (($info['timed_out'] == TRUE) || (microtime(TRUE) - $start) > 15) { // Timeout logDebugMessage(__FUNCTION__, __LINE__, 'Timed out to get data from host ' . $host); @@ -433,7 +433,7 @@ function sendRawRequest ($host, $request) { // Time request if debug-mode is enabled if (isDebugModeEnabled()) { // Add debug message... - logDebugMessage(__FUNCTION__, __LINE__, 'Request took ' . (microtime(true) - $start) . ' seconds and returned ' . count($response) . ' line(s).'); + logDebugMessage(__FUNCTION__, __LINE__, 'Request took ' . (microtime(TRUE) - $start) . ' seconds and returned ' . count($response) . ' line(s).'); } // END - if // Skip first empty lines @@ -452,15 +452,15 @@ function sendRawRequest ($host, $request) { } } // END - foreach - //* DEBUG: */ debugOutput('Request:
'.print_r($request, true).'
'); - //* DEBUG: */ debugOutput('Response:
'.print_r($response, true).'
'); + //* DEBUG: */ debugOutput('Request:
'.print_r($request, TRUE).'
'); + //* DEBUG: */ debugOutput('Response:
'.print_r($response, TRUE).'
'); // Proxy agent found or something went wrong? if (!isset($response[0])) { // No response, maybe timeout $response = array('', '', ''); logDebugMessage(__FUNCTION__, __LINE__, 'Invalid empty response array, maybe timed out?'); - } elseif ((substr(strtolower($response[0]), 0, 11) == 'proxy-agent') && (isProxyUsed() === true)) { + } elseif ((substr(strtolower($response[0]), 0, 11) == 'proxy-agent') && (isProxyUsed() === TRUE)) { // Proxy header detected, so remove two lines array_shift($response); array_shift($response); @@ -525,7 +525,7 @@ function setupProxyTunnel ($host, $proxyHost, $port, $resource) { // Check array for chuncked encoding function unchunkHttpResponse ($response) { // Default is not chunked - $isChunked = false; + $isChunked = FALSE; // Check if we have chunks foreach ($response as $line) { @@ -535,16 +535,16 @@ function unchunkHttpResponse ($response) { // Entry found? if ((isInStringIgnoreCase('transfer-encoding', $line)) && (isInStringIgnoreCase('chunked', $line))) { // Found! - $isChunked = true; + $isChunked = TRUE; break; } // END - if } // END - foreach // Is it chunked? - if ($isChunked === true) { + if ($isChunked === TRUE) { // Good, we still have the HTTP headers in there, so we need to get rid // of them temporarly - //* DEBUG: */ die('
'.htmlentities(print_r(removeHttpHeaderFromResponse($response), true)).'
'); + //* DEBUG: */ die('
'.htmlentities(print_r(removeHttpHeaderFromResponse($response), TRUE)).'
'); $tempResponse = http_chunked_decode(implode('', removeHttpHeaderFromResponse($response))); // We got a string back from http_chunked_decode(), so we need to convert it back to an array @@ -595,7 +595,7 @@ function removeHttpHeaderFromResponse ($response) { // Returns the flag if a broken HTTP server implementation was detected function isBrokenHttpServerImplentation () { // Determine it - $isBroken = ((isset($GLOBALS['is_http_server_broken'])) && ($GLOBALS['is_http_server_broken'] === true)); + $isBroken = ((isset($GLOBALS['is_http_server_broken'])) && ($GLOBALS['is_http_server_broken'] === TRUE)); // ... and return it return $isBroken; diff --git a/inc/inc-functions.php b/inc/inc-functions.php index 13ce10c5fd..e650578636 100644 --- a/inc/inc-functions.php +++ b/inc/inc-functions.php @@ -93,7 +93,7 @@ function removeIncludeFromPool ($pool, $inc) { $key = array_search($inc, getIncludePool($pool)); // Is it valid? - if ($key !== false) { + if ($key !== FALSE) { // Then remove it unset($GLOBALS['inc_pool'][$pool][$key]); diff --git a/inc/install-functions.php b/inc/install-functions.php index 8b9bb808ba..3dddbb89a4 100644 --- a/inc/install-functions.php +++ b/inc/install-functions.php @@ -109,7 +109,7 @@ function doInstallWriteLocalConfigurationFile ($path) { // Adds a given template with content to install output stream function addTemplateToInstallContent ($template, $content = array()) { // Load the template - $out = loadTemplate($template, true, $content); + $out = loadTemplate($template, TRUE, $content); // Add it to output addToInstallContent($out); @@ -135,7 +135,7 @@ function getInstallerContent () { $content = $GLOBALS['install_content']; } else { // Nothing found, this needs fixing - $content = displayMessage('{--INSTALLER_CONTENT_404--}', true); + $content = displayMessage('{--INSTALLER_CONTENT_404--}', TRUE); } // Return content @@ -158,7 +158,7 @@ function readSqlDump ($FQFN) { // Generates the installer menu by simply loading another template function generateInstallerMenu () { // Load installer menu template - $OUT = loadTemplate('install_menu', true); + $OUT = loadTemplate('install_menu', TRUE); // Return loaded content return $OUT; @@ -167,7 +167,7 @@ function generateInstallerMenu () { // Generate the install footer navigation by simply loading another template function generateInstallerFooterNavigation () { // Load installer menu template - $OUT = loadTemplate('install_footer', true); + $OUT = loadTemplate('install_footer', TRUE); // Return loaded content return $OUT; @@ -223,7 +223,7 @@ function isInstallerDataValid (&$saveStatus, $key, $value) { //* NOISY-DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Call-back function ' . $callbackName . ' not found. saveStatus[status]=' . $saveStatus['status'] . ', key=' . $key . ', value=' . $value); // All fine (CAREFULL!) - return true; + return TRUE; } // END - if // Then call it back @@ -231,7 +231,7 @@ function isInstallerDataValid (&$saveStatus, $key, $value) { // Is it not valid? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'key=' . $key . ',value=' . $value . ',isValid=' . intval($isValid)); - if ($isValid === false) { + if ($isValid === FALSE) { // Then add it to saveStatus array_push($saveStatus['failed_fields'], $key); } // END - if @@ -269,7 +269,7 @@ function doInstallerPostCheck ($currentTab, &$saveStatus) { $isValid = (bool) call_user_func($callbackName, $currentTab); // Is it not valid? - if (($isValid === false) || (count($GLOBALS['installer_failed_fields'][$currentTab]) > 0)) { + if (($isValid === FALSE) || (count($GLOBALS['installer_failed_fields'][$currentTab]) > 0)) { // Then change status and message $saveStatus['status'] = 'failed'; $saveStatus['message'] = '{%message,INSTALLER_POST_CHECK_' . strtoupper($currentTab) . '_FAILED=' . $GLOBALS['installer_post_error'][$currentTab] . '%}'; @@ -421,8 +421,8 @@ function isInstallerMysqlTypeValid ($value) { // Call-back function to check if database configuration in POST is valid function isInstallerPostDatabaseConfigValid ($currentTab) { // By default nothing is valid - $isValid = false; - $engineValid = false; + $isValid = FALSE; + $engineValid = FALSE; $missingTables = 0; // Do both passwords match? @@ -430,17 +430,17 @@ function isInstallerPostDatabaseConfigValid ($currentTab) { // Password 1 not set $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_PASSWORD1_EMPTY--}'; array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_password1'); - return false; + return FALSE; } elseif ((isPostRequestElementSet('mysql_password1')) && (!isPostRequestElementSet('mysql_password2'))) { // Password 2 not set $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_PASSWORD2_EMPTY--}'; array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_password2'); - return false; + return FALSE; } elseif (postRequestElement('mysql_password1') != postRequestElement('mysql_password2')) { // Passwords mismatch $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_PASSWORDS_MISMATCH--}'; array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_password1', 'mysql_password2'); - return false; + return FALSE; } // END - if // Restore PHP's own error handler @@ -460,7 +460,7 @@ function isInstallerPostDatabaseConfigValid ($currentTab) { // Cannot connect to database $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_CONNECT_ERROR--}'; array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_login', 'mysql_password1', 'mysql_password2'); - return false; + return FALSE; } // END - if // Then attempt to select the database @@ -471,7 +471,7 @@ function isInstallerPostDatabaseConfigValid ($currentTab) { // Could not find database $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_SELECT_FAILED--}'; array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_dbase'); - return false; + return FALSE; } // END - if // Set database name and prefix @@ -492,7 +492,7 @@ function isInstallerPostDatabaseConfigValid ($currentTab) { // Something bad happened $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_ENGINES_SQL_ERROR--}'; array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_type'); - return false; + return FALSE; } elseif (count($engines) == 0) { // Restore own error handler again set_error_handler('__errorHandler'); @@ -500,65 +500,65 @@ function isInstallerPostDatabaseConfigValid ($currentTab) { // No engine is active $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_NO_ENGINES_ACTIVE--}'; array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_type'); - return false; + return FALSE; } // Then check all, if the requested is working foreach ($engines as $engineArray) { // By default the selected engine is not valid - $engineValid = false; + $engineValid = FALSE; // Is the engine there? if (strtolower($engineArray['Engine']) == strtolower(postRequestElement('mysql_type'))) { // Okay, engine is found - $engineValid = true; + $engineValid = TRUE; break; } // END - if } // END - foreach // So, is the engine found? - if ($engineValid === false) { + if ($engineValid === FALSE) { // Restore own error handler again set_error_handler('__errorHandler'); // Requested engine is not active $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_ENGINE_UNSUPPORTED--}'; array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_type'); - return false; + return FALSE; } // END - if // Init some known tables $tables = array( // Admins - 'admins' => true, + 'admins' => TRUE, // Admin menu - 'admin_menu' => true, + 'admin_menu' => TRUE, // Categories - 'cats' => true, + 'cats' => TRUE, // Configuration - 'config' => true, + 'config' => TRUE, // Extensions - 'extensions' => true, + 'extensions' => TRUE, // Guest menu - 'guest_menu' => true, + 'guest_menu' => TRUE, // Max receive - 'max_receive' => true, + 'max_receive' => TRUE, // Member menu - 'member_menu' => true, + 'member_menu' => TRUE, // Module registry - 'mod_reg' => true, + 'mod_reg' => TRUE, // Payments - 'payments' => true, + 'payments' => TRUE, // Sending pool - 'pool' => true, + 'pool' => TRUE, // Referral banner - 'refbanner' => true, + 'refbanner' => TRUE, // Referral levels - 'refdepths' => true, + 'refdepths' => TRUE, // Referral system - 'refsystem' => true, + 'refsystem' => TRUE, // Task system - 'task_system' => true, + 'task_system' => TRUE, ); // So check if all tables are not there @@ -567,7 +567,7 @@ function isInstallerPostDatabaseConfigValid ($currentTab) { $tables[$tableName] = ifSqlTableExists($tableName); // Is it (hopefully not) there? - if ($tables[$tableName] === false) { + if ($tables[$tableName] === FALSE) { // This does not exist $missingTables++; } // END - if @@ -583,7 +583,7 @@ function isInstallerPostDatabaseConfigValid ($currentTab) { set_error_handler('__errorHandler'); // If the status is true, disconnect the database - if ($isValid === false) { + if ($isValid === FALSE) { // Still something bad happened (e.g. tables found) $GLOBALS['installer_post_error'][$currentTab] = '{--INSTALLER_POST_DATABASE_IN_USE--}'; array_push($GLOBALS['installer_failed_fields'][$currentTab], 'mysql_dbase'); diff --git a/inc/install/install_page_finalize.php b/inc/install/install_page_finalize.php index 5c1e09ee11..0b6229945d 100644 --- a/inc/install/install_page_finalize.php +++ b/inc/install/install_page_finalize.php @@ -58,7 +58,7 @@ if ((isPostRequestElementSet('finalize')) && (!isInstalled())) { // Is the link up? if (SQL_IS_LINK_UP()) { // Seems to work, also right database? - if (SQL_SELECT_DB($GLOBALS['install_mysql']['dbase'], __FILE__, __LINE__) === true) { + if (SQL_SELECT_DB($GLOBALS['install_mysql']['dbase'], __FILE__, __LINE__) === TRUE) { // Check for dumps if ((!isFileReadable(postRequestElement('spath') . 'install/tables.sql')) || (!isFileReadable(postRequestElement('spath') . 'install/menu-'.getLanguage().'.sql'))) { // Installation area not found @@ -90,7 +90,7 @@ if ((isPostRequestElementSet('finalize')) && (!isInstalled())) { reportBug(__FILE__, __LINE__, sprintf("SQL dump %s is not readable.", $dump)); } } // END - foreach - //* DEBUG: */ die(__FUNCTION__.'['.__LINE__.']:'
'.print_r(getSqls(), true).'
'); + //* DEBUG: */ die(__FUNCTION__.'['.__LINE__.']:'
'.print_r(getSqls(), TRUE).'
'); // Are some SQLs found? if (countSqls() == 0) { diff --git a/inc/js/js-admin_ajax.php b/inc/js/js-admin_ajax.php index b1bc377d2c..8c2d38f86b 100644 --- a/inc/js/js-admin_ajax.php +++ b/inc/js/js-admin_ajax.php @@ -48,7 +48,7 @@ $content = array( ); // Simply load the JavaScript here -loadTemplate('js_admin_ajax', false, $content); +loadTemplate('js_admin_ajax', FALSE, $content); // [EOF] ?> diff --git a/inc/js/js-install_ajax.php b/inc/js/js-install_ajax.php index 39c54a66c4..75da4c4e37 100644 --- a/inc/js/js-install_ajax.php +++ b/inc/js/js-install_ajax.php @@ -48,7 +48,7 @@ $content = array( ); // Simply load the JavaScript here -loadTemplate('js_install_ajax', false, $content); +loadTemplate('js_install_ajax', FALSE, $content); // [EOF] ?> diff --git a/inc/js/js-surfbar_frame_top.php b/inc/js/js-surfbar_frame_top.php index 2013426452..0ad7344277 100644 --- a/inc/js/js-surfbar_frame_top.php +++ b/inc/js/js-surfbar_frame_top.php @@ -59,7 +59,7 @@ $content = array( ); // Load template -loadTemplate('js_surfbar_frame_top', false, $content); +loadTemplate('js_surfbar_frame_top', FALSE, $content); // [EOF] ?> diff --git a/inc/js/js-surfbar_member_edit.php b/inc/js/js-surfbar_member_edit.php index 88b66423fb..21b366e891 100644 --- a/inc/js/js-surfbar_member_edit.php +++ b/inc/js/js-surfbar_member_edit.php @@ -49,7 +49,7 @@ $content = array( ); // Simply load the JavaScript here -loadTemplate('js_surfbar_member_edit', false, $content); +loadTemplate('js_surfbar_member_edit', FALSE, $content); // [EOF] ?> diff --git a/inc/language-functions.php b/inc/language-functions.php index 5e393b7225..c85cf52faf 100644 --- a/inc/language-functions.php +++ b/inc/language-functions.php @@ -275,7 +275,7 @@ function ifLanguageFilesCompares ($source, $target, $targetLanguage) { } // END - if // *Does* match by default - $matches = true; + $matches = TRUE; // Is one not readable? if (!isIncludeReadable($source)) { @@ -295,7 +295,7 @@ function ifLanguageFilesCompares ($source, $target, $targetLanguage) { $GLOBALS['messages'][$backupLang] = array(); // Both are readable so include current language file - $GLOBALS['count'] = false; + $GLOBALS['count'] = FALSE; loadInclude($source); $GLOBALS['msgs'][$source] = $GLOBALS['messages'][$backupLang]; unset($GLOBALS['count']); @@ -322,7 +322,7 @@ function ifLanguageFilesCompares ($source, $target, $targetLanguage) { // Do they mismatch? if ((count($GLOBALS['msgs'][$source])) != (count($GLOBALS['msgs'][$target]))) { // Does not match - $matches = false; + $matches = FALSE; // Check all differences foreach ($GLOBALS['msgs'][$source] as $key => $value) { @@ -348,9 +348,9 @@ function getLanguageComparisonDifference ($target) { } // Checks whether the given message is masked -function isMessageMasked ($messageId, $strict = true) { +function isMessageMasked ($messageId, $strict = TRUE) { // Is the message id valid? - if (($strict === true) && (!isMessageIdValid($messageId))) { + if (($strict === TRUE) && (!isMessageIdValid($messageId))) { // No, then abort here reportBug(__FUNCTION__, __LINE__, 'Invalid message id ' . $messageId . ' detected.'); } // END - if diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index a3ff87855c..663c0ab399 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -47,14 +47,14 @@ function isAdminsAllowedByAcl ($action, $what) { if (($action == 'login') || ($action == 'logout')) { // If action is login or logout allow allways! - return true; + return TRUE; } elseif (isset($GLOBALS[__FUNCTION__][$adminId][$action][$what])) { // If we have cache, use it return $GLOBALS[__FUNCTION__][$adminId][$action][$what]; } // But default result is failed - $GLOBALS[__FUNCTION__][$action][$what] = false; + $GLOBALS[__FUNCTION__][$action][$what] = FALSE; // Get admin's defult access right $default = getAdminDefaultAcl($adminId); @@ -68,7 +68,7 @@ function isAdminsAllowedByAcl ($action, $what) { $parent = isAdminsAllowedByAcl($parent_action, ''); } else { // Anything else is true! - $parent = false; + $parent = FALSE; } // Shall I test for a main or sub menu? (action or what?) @@ -102,7 +102,7 @@ function isAdminsAllowedByAcl ($action, $what) { } } elseif (!isExtensionActive('cache')) { // Extension ext-cache is absent, so load it from database - $result = false; + $result = FALSE; if (!empty($action)) { // Main menu $result = SQL_QUERY_ESC("SELECT `access_mode` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `admin_id`=%s AND `action_menu`='%s' LIMIT 1", @@ -125,9 +125,9 @@ function isAdminsAllowedByAcl ($action, $what) { // Check ACL and (maybe) allow //* DEBUG: */ debugOutput('default='.$default.',acl_mode='.$aclMode.',parent='.intval($parent)); - if ((($default == 'allow') && ($aclMode != 'deny')) || (($default == 'deny') && ($aclMode == 'allow')) || ($parent === true) || (($default == 'NO-ACL') && ($aclMode == 'failed') && ($parent === false))) { + if ((($default == 'allow') && ($aclMode != 'deny')) || (($default == 'deny') && ($aclMode == 'allow')) || ($parent === TRUE) || (($default == 'NO-ACL') && ($aclMode == 'failed') && ($parent === FALSE))) { // Access is granted - $GLOBALS[__FUNCTION__][$adminId][$action][$what] = true; + $GLOBALS[__FUNCTION__][$adminId][$action][$what] = TRUE; } // END - if // Return value @@ -172,7 +172,7 @@ LIMIT 1", } // Change a lot admin account -function adminsChangeAdminAccount ($postData, $element = '', $displayMessage = true) { +function adminsChangeAdminAccount ($postData, $element = '', $displayMessage = TRUE) { // Begin the update $cache_update = '0'; $message = ''; @@ -298,7 +298,7 @@ LIMIT 1", } // END - foreach // Display message if not empty and allowed - if ((!empty($message)) && ($displayMessage === true)) { + if ((!empty($message)) && ($displayMessage === TRUE)) { // Display it displayMessage($message); } // END - if @@ -341,7 +341,7 @@ function adminsEditAdminAccount ($postData) { } // Load row template and switch color - $OUT .= loadTemplate('admin_edit_admins_row', true, $content); + $OUT .= loadTemplate('admin_edit_admins_row', TRUE, $content); } // END - if // Free result @@ -349,7 +349,7 @@ function adminsEditAdminAccount ($postData) { } // END - foreach // Load template - loadTemplate('admin_edit_admins', false, $OUT); + loadTemplate('admin_edit_admins', FALSE, $OUT); } // Generate access mode selection box for given admin id @@ -407,7 +407,7 @@ function generateAdminMenuModeSelectionBox ($adminId = NULL) { // Delete given admin accounts function adminsDeleteAdminAccount ($postData) { // Check if this account is the last one which cannot be deleted... - if (countSumTotalData('', 'admins', 'id', '', true) > 1) { + if (countSumTotalData('', 'admins', 'id', '', TRUE) > 1) { // Delete accounts $OUT = ''; foreach ($postData['sel'] as $id => $selected) { @@ -429,7 +429,7 @@ function adminsDeleteAdminAccount ($postData) { $content['id'] = $id; // Load row template and switch color - $OUT .= loadTemplate('admin_delete_admins_row', true, $content); + $OUT .= loadTemplate('admin_delete_admins_row', TRUE, $content); } // END - if // Free result @@ -437,7 +437,7 @@ function adminsDeleteAdminAccount ($postData) { } // END - foreach // Load template - loadTemplate('admin_delete_admins', false, $OUT); + loadTemplate('admin_delete_admins', FALSE, $OUT); } else { // Cannot delete last account! displayMessage('{--ADMIN_ADMINS_CANNOT_DELETE_LAST--}'); @@ -488,14 +488,14 @@ ORDER BY $content['la_mode'] = '{--ADMIN_ADMINS_LA_MODE_' . strtoupper($content['la_mode']) . '--}'; // Load row template and switch color - $OUT .= loadTemplate('admin_list_admins_row', true, $content); + $OUT .= loadTemplate('admin_list_admins_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result); // Load template - loadTemplate('admin_list_admins', false, $OUT); + loadTemplate('admin_list_admins', FALSE, $OUT); } // Sends out mail to all administrators @@ -532,7 +532,7 @@ function sendAdminsEmails ($subject, $template, $content, $userid) { SQL_FREERESULT($result); // Init result - $result = false; + $result = FALSE; // "implode" ids and query string $adminId = implode(',', $adminIds); diff --git a/inc/libs/beg_functions.php b/inc/libs/beg_functions.php index 149a96b5f4..94fbd26d34 100644 --- a/inc/libs/beg_functions.php +++ b/inc/libs/beg_functions.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Add points to user or begging rallye account function addPointsBeg ($userid, $points) { // Default is not added - $added = false; + $added = FALSE; // Is begging rallye active? if (isBegRallyeEnabled()) { @@ -60,7 +60,7 @@ function addPointsBeg ($userid, $points) { } // Subtract begged points from member account if the admin has selected one - if (($added === true) && (isValidUserId(getBegUserid()))) { + if (($added === TRUE) && (isValidUserId(getBegUserid()))) { // Subtract from this account $added = ($added && subtractPoints('beg_payout', getBegUserid(), $points)); } // END - if @@ -74,7 +74,7 @@ function addPointsBeg ($userid, $points) { //----------------------------------------------------------------------------- // Outputs points which a member can get -function doTemplateOutputBegPoints ($templateName, $clear = false) { +function doTemplateOutputBegPoints ($templateName, $clear = FALSE) { // Default is not the same $return = '{--BEG_POINTS_MIN_MAX--}'; diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index 22c6f07d4a..3b3ad6a5fb 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { function addTurboBonus ($mid, $userid, $type) { // Shall we add bonus points? if (!isBonusRallyeActive()) { - return false; + return FALSE; } // END - if // Init variables @@ -70,11 +70,11 @@ function addTurboBonus ($mid, $userid, $type) { // Is a column name set? if (empty($column)) { // No, then abort here - return false; + return FALSE; } // END - if // Check for entry - $rank = countSumTotalData($mid, 'bonus_turbo', 'id', $column, true) + 1; + $rank = countSumTotalData($mid, 'bonus_turbo', 'id', $column, TRUE) + 1; // Which rank? if ($rank == 1) { @@ -117,7 +117,7 @@ function addTurboBonus ($mid, $userid, $type) { // function addBonusRanks ($data, $type, $userid) { // Init variables - $self = false; $OUT = ''; $GLOBALS['ranking_content'] = array(); + $self = FALSE; $OUT = ''; $GLOBALS['ranking_content'] = array(); // Clear rankings by default $GLOBALS['ranking_content']['rankings'] = ''; @@ -139,13 +139,13 @@ function addBonusRanks ($data, $type, $userid) { $GLOBALS['ranking_content'] = merge_array($GLOBALS['ranking_content'], SQL_FETCHARRAY($result)); // Remember all values for later use - $self = true; + $self = TRUE; // Transfer data to template $GLOBALS['ranking_content']['timemark'] = generateDateTime($GLOBALS['ranking_content']['timemark'], 1); // Load template - $GLOBALS['ranking_content']['own'] = loadTemplate('show_bonus_yr', true, $GLOBALS['ranking_content']); + $GLOBALS['ranking_content']['own'] = loadTemplate('show_bonus_yr', TRUE, $GLOBALS['ranking_content']); } // END - if // Load rankings @@ -183,10 +183,10 @@ LIMIT 1", $rows['rank'] = $rank; // Load row template - $OUT .= loadTemplate('member_bonus_turbo_row', true, $rows); + $OUT .= loadTemplate('member_bonus_turbo_row', TRUE, $rows); } // END - for - if ($self === false) { + if ($self === FALSE) { // If current user was not found set constant $GLOBALS['ranking_content']['rankings'] = '{--MEMBER_BONUS_RANK_YOU_ARE_404--}'; } // END - if @@ -212,7 +212,7 @@ function handleBonusPoints ($mode, $userid) { } // END - if // Default is not working - $return = false; + $return = FALSE; // Switch to jackpot-mode when no UID is supplied but userid-mode is selected if ((getBonusMode() == 'UID') && ($userid == '0') && (isExtensionActive('jackpot'))) { @@ -238,7 +238,7 @@ function handleBonusPoints ($mode, $userid) { break; case 'JACKPOT': // ... jackpot - if ((isExtensionActive('jackpot')) && (subtractPointsFromJackpot($points) === false) && (isValidUserId($userid))) { + if ((isExtensionActive('jackpot')) && (subtractPointsFromJackpot($points) === FALSE) && (isValidUserId($userid))) { if ($total >= $points) { // Subtract points from userid's account $return = subtractPointsFromJackpot('bonus_payout_jackpot', $userid, $points); diff --git a/inc/libs/country_functions.php b/inc/libs/country_functions.php index 0f4201057f..2dfd60e3b0 100644 --- a/inc/libs/country_functions.php +++ b/inc/libs/country_functions.php @@ -60,7 +60,7 @@ LIMIT 1", if (SQL_NUMROWS($result) == 1) { // Load entry $content = SQL_FETCHARRAY($result); - //* DEBUG: */ print($id.'=
'.print_r($content, true).'
'); + //* DEBUG: */ print($id.'=
'.print_r($content, TRUE).'
'); // Construct human-readable description $ret = sprintf("%s (%s)", $content['descr'], $content['code']); diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index d5e9ba00ed..4d8b7cf5c8 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -108,7 +108,7 @@ LIMIT %s", $content['timemark'] = generateDateTime($content['timemark'], $DT_MODE); // Load template and switch color - $OUT .= loadTemplate($mode . '_doubler_list_rows', true, $content); + $OUT .= loadTemplate($mode . '_doubler_list_rows', TRUE, $content); } // END - while // Free memory @@ -117,13 +117,13 @@ LIMIT %s", // List no entries $OUT = ' - ' . displayMessage($message, true) . ' + ' . displayMessage($message, TRUE) . ' '; } // Return template - return loadTemplate($mode . '_doubler_list', true, $OUT); + return loadTemplate($mode . '_doubler_list', TRUE, $OUT); } // Get total points left in doubler pot diff --git a/inc/libs/earning_functions.php b/inc/libs/earning_functions.php index 507db350bb..3f747490bf 100644 --- a/inc/libs/earning_functions.php +++ b/inc/libs/earning_functions.php @@ -79,7 +79,7 @@ function generateMemberEarningDataTable ($earningProvider) { $filterData = runFilterChain('member_earning_table_data', $filterData); // Load the proper template and return it - $output = loadTemplate('member_earning_data_' . strtolower($filterData['earning_group']), true, $filterData); + $output = loadTemplate('member_earning_data_' . strtolower($filterData['earning_group']), TRUE, $filterData); // Return it return $output; @@ -177,7 +177,7 @@ LIMIT 1", array( $status = (!SQL_HASZEROAFFECTED()); // Has the record changed? - if ($status === true) { + if ($status === TRUE) { // Prepare content $content = array( 'earning_id' => bigintval($earningId), diff --git a/inc/libs/forced_functions.php b/inc/libs/forced_functions.php index b7ee9a8d81..e596264e3c 100644 --- a/inc/libs/forced_functions.php +++ b/inc/libs/forced_functions.php @@ -123,7 +123,7 @@ function translateForcedCostsVisibility ($visibility) { // "Getter" for an array of data from all Forced-PopUps except user's function getForcedPopupDataByEarningArray ($content) { - die('content=
' . print_r($content, true) . '
' . debug_get_printable_backtrace()); + die('content=
' . print_r($content, TRUE) . '
' . debug_get_printable_backtrace()); // Finally return the content return $content; @@ -321,24 +321,24 @@ function doForcedAdminActivateCampaigns () { // Do some sanity checks if (!isAdmin()) { // Not allowed to call - return false; + return FALSE; } elseif (countPostSelection('forced_campaign_id') == 0) { // No selections made - return false; + return FALSE; } // Get an array from all pending campaigns $forcedCampaigns = getArrayFromForcedCampaignsByArray(array_keys(postRequestElement('forced_campaign_id')), 'PENDING'); // By default all worked (at this point) - $activated = true; + $activated = TRUE; // Run through all entries foreach ($forcedCampaigns as $campaignId => $campaignData) { // Change the status of this campaign if (!changeForcedCampaignStatus($campaignId, 'PENDING', 'ACTIVE', $campaignData)) { // One didn't work, but continue with others - $activated = false; + $activated = FALSE; } // END - if } // END - foreach @@ -383,7 +383,7 @@ function changeForcedCampaignStatus ($campaignId, $prevStatus, $newStatus, $data // ---------- Comment out for debugging/developing member actions! --------- if (SQL_AFFECTEDROWS() != 1) { // No, something went wrong - return false; + return FALSE; } // END - if // ---------- Comment out for debugging/developing member actions! --------- @@ -395,7 +395,7 @@ function changeForcedCampaignStatus ($campaignId, $prevStatus, $newStatus, $data // All done! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'campaignId=' . $campaignId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - EXIT!'); - return true; + return TRUE; } // Notify admin(s) with a selected message and content @@ -426,7 +426,7 @@ function doForcedNotifyMember ($messageType, $content) { // Skip notification if userid is NULL if (is_null($content['forced_campaign_userid'])) { // NULL is silently ignored - return true; + return TRUE; } // END - if // Prepare template name @@ -468,7 +468,7 @@ function prepareForcedContentForTemplate ($content) { // ---------------------------------------------------------------------------- // Template helper function to create selection box for all forced-ad types -function doTemplateForcedAdTypeSelectionBox ($templateName, $clear = false, $default = NULL) { +function doTemplateForcedAdTypeSelectionBox ($templateName, $clear = FALSE, $default = NULL) { // Add all types through the filter $forcedAdTypes = runFilterChain('add_forced_ads_types', array()); @@ -480,7 +480,7 @@ function doTemplateForcedAdTypeSelectionBox ($templateName, $clear = false, $def } // Template helper function to create selection box for costs visibility -function doTemplateForcedCostsVisiblitySelectionBox ($templateName, $clear = false, $default = NULL) { +function doTemplateForcedCostsVisiblitySelectionBox ($templateName, $clear = FALSE, $default = NULL) { // Init array $costsVisibility = array( 0 => array('visibility' => 'ALL'), @@ -514,7 +514,7 @@ function doTemplateForcedCostsSelectionBox ($templateName, $clear, $default = NU $forcedCosts = getArrayFromForcedCostsByVisibility(); // Handle it over to generateSelectionBoxFromArray() - $content = generateSelectionBoxFromArray($forcedCosts, 'forced_costs_id', 'forced_costs_id', '', '', '', $default, '', true); + $content = generateSelectionBoxFromArray($forcedCosts, 'forced_costs_id', 'forced_costs_id', '', '', '', $default, '', TRUE); // Return prepared content return $content; @@ -523,7 +523,7 @@ function doTemplateForcedCostsSelectionBox ($templateName, $clear, $default = NU // Template helper function to create selection box for foreced campaign userid function doTemplateForcedCampaignUseridSelectionBox ($templateName, $clear, $default = NULL) { // Generate the selection box without all - $content = addMemberSelectionBox($default, false, true, true, 'forced_campaign_userid'); + $content = addMemberSelectionBox($default, FALSE, TRUE, TRUE, 'forced_campaign_userid'); // Return prepared content return $content; diff --git a/inc/libs/holiday_functions.php b/inc/libs/holiday_functions.php index a27a59720a..11ea6194cb 100644 --- a/inc/libs/holiday_functions.php +++ b/inc/libs/holiday_functions.php @@ -65,7 +65,7 @@ ORDER BY while ($content = SQL_FETCHARRAY($result_stop)) { // Stop holiday addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s LIMIT 1", - array(bigintval($content['userid'])), __FUNCTION__, __LINE__, false)); + array(bigintval($content['userid'])), __FUNCTION__, __LINE__, FALSE)); // Unlock account addSql(SQL_QUERY_ESC("UPDATE @@ -76,7 +76,7 @@ SET WHERE `userid`=%s LIMIT 1", - array(bigintval($content['userid'])), __FUNCTION__, __LINE__, false)); + array(bigintval($content['userid'])), __FUNCTION__, __LINE__, FALSE)); // Prepare array $content = merge_array($content, array( diff --git a/inc/libs/jackpot_functions.php b/inc/libs/jackpot_functions.php index a71f843b65..1ab1efed80 100644 --- a/inc/libs/jackpot_functions.php +++ b/inc/libs/jackpot_functions.php @@ -78,7 +78,7 @@ function addPointsToJackpot ($points) { // Subtracts points from the jackpot function subtractPointsFromJackpot ($points) { // First failed - $ret = false; + $ret = FALSE; // Get jackpot points for dummy $jackpot = getJackpotPoints(); diff --git a/inc/libs/mediadata_functions.php b/inc/libs/mediadata_functions.php index 617d69d38c..c1240a8171 100644 --- a/inc/libs/mediadata_functions.php +++ b/inc/libs/mediadata_functions.php @@ -44,7 +44,7 @@ if (!defined('__SECURITY')) { function updateMediadataEntry ($keys_array, $mode, $value) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'keys_array[]=' . gettype($keys_array) . ',mode=' . $mode . ',value=' . $value . ' - ENTERED!'); // Default is nothing added/updated - $added = false; + $added = FALSE; // Are there entries? if (is_array($keys_array) && ($value > 0)) { @@ -90,7 +90,7 @@ LIMIT 1", array($key), __FUNCTION__, __LINE__); // Zero entries are always added if ($value == 0) { // Is zero value, so we need to set $added here to avoid wrong false result - $added = true; + $added = TRUE; } // END - if // Return result diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index 0e184b9d39..11ffff20e5 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -103,7 +103,7 @@ function doAdminNetworkProcessForm () { // Is the function valid? if (!function_exists($functionName)) { // Invalid function name - reportBug(__FUNCTION__, __LINE__, 'Invalid do ' . getRequestElement('do') . ', function ' . $functionName .' does not exist.', false); + reportBug(__FUNCTION__, __LINE__, 'Invalid do ' . getRequestElement('do') . ', function ' . $functionName .' does not exist.', FALSE); } // END - if // Init global arrays @@ -118,7 +118,7 @@ function isNetworkNameValid ($name) { // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$name])) { // Does it exist? - $GLOBALS[__FUNCTION__][$name] = (countSumTotalData($name, 'network_data', 'network_id', 'network_short_name', true) == 1); + $GLOBALS[__FUNCTION__][$name] = (countSumTotalData($name, 'network_data', 'network_id', 'network_short_name', TRUE) == 1); } // END - if // Return result @@ -130,7 +130,7 @@ function isNetworkActiveByShortName ($name) { // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$name])) { // Does it exist? - $GLOBALS[__FUNCTION__][$name] = ((isNetworkNameValid($name)) && (countSumTotalData($name, 'network_data', 'network_id', 'network_short_name', true, " AND `network_active`='Y'") == 1)); + $GLOBALS[__FUNCTION__][$name] = ((isNetworkNameValid($name)) && (countSumTotalData($name, 'network_data', 'network_id', 'network_short_name', TRUE, " AND `network_active`='Y'") == 1)); } // END - if // Return result @@ -142,7 +142,7 @@ function isNetworkActiveById ($networkId) { // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$networkId])) { // Does it exist? - $GLOBALS[__FUNCTION__][$networkId] = (countSumTotalData(bigintval($networkId), 'network_data', 'network_id', 'network_id', true, " AND `network_active`='Y'") == 1); + $GLOBALS[__FUNCTION__][$networkId] = (countSumTotalData(bigintval($networkId), 'network_data', 'network_id', 'network_id', TRUE, " AND `network_active`='Y'") == 1); } // END - if // Return result @@ -498,7 +498,7 @@ function doNetworkUpdateDataByArray ($networkId, $networkData) { } // END - if // Just call our inner method - return adminSaveSettings($networkData, '_network_data', sprintf("`network_id`=%s", bigintval($networkId)), array(), false, false); + return adminSaveSettings($networkData, '_network_data', sprintf("`network_id`=%s", bigintval($networkId)), array(), FALSE, FALSE); } // Updates given network type handler (id) with data from array @@ -510,7 +510,7 @@ function doNetworkUpdateTypeByArray ($networkTypeId, $networkTypeData) { } // END - if // Just call our inner method - return adminSaveSettings($networkTypeData, '_network_types', sprintf("`network_type_id`=%s", bigintval($networkTypeId)), array(), false, false); + return adminSaveSettings($networkTypeData, '_network_types', sprintf("`network_type_id`=%s", bigintval($networkTypeId)), array(), FALSE, FALSE); } // Updates given network request parameters (id) with data from array @@ -522,7 +522,7 @@ function doNetworkUpdateParamsByArray ($networkParamsId, $networkParamsData) { } // END - if // Just call our inner method - return adminSaveSettings($networkParamsData, '_network_request_params', sprintf("`network_request_param_id`=%s", bigintval($networkParamsId)), array(), false, false); + return adminSaveSettings($networkParamsData, '_network_request_params', sprintf("`network_request_param_id`=%s", bigintval($networkParamsId)), array(), FALSE, FALSE); } // Updates given network array translations (id) with data from array @@ -534,7 +534,7 @@ function doNetworkUpdateArrayTranslationsByArray ($networkTranslationsId, $netwo } // END - if // Just call our inner method - return adminSaveSettings($networkTranslationsData, '_network_array_translation', sprintf("`network_array_id`=%s", bigintval($networkTranslationsId)), array(), false, false); + return adminSaveSettings($networkTranslationsData, '_network_array_translation', sprintf("`network_array_id`=%s", bigintval($networkTranslationsId)), array(), FALSE, FALSE); } // Removes given network entry @@ -584,7 +584,7 @@ ORDER BY $content = generateSelectionBoxFromArray($rows, 'network_id', 'network_id', '', '', 'network'); } else { // Nothing selected - $content = loadTemplate('admin_settings_unsaved', false, '{--ADMIN_ENTRIES_404--}'); + $content = loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_ENTRIES_404--}'); } // Free the result @@ -630,7 +630,7 @@ ORDER BY $content = generateSelectionBoxFromArray($rows, 'network_type', 'network_type_id'); } else { // Nothing selected - $content = loadTemplate('admin_settings_unsaved', false, '{--ADMIN_ENTRIES_404--}'); + $content = loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_ENTRIES_404--}'); } // Free the result @@ -677,7 +677,7 @@ ORDER BY $content = generateSelectionBoxFromArray($rows, 'network_type', 'network_type_id', '', '_title'); } else { // Nothing selected - $content = loadTemplate('admin_settings_unsaved', false, '{--ADMIN_ENTRIES_404--}'); + $content = loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_ENTRIES_404--}'); } // Free the result @@ -1127,12 +1127,12 @@ function doAdminNetworkProcessAddNetwork () { // We can say here, the form is sent, so check if the network is already added if (isNetworkNameValid(postRequestElement('network_short_name'))) { // Already there - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_ALREADY_ADDED=' . postRequestElement('network_short_name') . '%}'); - return false; + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_ALREADY_ADDED=' . postRequestElement('network_short_name') . '%}'); + return FALSE; } elseif (!isNetworkActiveByShortName(postRequestElement('network_short_name'))) { // Network is not active - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_NOT_ACTIVE=' . postRequestElement('network_short_name') . '%}'); - return false; + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_NOT_ACTIVE=' . postRequestElement('network_short_name') . '%}'); + return FALSE; } // Remove the 'ok' part @@ -1147,10 +1147,10 @@ function doAdminNetworkProcessAddNetwork () { // Output message if (!SQL_HASZEROAFFECTED()) { // Successfully added - loadTemplate('admin_network_added', false, postRequestArray()); + loadTemplate('admin_network_added', FALSE, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_DATA_NOT_ADDED=' . postRequestElement('network_short_name') . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_DATA_NOT_ADDED=' . postRequestElement('network_short_name') . '%}'); } } @@ -1169,7 +1169,7 @@ function doAdminNetworkProcessHandleNetworks () { // Is there found the network? if (count($networkData) > 0) { // Add row template with given form name - $OUT .= loadTemplate('admin_' . $GLOBALS['network_form_name'] . '_networks_row', true, $networkData); + $OUT .= loadTemplate('admin_' . $GLOBALS['network_form_name'] . '_networks_row', TRUE, $networkData); } // END - if } // END - if } // END - foreach @@ -1177,13 +1177,13 @@ function doAdminNetworkProcessHandleNetworks () { // If we have no rows, we don't need to display the edit form if (!empty($OUT)) { // Output main template - loadTemplate('admin_' . $GLOBALS['network_form_name'] . '_networks', false, $OUT); + loadTemplate('admin_' . $GLOBALS['network_form_name'] . '_networks', FALSE, $OUT); // Don't display the list/add new form - $GLOBALS['network_display'] = false; + $GLOBALS['network_display'] = FALSE; } else { // Nothing selected/found - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_NOTHING_FOUND--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_NOTHING_FOUND--}'); } } // END - if } @@ -1207,10 +1207,10 @@ function doAdminNetworkProcessHandleNetworkTypes () { if (count($networkTypeData) > 0) { if (isFormSent('edit')) { // Add row template for deleting - $OUT .= loadTemplate('admin_edit_network_types_row', true, $networkTypeData); + $OUT .= loadTemplate('admin_edit_network_types_row', TRUE, $networkTypeData); } elseif (isFormSent('delete')) { // Add row template for deleting - $OUT .= loadTemplate('admin_delete_network_types_row', true, $networkTypeData); + $OUT .= loadTemplate('admin_delete_network_types_row', TRUE, $networkTypeData); } else { // Problem! reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.'); @@ -1223,19 +1223,19 @@ function doAdminNetworkProcessHandleNetworkTypes () { if (!empty($OUT)) { // Output main template if (isFormSent('edit')) { - loadTemplate('admin_edit_network_types', false, $OUT); + loadTemplate('admin_edit_network_types', FALSE, $OUT); } elseif (isFormSent('delete')) { - loadTemplate('admin_delete_network_types', false, $OUT); + loadTemplate('admin_delete_network_types', FALSE, $OUT); } else { // Problem! reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.'); } // Don't display the list/add new form - $GLOBALS['network_display'] = false; + $GLOBALS['network_display'] = FALSE; } else { // Nothing selected/found - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_TYPE_HANDLER_NOTHING_FOUND--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_TYPE_HANDLER_NOTHING_FOUND--}'); } } // END - if } @@ -1262,13 +1262,13 @@ function doAdminNetworkProcessHandleRequestParams () { if (count($networkRequestData) > 0) { if (isFormSent('edit')) { // Add row template for deleting - $OUT .= loadTemplate('admin_edit_network_request_params_row', true, $networkRequestData); + $OUT .= loadTemplate('admin_edit_network_request_params_row', TRUE, $networkRequestData); } elseif (isFormSent('delete')) { // Get type data $networkRequestData['network_type_data'] = getNetworkTypeDataById($networkRequestData['network_type_id']); // Add row template for deleting - $OUT .= loadTemplate('admin_delete_network_request_params_row', true, $networkRequestData); + $OUT .= loadTemplate('admin_delete_network_request_params_row', TRUE, $networkRequestData); } else { // Problem! reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.'); @@ -1281,19 +1281,19 @@ function doAdminNetworkProcessHandleRequestParams () { if (!empty($OUT)) { // Output main template if (isFormSent('edit')) { - loadTemplate('admin_edit_network_request_params', false, $OUT); + loadTemplate('admin_edit_network_request_params', FALSE, $OUT); } elseif (isFormSent('delete')) { - loadTemplate('admin_delete_network_request_params', false, $OUT); + loadTemplate('admin_delete_network_request_params', FALSE, $OUT); } else { // Problem! reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.'); } // Don't display the list/add new form - $GLOBALS['network_display'] = false; + $GLOBALS['network_display'] = FALSE; } else { // Nothing selected/found - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_FOUND--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_FOUND--}'); } } // END - if } @@ -1340,7 +1340,7 @@ function doAdminNetworkProcessChangeNetworks () { displayMessage('{%message,ADMIN_NETWORK_UPDATED=' . $updated . '%}'); } else { // Nothing changed - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_NOTHING_CHANGED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_NOTHING_CHANGED--}'); } } // END - if } @@ -1367,7 +1367,7 @@ function doAdminNetworkProcessRemoveNetworks () { displayMessage('{%message,ADMIN_NETWORK_REMOVED=' . $removed . '%}'); } else { // Nothing removed - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_NOTHING_REMOVED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_NOTHING_REMOVED--}'); } } // END - if } @@ -1377,10 +1377,10 @@ function doAdminNetworkProcessAddNetworkType () { // Is the network type handle already used with given network? if (isNetworkTypeHandleValid(postRequestElement('network_type_handler'), getRequestElement('network_id'))) { // Already added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_TYPE_HANDLER_ALREADY_ADDED=' . postRequestElement('network_type_handler') . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_TYPE_HANDLER_ALREADY_ADDED=' . postRequestElement('network_type_handler') . '%}'); // ... so abort here - return false; + return FALSE; } // END - if // Remove the 'ok' part @@ -1401,10 +1401,10 @@ function doAdminNetworkProcessAddNetworkType () { // Output message if (!SQL_HASZEROAFFECTED()) { // Successfully added - loadTemplate('admin_network_type_added', false, postRequestArray()); + loadTemplate('admin_network_type_added', FALSE, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_TYPE_HANDLER_NOT_ADDED=' . postRequestElement('network_type_handler') . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_TYPE_HANDLER_NOT_ADDED=' . postRequestElement('network_type_handler') . '%}'); } } @@ -1456,7 +1456,7 @@ function doAdminNetworkProcessChangeHandlerTypes () { displayMessage('{%message,ADMIN_NETWORK_TYPE_HANDLER_UPDATED=' . $updated . '%}'); } else { // Nothing changed - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_TYPE_HANDLER_NOTHING_CHANGED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_TYPE_HANDLER_NOTHING_CHANGED--}'); } } // END - if } @@ -1509,7 +1509,7 @@ function doAdminNetworkProcessChangeRequestParams () { displayMessage('{%message,ADMIN_NETWORK_REQUEST_PARAMETER_UPDATED=' . $updated . '%}'); } else { // Nothing changed - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_CHANGED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_CHANGED--}'); } } // END - if } @@ -1562,7 +1562,7 @@ function doAdminNetworkProcessChangeArrayTranslations () { displayMessage('{%message,ADMIN_NETWORK_ARRAY_TRANSLATION_UPDATED=' . $updated . '%}'); } else { // Nothing changed - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_ARRAY_TRANSLATION_NOTHING_CHANGED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_ARRAY_TRANSLATION_NOTHING_CHANGED--}'); } } // END - if } @@ -1589,7 +1589,7 @@ function doAdminNetworkProcessRemoveNetworkTypes () { displayMessage('{%message,ADMIN_NETWORK_TYPE_HANDLER_REMOVED=' . $removed . '%}'); } else { // Nothing removed - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_TYPE_HANDLER_NOTHING_REMOVED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_TYPE_HANDLER_NOTHING_REMOVED--}'); } } // END - if } @@ -1616,7 +1616,7 @@ function doAdminNetworkProcessRemoveNetworkRequestParams () { displayMessage('{%message,ADMIN_NETWORK_REQUEST_PARAMETER_REMOVED=' . $removed . '%}'); } else { // Nothing removed - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_REMOVED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_REMOVED--}'); } } // END - if } @@ -1643,7 +1643,7 @@ function doAdminNetworkProcessRemoveNetworkArrayTranslation () { displayMessage('{%message,ADMIN_NETWORK_ARRAY_TRANSLATION_REMOVED=' . $removed . '%}'); } else { // Nothing removed - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_ARRAY_TRANSLATION_NOTHING_REMOVED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_ARRAY_TRANSLATION_NOTHING_REMOVED--}'); } } // END - if } @@ -1653,10 +1653,10 @@ function doAdminNetworkProcessAddRequestParam () { // Is the request parameter already used with given network? if (isNetworkRequestElementValid(postRequestElement('network_request_param_key'), postRequestElement('network_type_id'), getRequestElement('network_id'))) { // Already added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_ALREADY_ADDED=' . postRequestElement('network_request_param_key') . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_ALREADY_ADDED=' . postRequestElement('network_request_param_key') . '%}'); // ... so abort here - return false; + return FALSE; } // END - if // Remove the 'ok' part @@ -1677,10 +1677,10 @@ function doAdminNetworkProcessAddRequestParam () { // Output message if (!SQL_HASZEROAFFECTED()) { // Successfully added - loadTemplate('admin_network_request_param_added', false, postRequestArray()); + loadTemplate('admin_network_request_param_added', FALSE, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_NOT_ADDED=' . postRequestElement('network_request_param_key') . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_REQUEST_PARAMETER_NOT_ADDED=' . postRequestElement('network_request_param_key') . '%}'); } } @@ -1689,10 +1689,10 @@ function doAdminNetworkProcessAddVcheckParam () { // Is the request parameter already used with given network? if (isNetworkVcheckElementValid(postRequestElement('network_vcheck_param_key'), getRequestElement('network_id'))) { // Already added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_VCHECK_PARAMETER_ALREADY_ADDED=' . postRequestElement('network_vcheck_param_key') . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_VCHECK_PARAMETER_ALREADY_ADDED=' . postRequestElement('network_vcheck_param_key') . '%}'); // ... so abort here - return false; + return FALSE; } // END - if // Remove the 'ok' part @@ -1713,10 +1713,10 @@ function doAdminNetworkProcessAddVcheckParam () { // Output message if (!SQL_HASZEROAFFECTED()) { // Successfully added - loadTemplate('admin_network_vcheck_param_added', false, postRequestArray()); + loadTemplate('admin_network_vcheck_param_added', FALSE, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_VCHECK_PARAMETER_NOT_ADDED=' . postRequestElement('network_vcheck_param_key') . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_VCHECK_PARAMETER_NOT_ADDED=' . postRequestElement('network_vcheck_param_key') . '%}'); } } @@ -1725,10 +1725,10 @@ function doAdminNetworkProcessAddNetworkArrayTranslation () { // Is the request parameter already used with given network? if (isNetworkArrayTranslationValid(postRequestElement('network_array_index'), postRequestElement('network_type_id'), getRequestElement('network_id'))) { // Already added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_ARRAY_TRANSLATION_ALREADY_ADDED=' . postRequestElement('network_array_index') . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_ARRAY_TRANSLATION_ALREADY_ADDED=' . postRequestElement('network_array_index') . '%}'); // ... so abort here - return false; + return FALSE; } // END - if // Remove the 'ok' part @@ -1753,10 +1753,10 @@ function doAdminNetworkProcessAddNetworkArrayTranslation () { // Output message if (!SQL_HASZEROAFFECTED()) { // Successfully added - loadTemplate('admin_network_array_translation_added', false, postRequestArray()); + loadTemplate('admin_network_array_translation_added', FALSE, postRequestArray()); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_NETWORK_ARRAY_TRANSLATION_NOT_ADDED=' . postRequestElement('network_array_index') . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_NETWORK_ARRAY_TRANSLATION_NOT_ADDED=' . postRequestElement('network_array_index') . '%}'); } } @@ -1782,13 +1782,13 @@ function doAdminNetworkProcessHandleArrayTranslations () { if (count($networkTranslationsData) > 0) { if (isFormSent('edit')) { // Add row template for deleting - $OUT .= loadTemplate('admin_edit_network_array_translation_row', true, $networkTranslationsData); + $OUT .= loadTemplate('admin_edit_network_array_translation_row', TRUE, $networkTranslationsData); } elseif (isFormSent('delete')) { // Get type data $networkTranslationsData['network_type_data'] = getNetworkTypeDataById($networkTranslationsData['network_type_id']); // Add row template for deleting - $OUT .= loadTemplate('admin_delete_network_array_translation_row', true, $networkTranslationsData); + $OUT .= loadTemplate('admin_delete_network_array_translation_row', TRUE, $networkTranslationsData); } else { // Problem! reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.'); @@ -1801,19 +1801,19 @@ function doAdminNetworkProcessHandleArrayTranslations () { if (!empty($OUT)) { // Output main template if (isFormSent('edit')) { - loadTemplate('admin_edit_network_array_translation', false, $OUT); + loadTemplate('admin_edit_network_array_translation', FALSE, $OUT); } elseif (isFormSent('delete')) { - loadTemplate('admin_delete_network_array_translation', false, $OUT); + loadTemplate('admin_delete_network_array_translation', FALSE, $OUT); } else { // Problem! reportBug(__FUNCTION__, __LINE__, 'Cannot detect edit/delete.'); } // Don't display the list/add new form - $GLOBALS['network_display'] = false; + $GLOBALS['network_display'] = FALSE; } else { // Nothing selected/found - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_FOUND--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_NETWORK_REQUEST_PARAMETER_NOTHING_FOUND--}'); } } // END - if } @@ -1850,12 +1850,12 @@ function doAdminNetworkProcessNetworkApiConfig () { displayMessage('{--ADMIN_CONFIG_NETWORK_API_SAVED--}'); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_CONFIG_NETWORK_API_NOT_SAVED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_CONFIG_NETWORK_API_NOT_SAVED--}'); } } // Only adds network type configuration if not yet present -function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = true) { +function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = TRUE) { // Remove the 'ok' part unsetPostRequestElement('ok'); @@ -1890,7 +1890,7 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = true) { unsetPostRequestElement('set_all'); // Shall we set for all? - if ($setAll === true) { + if ($setAll === TRUE) { // Get all handlers $result = SQL_QUERY_ESC('SELECT `network_type_id` FROM `{?_MYSQL_PREFIX?}_network_types` WHERE `network_id`=%s ORDER BY `network_type_id` ASC', array(bigintval(getRequestElement('network_id'))), __FUNCTION__, __LINE__); @@ -1911,7 +1911,7 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = true) { setGetRequestElement('network_type_id', $typeId); // Call this function again - $numRows += doAdminNetworkProcessAddHandlerTypesConfig(false); + $numRows += doAdminNetworkProcessAddHandlerTypesConfig(FALSE); } // END - while // Free result @@ -1923,7 +1923,7 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = true) { displayMessage('{%message,ADMIN_CONFIG_NETWORK_HANDLER_TYPE_ALL_HANDLER_SAVED=' . bigintval($numRows) . '%}'); } else { // Nothing has been saved - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_NOT_CHANGED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_NOT_CHANGED--}'); } } else { // Get SQL query for new entry @@ -1933,14 +1933,14 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = true) { SQL_QUERY($SQL, __FUNCTION__, __LINE__); // Shall we display the message? - if ($displayMessage === true) { + if ($displayMessage === TRUE) { // Output message if (!SQL_HASZEROAFFECTED()) { // Successfully added displayMessage('{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_SAVED--}'); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_NOT_SAVED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_NOT_SAVED--}'); } } else { // Return amount of affected rows (1 or 2) @@ -1950,7 +1950,7 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = true) { } // Only changes network type configuration if not yet present -function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = true) { +function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = TRUE) { // Remove the 'ok' part unsetPostRequestElement('ok'); @@ -1981,7 +1981,7 @@ function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = true) { unsetPostRequestElement('set_all'); // Shall we set for all? - if ($setAll === true) { + if ($setAll === TRUE) { // Get all data entries $result = SQL_QUERY_ESC('SELECT `network_data_id` FROM `{?_MYSQL_PREFIX?}_network_types_config` WHERE `network_id`=%s ORDER BY `network_type_id` ASC', array(bigintval(getRequestElement('network_id'))), __FUNCTION__, __LINE__); @@ -2002,7 +2002,7 @@ function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = true) { setPostRequestElement('network_data_id', $dataId); // Call this function again - $numRows += doAdminNetworkProcessEditHandlerTypesConfig(false); + $numRows += doAdminNetworkProcessEditHandlerTypesConfig(FALSE); } // END - while // Free result @@ -2014,7 +2014,7 @@ function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = true) { displayMessage('{%message,ADMIN_CONFIG_NETWORK_HANDLER_TYPE_ALL_HANDLER_SAVED=' . bigintval($numRows) . '%}'); } else { // Nothing has been saved - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_NOT_CHANGED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_NOT_CHANGED--}'); } } else { // Get SQL query for new entry @@ -2024,14 +2024,14 @@ function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = true) { SQL_QUERY($SQL, __FUNCTION__, __LINE__); // Shall we display the message? - if ($displayMessage === true) { + if ($displayMessage === TRUE) { // Output message if (!SQL_HASZEROAFFECTED()) { // Successfully added displayMessage('{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_SAVED--}'); } else { // Not added - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_NOT_CHANGED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_CONFIG_NETWORK_HANDLER_TYPE_HANDLER_NOT_CHANGED--}'); } } else { // Return amount of affected rows (1 or 2) @@ -2102,10 +2102,10 @@ function doAdminNetworkProcessExport () { call_user_func($callbackName); // Mark it as called - $GLOBALS[__FUNCTION__][$callbackName] = true; + $GLOBALS[__FUNCTION__][$callbackName] = TRUE; // Don't display the list/add new form - $GLOBALS['network_display'] = false; + $GLOBALS['network_display'] = FALSE; } // Exports (and displays) the table 'network_data' @@ -2154,7 +2154,7 @@ ORDER BY SQL_FREERESULT($result); // Output the SQL query - loadTemplate('admin_export_network_data', false, $SQL); + loadTemplate('admin_export_network_data', FALSE, $SQL); } // Exports (and displays) the table 'network_types' @@ -2218,7 +2218,7 @@ ORDER BY SQL_FREERESULT($result); // Output the SQL query - loadTemplate('admin_export_network_types', false, $SQL); + loadTemplate('admin_export_network_types', FALSE, $SQL); } // Exports (and displays) the table 'network_request_params' @@ -2276,7 +2276,7 @@ ORDER BY SQL_FREERESULT($result); // Output the SQL query - loadTemplate('admin_export_network_request_params', false, $SQL); + loadTemplate('admin_export_network_request_params', FALSE, $SQL); } // Exports (and displays) the table 'network_vcheck_params' @@ -2331,7 +2331,7 @@ ORDER BY SQL_FREERESULT($result); // Output the SQL query - loadTemplate('admin_export_network_vcheck_params', false, $SQL); + loadTemplate('admin_export_network_vcheck_params', FALSE, $SQL); } // Exports (and displays) the table 'network_array_translation' @@ -2379,7 +2379,7 @@ ORDER BY SQL_FREERESULT($result); // Output the SQL query - loadTemplate('admin_export_network_array_translation', false, $SQL); + loadTemplate('admin_export_network_array_translation', FALSE, $SQL); } // [EOF] diff --git a/inc/libs/nickname_functions.php b/inc/libs/nickname_functions.php index 1e8084013b..f66ade8e1c 100644 --- a/inc/libs/nickname_functions.php +++ b/inc/libs/nickname_functions.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Checks whether the nickname is active function isNicknameOrUserid ($useridNick) { // By default nothing is found... - $ret = false; + $ret = FALSE; // Found in cache? if (isset($GLOBALS['nickname_active'][$useridNick])) { @@ -75,10 +75,10 @@ function getNickname ($userid) { $ret = $GLOBALS['nicknames'][$userid]; } else { // Init result - $result = false; + $result = FALSE; // Nickname or userid used? - if ('' . bigintval($userid, true, false) . '' === '' . $userid . '') { + if ('' . bigintval($userid, TRUE, FALSE) . '' === '' . $userid . '') { // Userid given, so try to load user data if (fetchUserData($userid)) { // Load nickname from database diff --git a/inc/libs/other_functions.php b/inc/libs/other_functions.php index 98d1858473..f6ee8282e3 100644 --- a/inc/libs/other_functions.php +++ b/inc/libs/other_functions.php @@ -50,14 +50,14 @@ function displayDebugSqls () { $content['timing'] = translateComma($content['timing'] * 1000); // Load row template - $OUT .= loadTemplate('admin_other_sqls_row', true, $content); + $OUT .= loadTemplate('admin_other_sqls_row', TRUE, $content); // Count one up $i++; } // END - foreach // Load main template - $GLOBALS['__page_footer'] .= loadTemplate('admin_other_sqls', true, $OUT); + $GLOBALS['__page_footer'] .= loadTemplate('admin_other_sqls', TRUE, $OUT); } // [EOF] diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php index 805b9d9ee0..1447dda5b4 100644 --- a/inc/libs/payout_functions.php +++ b/inc/libs/payout_functions.php @@ -69,22 +69,22 @@ ORDER BY $content['points'] = translateComma($points * $content['rate'] - 0.5); // Load row template - $OUT .= loadTemplate('member_payout_li', true, $content); + $OUT .= loadTemplate('member_payout_li', TRUE, $content); } // END - if } // END - while // Load main template - loadTemplate('member_payout_list', true, $OUT); + loadTemplate('member_payout_list', TRUE, $OUT); } else { // No payout types setup so far - loadTemplate('admin_settings_unsaved', false, '{--MEMBER_PAYOUT_SETUP_INCOMPLETE--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--MEMBER_PAYOUT_SETUP_INCOMPLETE--}'); } // Free memory SQL_FREERESULT($result); } else { // Points is empty - loadTemplate('admin_settings_unsaved', false, '{--MEMBER_PAYOUT_NO_POINTS_ENTERED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--MEMBER_PAYOUT_NO_POINTS_ENTERED--}'); } } diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index e768e226c7..3e3bbadb9f 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -74,7 +74,7 @@ ORDER BY // Merge both arrays $content = merge_array($content, $row); - $un = false; + $un = FALSE; // Get refs by userid $count = getReferralRallyeRefsCount($content['userid']); @@ -140,7 +140,7 @@ WHERE bigintval($count), $cpoints ), __FUNCTION__, __LINE__); - $un = true; + $un = TRUE; } // END - if // Free memory @@ -150,7 +150,7 @@ WHERE $content['refs'] = $count; // Shall I notify this member? - if (($content['send_notify'] == 'Y') && ($un === true)) { + if (($content['send_notify'] == 'Y') && ($un === TRUE)) { // Load email template and send it to the user $message = loadEmailTemplate('member_rallye_notify', $content, $content['userid']); sendEmail($content['userid'], '{%message,MEMBER_RALLYE_NOTIFY_SUBJECT=' . $content['title'] . '%}', $message); @@ -324,7 +324,7 @@ LIMIT 1", SQL_FREERESULT($result); // Sort whole array - array_pk_sort($content, array('cpoints', 'ref'), 0, 1, true); + array_pk_sort($content, array('cpoints', 'ref'), 0, 1, TRUE); // Generate table $OUT = ''; @@ -346,7 +346,7 @@ LIMIT 1", ); // Load row template and switch color - $OUT .= loadTemplate($mode . '_list_rallye_row', true, $row); + $OUT .= loadTemplate($mode . '_list_rallye_row', TRUE, $row); } // END - for // Add min_prices/users @@ -355,7 +355,7 @@ LIMIT 1", $content['min_users'] = bigintval($min_users); // And finnally return the output - return loadTemplate($mode . '_list_rallye', true, $content); + return loadTemplate($mode . '_list_rallye', TRUE, $content); } // Sends out a notification about the rallye @@ -466,7 +466,7 @@ function getTotalRallyeWinners ($rallyeId) { // "Walk" through all entries foreach ($prices['userid'] as $key => $userid) { // Check for userid - $active = countSumTotalData($userid, 'user_data', 'userid', 'userid', true, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); + $active = countSumTotalData($userid, 'user_data', 'userid', 'userid', TRUE, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); // Allow valid and active users with at least one ref //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'rallyeId=' . $rallyeId . ',userid=' . $userid . ',ref=' . $prices['ref'][$key] . ',cpoints=' . $prices['cpoints'][$key]); @@ -506,7 +506,7 @@ function stopRallyeByResult ($result) { * active = 1: account is still confirmed * active = 0: account is deleted or locked */ - $active = countSumTotalData($userid, 'user_data', 'userid', 'userid', true, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); + $active = countSumTotalData($userid, 'user_data', 'userid', 'userid', TRUE, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); $prices['active'][$key] = $active; @@ -749,7 +749,7 @@ LIMIT 1", SQL_FREERESULT($result_user); // Sort array for refs (descending) - array_pk_sort($users, array('cpoints', 'ref'), 0, 1, true); + array_pk_sort($users, array('cpoints', 'ref'), 0, 1, TRUE); // Load prices array (!) $prices = getArrayFromReferralRallyePrices($rallye); @@ -784,7 +784,7 @@ function addReferralRallyeWinners ($mode, $rallye, $default=0) { * active = 1: account is still confirmed * active = 0: account is deleted or locked */ - $active = countSumTotalData($content['userid'][$idx], 'user_data', 'userid', 'userid', true, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); + $active = countSumTotalData($content['userid'][$idx], 'user_data', 'userid', 'userid', TRUE, runFilterChain('user_exclusion_sql', " AND `status`='CONFIRMED'")); if ((empty($content['ref'][$idx])) || ($content['ref'][$idx] == '0') || ($active == '0') || ('' . round($content['cpoints'][$idx]) . '' == '0') || (empty($content['cpoints'][$idx]))) { // Allow valid and active users with at least one ref to get points @@ -818,7 +818,7 @@ function addReferralRallyeWinners ($mode, $rallye, $default=0) { ); // Load row template - $OUT .= loadTemplate($mode . '_list_rallye_row', true, $row); + $OUT .= loadTemplate($mode . '_list_rallye_row', TRUE, $row); } // END - for // Prepare content @@ -829,7 +829,7 @@ function addReferralRallyeWinners ($mode, $rallye, $default=0) { ); // Load main template and finnally return the output - return loadTemplate($mode . '_list_rallye', true, $content); + return loadTemplate($mode . '_list_rallye', TRUE, $content); } // @@ -864,11 +864,11 @@ WHERE // Purge whole rallye addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1", - array(bigintval($content['id'])), __FUNCTION__, __LINE__, false)); + array(bigintval($content['id'])), __FUNCTION__, __LINE__, FALSE)); addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s LIMIT 1", - array(bigintval($content['id'])), __FUNCTION__, __LINE__, false)); + array(bigintval($content['id'])), __FUNCTION__, __LINE__, FALSE)); addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s LIMIT 1", - array(bigintval($content['id'])), __FUNCTION__, __LINE__, false)); + array(bigintval($content['id'])), __FUNCTION__, __LINE__, FALSE)); // Add task (we ignore the task id here createNewTask('{--ADMIN_RALLYE_PURGED_TASK--}: ' . $content['title'], '{--ADMIN_RALLYE_PURGED_TEXT--}', 'RALLYE_PURGED'); @@ -892,7 +892,7 @@ function addReferralRallyeTemplateSelection ($name = 'template', $default = '') $basePath = sprintf("templates/%s/html/rallye/", getLanguage()); // Read the directory - $templates = getArrayFromDirectory($basePath, 'rallye_', false, true, array(), '.tpl'); + $templates = getArrayFromDirectory($basePath, 'rallye_', FALSE, TRUE, array(), '.tpl'); // And walk through foreach ($templates as $read) { @@ -952,7 +952,7 @@ function getReferralRallyeRefsCount ($currUserid, $oldReferralCount = '0') { } // END - if } // END - foreach - //* DEBUG: */ debugOutput('
'.print_r($GLOBALS['cache_array']['refsystem'], true).'
'); + //* DEBUG: */ debugOutput('
'.print_r($GLOBALS['cache_array']['refsystem'], TRUE).'
'); //* DEBUG: */ doShutdown(); if ($count > 0) { @@ -1030,7 +1030,7 @@ function getTotalRallyePrices ($rallyeId) { // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$rallyeId])) { // Determine it - $GLOBALS[__FUNCTION__][$rallyeId] = countSumTotalData($rallyeId, 'rallye_prices', 'id', 'rallye_id', true); + $GLOBALS[__FUNCTION__][$rallyeId] = countSumTotalData($rallyeId, 'rallye_prices', 'id', 'rallye_id', TRUE); } // END - if // Return it diff --git a/inc/libs/refback_functions.php b/inc/libs/refback_functions.php index d993ebaf94..82746fe51d 100644 --- a/inc/libs/refback_functions.php +++ b/inc/libs/refback_functions.php @@ -354,7 +354,7 @@ function updateMemberRefbackPercents ($id, $percents, $note) { sendAdminNotification('{--ADMIN_REFBACK_SUBJECT--}', 'admin_refback', $content, $content['refid']); // All fine! - $status['ok'] = true; + $status['ok'] = TRUE; // Return status array //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'id=' . $id . ',percents=' . $percents . ' - EXIT!'); diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 3a3d1f2dd3..0b8f952157 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Checks whether all required registration fields are set function ifRequiredRegisterFieldsAreSet (&$array) { // By default all is fine - $ret = true; + $ret = TRUE; foreach ($array as $key => $value) { // Check all fields that must register $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_must_register` WHERE `field_name`='%s' AND `field_required`='Y' LIMIT 1", @@ -55,10 +55,10 @@ function ifRequiredRegisterFieldsAreSet (&$array) { // if extensions is present check if country code was selected // 01 2 21 12 3 32 234 5 54 4 43 34 4 4 5 5432 2 3 3210 $country = ((!isExtensionActive('country')) || ((isExtensionActive('country')) && (((empty($value)) && ($key == 'cntry')) || (($key == 'country_code') && (!empty($value)))) && (!empty($array['country_code'])))); - if ((empty($value)) && ($country === false)) { + if ((empty($value)) && ($country === FALSE)) { // Required field not set $array[$key] = '!'; - $ret = false; + $ret = FALSE; } // END - if } // END - if @@ -114,7 +114,7 @@ ORDER BY } // Load template and switch color - $OUT .= loadTemplate('guest_cat_row', true, $content); + $OUT .= loadTemplate('guest_cat_row', TRUE, $content); } // END - while $OUT .= ''; @@ -122,7 +122,7 @@ ORDER BY SQL_FREERESULT($result); } else { // No categories setted up so far... - $OUT .= displayMessage('{--NO_CATEGORIES_VISIBLE--}', true); + $OUT .= displayMessage('{--NO_CATEGORIES_VISIBLE--}', TRUE); } // Return generated HTML code @@ -141,12 +141,12 @@ function registerOutputFailedMessage ($messageId, $extra='') { // Checks whether the registration data is complete function isRegistrationDataComplete () { // Init elements - $GLOBALS['registration_ip_timeout'] = false; - $GLOBALS['registration_short_password'] = false; + $GLOBALS['registration_ip_timeout'] = FALSE; + $GLOBALS['registration_short_password'] = FALSE; $GLOBALS['registration_selected_cats'] = '0'; // Default is okay - $isOkay = true; + $isOkay = TRUE; // First we only check the submitted data then we continue... :) // @@ -154,7 +154,7 @@ function isRegistrationDataComplete () { if (postRequestElement('agree') != 'Y') { setPostRequestElement('agree', '!'); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'agree=N - User did not agree with terms of usage.'); - $isOkay = false; + $isOkay = FALSE; } // END - if // Did he enter a valid email address? (we really don't care about @@ -162,19 +162,19 @@ function isRegistrationDataComplete () { if ((!isAdmin()) && ((!isPostRequestElementSet('email')) || (!isEmailValid(postRequestElement('email'))))) { setPostRequestElement('email', '!'); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter proper email address.'); - $isOkay = false; + $isOkay = FALSE; } // END - if // And what about surname and family's name? if (!isPostRequestElementSet('surname')) { setPostRequestElement('surname', '!'); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter surname.'); - $isOkay = false; + $isOkay = FALSE; } // END - if if (!isPostRequestElementSet('family')) { setPostRequestElement('family', '!'); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did not enter family name.'); - $isOkay = false; + $isOkay = FALSE; } // END - if // Get temporary array for modification @@ -187,7 +187,7 @@ function isRegistrationDataComplete () { setPostRequestArray($postArray); // Are both passwords zero length? - if ((strlen(postRequestElement('pass1')) == 0) && (strlen(postRequestElement('pass2')) == 0) && ($isOkay === true)) { + if ((strlen(postRequestElement('pass1')) == 0) && (strlen(postRequestElement('pass2')) == 0) && ($isOkay === TRUE)) { // Is the extension 'register' newer or equal 0.5.5? if ((isExtensionInstalledAndNewer('register', '0.5.5')) && (isRegisterGeneratePasswordEmptyEnabled())) { // Generate a random password @@ -203,7 +203,7 @@ function isRegistrationDataComplete () { // ... which is both not okay //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Random password generation not possible, isExtensionInstalledAndNewer(register, 0.5.5)=' . intval(isExtensionInstalledAndNewer('register', '0.5.5')) . ',isRegisterGeneratePasswordEmptyEnabled()=' . intval(isRegisterGeneratePasswordEmptyEnabled())); - $isOkay = false; + $isOkay = FALSE; } } // END - if @@ -232,14 +232,14 @@ function isRegistrationDataComplete () { setPostRequestElement('pass2', ''); } } - $isOkay = false; + $isOkay = FALSE; } // END - if // Is the password long enouth? - if ((strlen(postRequestElement('pass1')) < getPassLen()) && ($isOkay === true)) { - $GLOBALS['registration_short_password'] = true; + if ((strlen(postRequestElement('pass1')) < getPassLen()) && ($isOkay === TRUE)) { + $GLOBALS['registration_short_password'] = TRUE; //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did enter a short password.'); - $isOkay = false; + $isOkay = FALSE; } // END - if // Do this check only when no admin is logged in @@ -262,7 +262,7 @@ function isRegistrationDataComplete () { if ((isEmailTaken(postRequestElement('email'))) && (!isAdmin())) { setPostRequestElement('email', '?'); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'User did enter a already used email address.'); - $isOkay = false; + $isOkay = FALSE; } // END - if } // END - if @@ -270,7 +270,7 @@ function isRegistrationDataComplete () { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay=' . intval($isOkay)); if ((!isAdmin()) && (getIpTimeout() > 0)) { // Check his IP number - $GLOBALS['registration_ip_timeout'] = (countSumTotalData(detectRemoteAddr() , 'user_data', 'userid', 'REMOTE_ADDR', true, ' AND ((UNIX_TIMESTAMP() - `joined`) < {?ip_timeout?} OR (UNIX_TIMESTAMP() - `last_update`) < {?ip_timeout?})') == 1); + $GLOBALS['registration_ip_timeout'] = (countSumTotalData(detectRemoteAddr() , 'user_data', 'userid', 'REMOTE_ADDR', TRUE, ' AND ((UNIX_TIMESTAMP() - `joined`) < {?ip_timeout?} OR (UNIX_TIMESTAMP() - `last_update`) < {?ip_timeout?})') == 1); //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isOkay=' . intval($isOkay).',timeout='.intval($GLOBALS['registration_ip_timeout'])); $isOkay = (($isOkay) && (!$GLOBALS['registration_ip_timeout'])); } // END - if @@ -291,7 +291,7 @@ function doUserRegistration () { // Init filter data $filterData = array( // Initialization not done by default - 'init_done' => false + 'init_done' => FALSE ); // Init extra SQL data @@ -301,12 +301,12 @@ function doUserRegistration () { $filterData = runFilterChain('pre_user_registration', $filterData); // Did the initialization work? - if ($filterData['init_done'] === false) { + if ($filterData['init_done'] === FALSE) { // Something bad happened! displayMessage('{--PRE_USER_REGISTRATION_FAILED--}'); // Stop here - return false; + return FALSE; } // END - if // Create user's account... @@ -389,7 +389,7 @@ function doUserRegistration () { displayMessage('{--USER_NOT_REGISTERED--}'); // Stop here - return false; + return FALSE; } // END - if // Shall we reset random refid? Only possible with latest ext-user @@ -433,7 +433,7 @@ function doUserRegistration () { // Registration phase is done here, so for tester accounts we end here if (((getExtensionVersion('user') >= '0.5.0')) && (isTesterUserName(postRequestElement('surname'))) && (ifTesterAccountsAllowed())) { // All fine here - return true; + return TRUE; } // END - if // ... rewrite a zero referral id to the main title @@ -489,7 +489,7 @@ function doUserRegistration () { } // END - switch // Display information to the user that he got mail and send it away - $messageGuest = loadEmailTemplate('guest_register_done', $content, $filterData['register_insert_id'], false); + $messageGuest = loadEmailTemplate('guest_register_done', $content, $filterData['register_insert_id'], FALSE); // Send mail to user (confirmation link!) sendEmail($filterData['register_insert_id'], '{--GUEST_CONFIRM_LINK_SUBJECT--}', $messageGuest); @@ -498,7 +498,7 @@ function doUserRegistration () { sendAdminNotification('{--ADMIN_NEW_ACCOUNT_SUBJECT--}', 'admin_register_done', $content, $filterData['register_insert_id']); // All fine - return true; + return TRUE; } // Initialize extra registration SQL @@ -612,7 +612,7 @@ function isRegisterGeneratePasswordEmptyEnabled () { // ---------------------------------------------------------------------------- // Template helper for generating a category selection table for admin area with given configuration entry -function doTemplateAdminRegisterCategoryTable ($templateName, $clear = false, $configEntry) { +function doTemplateAdminRegisterCategoryTable ($templateName, $clear = FALSE, $configEntry) { // Call the inner function return registerGenerateCategoryTable('admin', $configEntry); } diff --git a/inc/libs/removeip_functions.php b/inc/libs/removeip_functions.php index 509828e926..647c88a085 100644 --- a/inc/libs/removeip_functions.php +++ b/inc/libs/removeip_functions.php @@ -138,7 +138,7 @@ function addAnonymityLevel () { $message = sprintf("{--REMOVEIP_LEVEL_%s--}", strtoupper($suffix)); // Output message in template - return loadTemplate('removeip_level', true, $message); + return loadTemplate('removeip_level', TRUE, $message); } // [EOF] diff --git a/inc/libs/rewrite_functions.php b/inc/libs/rewrite_functions.php index 9fd8873505..314f1ca551 100644 --- a/inc/libs/rewrite_functions.php +++ b/inc/libs/rewrite_functions.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Rewrite links in HTML for better SEO (ugly part of mx!) function rewriteLinksInCode ($code) { // Skip rewriting for configured or empty modules - if ((getModule() == '') || (isInStringIgnoreCase(getModule(), getConfig('rewrite_skip')) !== false)) { + if ((getModule() == '') || (isInStringIgnoreCase(getModule(), getConfig('rewrite_skip')) !== FALSE)) { return $code; } // END - if diff --git a/inc/libs/security_functions.php b/inc/libs/security_functions.php index 8409e0c727..67aea96219 100644 --- a/inc/libs/security_functions.php +++ b/inc/libs/security_functions.php @@ -41,7 +41,7 @@ if (defined('__SECURITY')) { } // END - if // Some security stuff... -if (strpos($_SERVER['PHP_SELF'], basename(__FILE__)) !== false) { +if (strpos($_SERVER['PHP_SELF'], basename(__FILE__)) !== FALSE) { die(); } // END - if @@ -56,9 +56,9 @@ if (strpos($_SERVER['PHP_SELF'], basename(__FILE__)) !== false) { * @param $stripTags Strip tags * @return $str A (hopefully) secured string against XSS and other bad things */ -function secureString ($str, $stripTags = true, $encode = false) { +function secureString ($str, $stripTags = TRUE, $encode = FALSE) { // Shall we strip HTML code? - if ($stripTags === true) { + if ($stripTags === TRUE) { $str = strip_tags($str); } // END - if @@ -66,7 +66,7 @@ function secureString ($str, $stripTags = true, $encode = false) { $str = trim($str); // Encode in entities if requested - if ($encode === true) { + if ($encode === TRUE) { // Encode in entities (this breakes UTF-8!) $str = htmlentities($str, ENT_QUOTES); } // END - if @@ -98,7 +98,7 @@ function securePhpSelf () { $phpSelfFile = basename($_SERVER['PHP_SELF']); // Check for a .php inside the $phpSelfDirectory... - while (strpos($phpSelfDirectory, '.php') !== false) { + while (strpos($phpSelfDirectory, '.php') !== FALSE) { // Correct the dirname $phpSelfDirectory = substr($phpSelfDirectory, 0, (strpos($phpSelfDirectory, '.php') + 4)); // Rewrite filename... @@ -111,7 +111,7 @@ function securePhpSelf () { $_SERVER['PHP_SELF'] = $phpSelfDirectory . '/' . $phpSelfFile; // Did run... - $GLOBALS['php_self_secured'] = true; + $GLOBALS['php_self_secured'] = TRUE; // Remove uneccessary variables unset($phpSelfDirectory); @@ -151,8 +151,8 @@ function detectPhpCaching () { } // Runtime/GPC quoting is off now... -ini_set('magic_quotes_runtime', false); -ini_set('magic_quotes_gpc', false); // This may not work on some systems +ini_set('magic_quotes_runtime', FALSE); +ini_set('magic_quotes_gpc', FALSE); // This may not work on some systems /* * No compatibility with Zend Engine 1, else an error like 'Implicit cloning' diff --git a/inc/libs/sponsor_functions.php b/inc/libs/sponsor_functions.php index 00e8bd66f7..b60e222682 100644 --- a/inc/libs/sponsor_functions.php +++ b/inc/libs/sponsor_functions.php @@ -43,10 +43,10 @@ if (!defined('__SECURITY')) { // function handleSponsorRequest ($postData, $update=false, $messageArray = array(), $RET_STATUS=false) { // Init a lot variables - $SAVE = true; - $UPDATE = false; - $skip = false; - $ALREADY = false; + $SAVE = TRUE; + $UPDATE = FALSE; + $skip = FALSE; + $ALREADY = FALSE; $ret = 'unused'; // Skip these entries @@ -66,10 +66,10 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() // Check only posted input entries not the submit button switch ($k) { case 'email': - $ALREADY = false; + $ALREADY = FALSE; if (!isEmailValid($v)) { // Email address is not valid - $SAVE = false; + $SAVE = FALSE; } else { // Add a new sponsor or update his data? $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE email='%s' LIMIT 1", @@ -80,10 +80,10 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() // Yes, he is! if ((getWhat() == 'add_sponsor') || ($update)) { // Already found - $ALREADY = true; + $ALREADY = TRUE; } else { // Update his data - $UPDATE = true; + $UPDATE = TRUE; } } @@ -103,7 +103,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() case 'url': if (!isUrlValid($v)) { // Don't save the URL - $SAVE = false; + $SAVE = FALSE; } // END - if break; @@ -113,7 +113,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() break; } // END - switch - if ((!empty($k)) && ($skip == false)) { + if ((!empty($k)) && ($skip == FALSE)) { // Add data array_push($DATA['keys'] , $k); array_push($DATA['values'], $v); @@ -122,7 +122,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() } // END - foreach // Save sponsor? - if ($SAVE === true) { + if ($SAVE === TRUE) { // Default is no force even when a guest want to abuse this force switch if ((empty($postData['force'])) || (!isAdmin())) $postData['force'] = '0'; @@ -144,10 +144,10 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() // Generate message $message = getMessageFromIndexedArray('{--ADMIN_SPONSOR_UPDATED--}', 'updated', $messageArray); $ret = 'updated'; - } elseif (($ALREADY === false) || (($postData['force'] == 1) && (isAdmin()))) { + } elseif (($ALREADY === FALSE) || (($postData['force'] == 1) && (isAdmin()))) { // Add new sponsor, first add more data array_push($DATA['keys'], 'status'); - if (($update === true) && (isAdmin()) && (getWhat() == 'add_sponsor')) { + if (($update === TRUE) && (isAdmin()) && (getWhat() == 'add_sponsor')) { // Only allowed for admin array_push($DATA['values'], 'PENDING'); @@ -183,7 +183,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() // Generate message $message = getMessageFromIndexedArray('{--ADMIN_SPONSOR_ADDED--}', 'added', $messageArray); $ret = 'added'; - } elseif (($update === true) && (isAdmin())) { + } elseif (($update === TRUE) && (isAdmin())) { // Add all data as hidden data $OUT = ''; foreach ($postData as $k => $v) { @@ -198,7 +198,7 @@ function handleSponsorRequest ($postData, $update=false, $messageArray = array() $content['email'] = $postData['email']; // Ask for adding a sponsor with same email address - loadTemplate('admin_add_sponsor_already', false, $content); + loadTemplate('admin_add_sponsor_already', FALSE, $content); return; } else { // Already added! @@ -243,7 +243,7 @@ function translateSponsorStatus ($status) { // Search for an email address in the database function isSponsorRegisteredWithEmail ($email) { // Is there already the provided email address in database? - $ret = (countSumTotalData($email, 'sponsor_data', 'id', 'email', true) == 1); + $ret = (countSumTotalData($email, 'sponsor_data', 'id', 'email', TRUE) == 1); // Return result return $ret; @@ -252,7 +252,7 @@ function isSponsorRegisteredWithEmail ($email) { // Wether the current user is a sponsor function isSponsor () { // Failed is default - $ret = false; + $ret = FALSE; // Determine it $ret = ( @@ -307,17 +307,17 @@ ORDER BY if ($current == $content2['sub_what']) $content2['sub_title'] = '' . $content2['sub_title'] . ''; // Load row template - $SUB .= loadTemplate('sponsor_what', true, $content2); + $SUB .= loadTemplate('sponsor_what', TRUE, $content2); } // END - while // Prepare data for the main template $content['menu'] = $SUB; // Load menu template - $OUT .= loadTemplate('sponsor_action', true, $content); + $OUT .= loadTemplate('sponsor_action', TRUE, $content); } else { // No sub menus active - $OUT .= displayMessage('{--SPONSOR_NO_SUB_MENUS_ACTIVE--}', true); + $OUT .= displayMessage('{--SPONSOR_NO_SUB_MENUS_ACTIVE--}', TRUE); } // Free memory @@ -325,7 +325,7 @@ ORDER BY } // END - while } else { // No main menus active - $OUT .= displayMessage('{--SPONSOR_NO_MAIN_MENUS_ACTIVE--}', true); + $OUT .= displayMessage('{--SPONSOR_NO_MAIN_MENUS_ACTIVE--}', TRUE); } // Free memory @@ -347,7 +347,7 @@ function addSponsorContent ($what) { loadIncludeOnce($INC); } else { // File not found - $GLOBALS['sponsor_output'] .= displayMessage('{%message,SPONSOR_CONTENT_404=' . $what . '%}', true); + $GLOBALS['sponsor_output'] .= displayMessage('{%message,SPONSOR_CONTENT_404=' . $what . '%}', TRUE); } // Return content @@ -357,7 +357,7 @@ function addSponsorContent ($what) { // function updateSponsorLogin () { // Failed by default - $login = false; + $login = FALSE; // Is sponsor? if (isSponsor()) { @@ -385,7 +385,7 @@ LIMIT 1", // Saves sponsor's data function saveSponsorData ($postData, $content) { - $EMAIL = false; + $EMAIL = FALSE; // Unsecure data which we don't want $UNSAFE = array('password', 'id', 'remote_addr', 'sponsor_created', 'last_online', 'status', 'ref_count', @@ -427,7 +427,7 @@ function saveSponsorData ($postData, $content) { if ((!empty($content['email'])) && (!empty($postData['email']))) { if ($content['email'] != $postData['email']) { // Change email address - $EMAIL = true; + $EMAIL = TRUE; // Okay, has changed then add status with UNCONFIRMED and new hash code $sql .= " `status`='EMAIL',`hash`='%s',"; @@ -451,7 +451,7 @@ function saveSponsorData ($postData, $content) { // Saving data was completed... ufff... switch (getWhat()) { case 'account': // Change account data - if ($EMAIL === true) { + if ($EMAIL === TRUE) { $message = '{--SPONSOR_ACCOUNT_EMAIL_CHANGED--}'; $templ = 'admin_sponsor_change_email'; $subject = '{--ADMIN_SPONSOR_ACC_EMAIL_SUBJECT--}'; @@ -503,7 +503,7 @@ function saveSponsorData ($postData, $content) { $email_msg = loadEmailTemplate('sponsor_change_data', $content); sendEmail($content['email'], '{--SPONSOR_ACC_DATA_SUBJECT--}', $email_msg); - if ($EMAIL === true) { + if ($EMAIL === TRUE) { // Add hash code to content array $content['hash'] = $HASH; @@ -565,7 +565,7 @@ function doProcessSponsorFormRequest ($messageArray = array()) { $message = ''; // Handle the request - $status = handleSponsorRequest(postRequestArray(), true, $messageArray, true); + $status = handleSponsorRequest(postRequestArray(), TRUE, $messageArray, TRUE); // Check the status of the registration process switch ($status) { @@ -672,15 +672,15 @@ function fetchSponsorData ($sponsor_id, $column = 'id') { reportBug(__FUNCTION__, __LINE__, 'Sponsor id ' . $sponsor_id . ' is invalid.'); } elseif (isSponsorDataValid()) { // Use cache, so it is fine - return true; + return TRUE; } } elseif (isSponsorDataValid()) { // Use cache, so it is fine - return true; + return TRUE; } // By default none was found - $found = false; + $found = FALSE; // Extra statements $ADD = ''; @@ -768,7 +768,7 @@ function getFetchedSponsorData ($keyColumn, $sponsor_id, $valueColumn) { // in, but you should use isMember() if you want to find that out. function isSponsorDataValid () { // Sponsor id should not be zero so abort here - if (!isCurrentSponsorIdSet()) return false; + if (!isCurrentSponsorIdSet()) return FALSE; // Is it cached? if (!isset($GLOBALS['is_sponsor_data_valid'][getCurrentSponsorId()])) { diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 6b62afbc0c..bcb6e6ca07 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -50,27 +50,27 @@ function doSurfbarAdminAddUrl ($url, $limit, $reload) { if (!isAdmin()) { // Not an admin //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Not admin.", $url, $limit, $reload)); - return false; + return FALSE; } elseif (!isUrlValid($url)) { // URL invalid //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid URL.", $url, $limit, $reload)); - return false; + return FALSE; } elseif (ifSurfbarHasUrlUserId($url, 0)) { // URL already found in surfbar! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Already added.", $url, $limit, $reload)); - return false; + return FALSE; } elseif (!ifSurfbarMemberAllowedMoreUrls()) { // No more allowed! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: No more URLs allowed.", $url, $limit, $reload)); - return false; + return FALSE; } elseif ('' . ($limit + 0) . '' != '' . $limit . '') { // Invalid limit entered //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid limit entered.", $url, $limit, $reload)); - return false; + return FALSE; } elseif ('' . ($reload + 0) . '' != '' . $reload . '') { // Invalid amount entered //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, sprintf("Cannot add URL=%s,limit=%s,reload=%s: Invalid reload entered.", $url, $limit, $reload)); - return false; + return FALSE; } // Register the new URL @@ -83,19 +83,19 @@ function doSurfbarAdminMigrateUrl ($url, $userid) { if (!isAdmin()) { // Not an admin //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Not admin, url=' . $url . ',userid=' . $userid); - return false; + return FALSE; } elseif (!isUrlValid($url)) { // URL invalid //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Invalid URL, url=' . $url . ',userid=' . $userid); - return false; + return FALSE; } elseif (ifSurfbarHasUrlUserId($url, $userid)) { // URL already found in surfbar! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Already added, url=' . $url . ',userid=' . $userid); - return false; + return FALSE; } elseif (!ifSurfbarMemberAllowedMoreUrls($userid)) { // No more allowed! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot migrate URL: Maximum exceeded, url=' . $url . ',userid=' . $userid); - return false; + return FALSE; } // Register the new URL @@ -108,19 +108,19 @@ function doSurfbarAdminUnlockUrlIds ($IDs) { if (!isAdmin()) { // Not admin or invalid ids array //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not admin'); - return false; + return FALSE; } elseif (!is_array($IDs)) { // No array //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs type ' . gettype($IDs) . '!=array'); - return false; + return FALSE; } elseif (count($IDs) == 0) { // Empty array //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs is empty'); - return false; + return FALSE; } // Set to true to make AND expression valid if first URL got unlocked - $done = true; + $done = TRUE; // Update the status for all ids foreach ($IDs as $id => $dummy) { @@ -138,19 +138,19 @@ function doSurfbarAdminRejectUrlIds ($IDs) { if (!isAdmin()) { // Not admin or invalid ids array //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Not admin'); - return false; + return FALSE; } elseif (!is_array($IDs)) { // No array //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs type ' . gettype($IDs) . '!=array'); - return false; + return FALSE; } elseif (count($IDs) == 0) { // Empty array //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: IDs is empty'); - return false; + return FALSE; } // Set to true to make AND expression valid if first URL got unlocked - $done = true; + $done = TRUE; // Update the status for all ids foreach ($IDs as $id => $dummy) { @@ -172,23 +172,23 @@ function doSurfbarMemberAddUrl ($url, $limit) { if (!isMember()) { // Not a member //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: isMember()=false'); - return false; + return FALSE; } elseif ((!isUrlValid($url)) && (!isAdmin())) { // URL invalid //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid, url=' . $url . ',limit=' . $limit); - return false; + return FALSE; } elseif (ifSurfbarHasUrlUserId($url, getMemberId())) { // URL already found in surfbar! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Already found, url=' . $url . ',limit=' . $limit); - return false; + return FALSE; } elseif (!ifSurfbarMemberAllowedMoreUrls(getMemberId())) { // No more allowed! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Maximum exceeded, url=' . $url . ',limit=' . $limit); - return false; + return FALSE; } elseif (''.($limit + 0).'' != ''.$limit.'') { // Invalid amount entered //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Invalid limit, url=' . $url . ',limit=' . $limit); - return false; + return FALSE; } // Register the new URL @@ -207,7 +207,7 @@ function generateSurfbarMemberActions ($urlId, $status) { $OUT = ''; foreach ($actionArray as $actionId => $action) { // Add form for this action - $OUT .= loadTemplate('member_list_surfbar_form', true, array( + $OUT .= loadTemplate('member_list_surfbar_form', TRUE, array( 'width' => $width, 'url_id' => bigintval($urlId), 'action' => strtolower($action) @@ -215,7 +215,7 @@ function generateSurfbarMemberActions ($urlId, $status) { } // END - foreach // Load main template - $output = loadTemplate('member_list_surfbar_table', true, $OUT); + $output = loadTemplate('member_list_surfbar_table', TRUE, $OUT); // Return code return $output; @@ -224,25 +224,25 @@ function generateSurfbarMemberActions ($urlId, $status) { // Do the member form request function doSurfbarMemberByFormData ($formData, $urlArray) { // By default no action is performed - $performed = false; + $performed = FALSE; // Is this a member? if (!isMember()) { // No member! /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: isMember()=false'); - return false; + return FALSE; } elseif ((!isset($formData['url_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; + return FALSE; } elseif (!isset($urlArray[$formData['url_id']])) { // Id not found in cache /* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Cannot add URL: Field url_id not found in cache'); - return false; + return FALSE; } elseif (!isSurfbarMemberActionStatusValid($formData['action'], $urlArray[$formData['url_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['url_id']]['url_status'] . ',url_id=' . $formData['url_id']); - return false; + return FALSE; } // Secure action @@ -251,7 +251,7 @@ function doSurfbarMemberByFormData ($formData, $urlArray) { // Has it changed? if ($action != $formData['action']) { // Invalid data in action found - return false; + return FALSE; } // END - if // Create the function name for selected action @@ -320,7 +320,7 @@ function isSurfbarMemberActionStatusValid ($action, $status) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'action=' . $action . ',status=' . $status . ',isValid=' . intval($isValid)); // Fetch the new status if found - if ($isValid === true) { + if ($isValid === TRUE) { // Load new status list($GLOBALS['surfbar_cache']['new_status']) = SQL_FETCHROW($result); } // END - if @@ -425,16 +425,16 @@ function displaySurfbarMemberActionForm ($action, $urlData) { } // END - if // Load the form and display it - loadTemplate(sprintf("member_surfbar_%s_action_form", $action), false, $urlData); + loadTemplate(sprintf("member_surfbar_%s_action_form", $action), FALSE, $urlData); // All fine by default ... ;-) - return true; + return TRUE; } // Execute choosen action function executeSurfbarMemberAction ($action, $urlData) { // By default nothing is executed - $executed = false; + $executed = FALSE; // Is limitation "no" and "limit" is > 0? if ((isset($urlData[$action]['limited'])) && ($urlData[$action]['limited'] != 'Y') && ((isset($urlData[$action]['limit'])) && ($urlData[$action]['limit'] > 0)) || (!isset($urlData[$action]['limit']))) { @@ -448,7 +448,7 @@ function executeSurfbarMemberAction ($action, $urlData) { // Is that function there? if (function_exists($functionName)) { // Execute the function - if (call_user_func_array($functionName, array($urlData)) == true) { + if (call_user_func_array($functionName, array($urlData)) == TRUE) { // Update status as well $executed = changeSurfbarUrlStatus($urlData['url_id'], $urlData['url_status'], $urlData['new_status'], array($urlData['url_id'] => $urlData)); } // END - if @@ -464,10 +464,10 @@ function executeSurfbarMemberAction ($action, $urlData) { // "Execute edit" function: Update changed data function executeSurfbarMemberEditAction ($urlData) { // Default is nothing done - $status = false; + $status = FALSE; // Has the URL or limit changed? - if (true) { + if (TRUE) { //if (($urlData['url_views_allowed'] != $urlData['edit']['limit']) || ($url1 != $url2)) { // Run the query SQL_QUERY_ESC("UPDATE @@ -489,7 +489,7 @@ LIMIT 1", ), __FUNCTION__, __LINE__); // All fine - $status = true; + $status = TRUE; } // END - if // Return status @@ -499,7 +499,7 @@ LIMIT 1", // "Execute delete" function: Does nothing... function executeSurfbarMemberDeleteAction ($urlData) { // Nothing special to do (see above function for such "special actions" to perform) - return true; + return TRUE; } //------------------------------------------------------------------------------ @@ -676,7 +676,7 @@ function doSurfbarRegisterUrl ($url, $userid, $status = 'PENDING', $addMode = 'r // Is this id valid? if ($content['insert_id'] == '0') { // INSERT did not insert any data! - return false; + return FALSE; } // END - if // If in reg-mode we notify admin @@ -745,7 +745,7 @@ function doSurfbarNotifyAdmin ($messageType, $content) { function doSurfbarNotifyMember ($messageType, $content) { // Skip notification if userid is zero if ($content['url_userid'] == '0') { - return false; + return FALSE; } // END - if // Prepare template name @@ -853,14 +853,14 @@ function translateMemberSurfbarActionToSubmit ($action) { } // Determine reward -function determineSurfbarReward ($onlyMin = false) { +function determineSurfbarReward ($onlyMin = FALSE) { // Static values are default $reward = getConfig('surfbar_static_reward'); // Is there static or dynamic? if (getSurfbarPaymentModel() == 'DYNAMIC') { // "Calculate" dynamic reward - if ($onlyMin === true) { + if ($onlyMin === TRUE) { $reward += calculateSurfbarDynamicMininumValue(); } else { $reward += calculateSurfbarDynamicAddValue(); @@ -924,7 +924,7 @@ function determineSurfbarTemplateName() { function isSurfbarReloadFull () { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Fixed surf lock is ' . getConfig('surfbar_static_lock') . ' - ENTERED!'); // Default is full! - $isFull = true; + $isFull = TRUE; // Cache static reload lock $GLOBALS['surfbar_cache']['surf_lock'] = getConfig('surfbar_static_lock'); @@ -1058,7 +1058,7 @@ function getSurfbarTotalUserUrls ($userid = NULL, $status = '', $exclude = '') { } // Get amount from database - $count = countSumTotalData($userid, 'surfbar_urls', 'url_id', 'url_userid', true, $add); + $count = countSumTotalData($userid, 'surfbar_urls', 'url_id', 'url_userid', TRUE, $add); // Return result return $count; @@ -1071,11 +1071,11 @@ function generateSurfbarValidationCode ($urlId, $salt = '') { if (empty($salt)) { // Generate random hashed string $GLOBALS['surfbar_cache']['salt'] = sha1(generatePassword(mt_rand(200, 255))); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newSalt='.gerSurfbarSalt().'', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'newSalt='.gerSurfbarSalt().'', FALSE); } else { // Use this as salt! $GLOBALS['surfbar_cache']['salt'] = $salt; - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'oldSalt='.gerSurfbarSalt().'', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'oldSalt='.gerSurfbarSalt().'', FALSE); } // Hash it with md5() and salt it with the random string @@ -1107,7 +1107,7 @@ function isSurfbarValidationCodeValid ($urlId, $check, $salt) { function addSurfbarReloadLockById ($urlId) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',getMemberId()=' . getMemberId() . ' - ENTERED!'); // Search for an entry - $countLock = countSumTotalData(getMemberId(), 'surfbar_locks', 'locks_id', 'locks_userid', true, ' AND `locks_url_id`=' . bigintval($urlId)); + $countLock = countSumTotalData(getMemberId(), 'surfbar_locks', 'locks_id', 'locks_userid', TRUE, ' AND `locks_url_id`=' . bigintval($urlId)); // Is there no record? if ($countLock == 0) { @@ -1431,7 +1431,7 @@ function changeSurfbarUrlStatus ($urlId, $prevStatus, $newStatus, $data = array( // ---------- Comment out for debugging/developing member actions! --------- if (SQL_AFFECTEDROWS() != 1) { // No, something went wrong - return false; + return FALSE; } // END - if // ---------- Comment out for debugging/developing member actions! --------- @@ -1443,7 +1443,7 @@ function changeSurfbarUrlStatus ($urlId, $prevStatus, $newStatus, $data = array( // All done! //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'urlId=' . $urlId . ',prevStatus=' . $prevStatus . ',newStatus=' . $newStatus . ' - EXIT!'); - return true; + return TRUE; } // Calculate minimum value for dynamic payment model @@ -1807,9 +1807,9 @@ LIMIT 1", //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'lastQuery='.getConfig('db_last_query').'|numRows='.SQL_NUMROWS($result).'|Affected='.SQL_AFFECTEDROWS()); if (SQL_NUMROWS($result) == 1) { // Load/cache data - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count('.count($GLOBALS['surfbar_cache']).') - BEFORE', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count('.count($GLOBALS['surfbar_cache']).') - BEFORE', FALSE); $GLOBALS['surfbar_cache'] = merge_array($GLOBALS['surfbar_cache'], SQL_FETCHARRAY($result)); - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count('.count($GLOBALS['surfbar_cache']).') - AFTER', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'count('.count($GLOBALS['surfbar_cache']).') - AFTER', FALSE); // Determine waiting time $GLOBALS['surfbar_cache']['time'] = determineSurfbarWaitingTime(); @@ -1817,14 +1817,14 @@ LIMIT 1", // Is the last salt there? if (is_null($GLOBALS['surfbar_cache']['salts_last_salt'])) { // Then repair it wit the static! - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_salt - FIXED!', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_salt - FIXED!', FALSE); $GLOBALS['surfbar_cache']['salts_last_salt'] = ''; } // END - if // Fix missing last_surfed if ((!isset($GLOBALS['surfbar_cache']['last_surfed'])) || (is_null($GLOBALS['surfbar_cache']['last_surfed']))) { // Fix it here - //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_surfed - FIXED!', false); + //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'last_surfed - FIXED!', FALSE); $GLOBALS['surfbar_cache']['last_surfed'] = '0'; } // END - if @@ -1922,7 +1922,7 @@ function getSurfbarPaymentModel () { //------------------------------------------------------------------------------ // Template helper to generate a selection box for surfbar actions -function doTemplateSurfbarActionsActionSelectionBox ($templateName, $clear = false, $default = NULL) { +function doTemplateSurfbarActionsActionSelectionBox ($templateName, $clear = FALSE, $default = NULL) { // Init array $actionsAction = array( 0 => array('actions_action' => 'EDIT'), @@ -1936,14 +1936,14 @@ function doTemplateSurfbarActionsActionSelectionBox ($templateName, $clear = fal ); // Handle it over to generateSelectionBoxFromArray() - $content = generateSelectionBoxFromArray($actionsAction, 'surfbar_actions_action', 'actions_action', '', '', '', $default, '', false, true); + $content = generateSelectionBoxFromArray($actionsAction, 'surfbar_actions_action', 'actions_action', '', '', '', $default, '', FALSE, TRUE); // Return prepared content return $content; } // Template helper to generate a selection box for surfbar status -function doTemplateSurfbarActionsStatusSelectionBox ($templateName, $clear = false, $default = NULL) { +function doTemplateSurfbarActionsStatusSelectionBox ($templateName, $clear = FALSE, $default = NULL) { // Init array $status = array( 0 => array('actions_status' => 'PENDING'), @@ -1957,14 +1957,14 @@ function doTemplateSurfbarActionsStatusSelectionBox ($templateName, $clear = fal ); // Handle it over to generateSelectionBoxFromArray() - $content = generateSelectionBoxFromArray($status, 'surfbar_actions_status', 'actions_status', '', '', '', $default, '', false, true); + $content = generateSelectionBoxFromArray($status, 'surfbar_actions_status', 'actions_status', '', '', '', $default, '', FALSE, TRUE); // Return prepared content return $content; } // Template helper to generate a selection box for surfbar status -function doTemplateSurfbarActionsNewStatusSelectionBox ($templateName, $clear = false, $default = NULL) { +function doTemplateSurfbarActionsNewStatusSelectionBox ($templateName, $clear = FALSE, $default = NULL) { // Init array $status = array( 0 => array('actions_new_status' => 'PENDING'), @@ -1978,7 +1978,7 @@ function doTemplateSurfbarActionsNewStatusSelectionBox ($templateName, $clear = ); // Handle it over to generateSelectionBoxFromArray() - $content = generateSelectionBoxFromArray($status, 'surfbar_actions_new_status', 'actions_new_status', '', '', '', $default, '', true, true); + $content = generateSelectionBoxFromArray($status, 'surfbar_actions_new_status', 'actions_new_status', '', '', '', $default, '', TRUE, TRUE); // Return prepared content return $content; diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php index b8258a4d0d..4184c6722a 100644 --- a/inc/libs/task_functions.php +++ b/inc/libs/task_functions.php @@ -82,7 +82,7 @@ function outputAdvancedOverview (&$result_main) { } // END - foreach // Extension updates found - $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', true, " AND `status`='NEW' AND `task_type`='EXTENSION_UPDATE'"); + $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', TRUE, " AND `status`='NEW' AND `task_type`='EXTENSION_UPDATE'"); if ($value > 0) { $content['update_tasks'] = '' . $value . ''; @@ -128,7 +128,7 @@ function outputAdvancedOverview (&$result_main) { // // Unassigned tasks // - $value = countSumTotalData(0, 'task_system', 'id', 'assigned_admin', true, " AND `status` != 'DELETED'"); + $value = countSumTotalData(0, 'task_system', 'id', 'assigned_admin', TRUE, " AND `status` != 'DELETED'"); if ($value > 0) { $content['new_tasks'] = '' . $value . ''; @@ -137,7 +137,7 @@ function outputAdvancedOverview (&$result_main) { // // Closed tasks // - $value = countSumTotalData('CLOSED', 'task_system', 'id', 'status', true); + $value = countSumTotalData('CLOSED', 'task_system', 'id', 'status', TRUE); if ($value > 0) { $content['closed_tasks'] = '' . $value . ''; @@ -146,7 +146,7 @@ function outputAdvancedOverview (&$result_main) { // // Deleted tasks // - $value = countSumTotalData('DELETED', 'task_system', 'id', 'status', true); + $value = countSumTotalData('DELETED', 'task_system', 'id', 'status', TRUE); if ($value > 0) { $content['deleted_tasks'] = '' . $value . ''; @@ -155,7 +155,7 @@ function outputAdvancedOverview (&$result_main) { // // Solved tasks // - $value = countSumTotalData('SOLVED', 'task_system', 'id', 'status', true, sprintf(" AND `assigned_admin`=%s", getCurrentAdminId())); + $value = countSumTotalData('SOLVED', 'task_system', 'id', 'status', TRUE, sprintf(" AND `assigned_admin`=%s", getCurrentAdminId())); if ($value > 0) { $content['solved_tasks'] = '' . $value . ''; @@ -164,7 +164,7 @@ function outputAdvancedOverview (&$result_main) { // // Your tasks // - $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', true, " AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'"); + $value = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', TRUE, " AND `status`='NEW' AND task_type != 'EXTENSION_UPDATE'"); if ($value > 0) { $content['your_tasks'] = '' . $value . ''; @@ -173,7 +173,7 @@ function outputAdvancedOverview (&$result_main) { // // Mails waiting to be approved // - $value = countSumTotalData('ADMIN', 'pool', 'id', 'data_type', true); + $value = countSumTotalData('ADMIN', 'pool', 'id', 'data_type', TRUE); if ($value > 0) { $content['pending_mails'] = '' . $value . ''; @@ -182,7 +182,7 @@ function outputAdvancedOverview (&$result_main) { // // Unfinished mail orders // - $value = countSumTotalData('TEMP', 'pool', 'id', 'data_type', true); + $value = countSumTotalData('TEMP', 'pool', 'id', 'data_type', TRUE); if ($value > 0) { $content['canceled_mails'] = '' . $value . ''; @@ -191,7 +191,7 @@ function outputAdvancedOverview (&$result_main) { // // Sent mail orders // - $value = countSumTotalData('SEND', 'pool', 'id', 'data_type', true); + $value = countSumTotalData('SEND', 'pool', 'id', 'data_type', TRUE); if ($value > 0) { $content['send_emails'] = '' . $value . ''; @@ -202,7 +202,7 @@ function outputAdvancedOverview (&$result_main) { // if (isExtensionActive('autopurge')) { // Get auto-purged mails - $value = countSumTotalData('DELETED', 'pool', 'id', 'data_type', true); + $value = countSumTotalData('DELETED', 'pool', 'id', 'data_type', TRUE); if ($value > 0) { $content['purged_mails'] = '' . $value . ''; @@ -213,7 +213,7 @@ function outputAdvancedOverview (&$result_main) { // if (isExtensionInstalledAndNewer('bonus', '0.1.8')) { // Get auto-purged bonus mails - $value = countSumTotalData('DELETED', 'bonus', 'id', 'data_type', true); + $value = countSumTotalData('DELETED', 'bonus', 'id', 'data_type', TRUE); if ($value > 0) { $content['purged_bonus_mails'] = '' . $value . ''; @@ -233,7 +233,7 @@ function outputAdvancedOverview (&$result_main) { // if (isExtensionInstalledAndNewer('bonus', '0.1.8')) { // Get sent bonus mails (but not notifications) - $value = countSumTotalData('SEND', 'bonus', 'id', 'data_type', true, " AND `is_notify`='N'"); + $value = countSumTotalData('SEND', 'bonus', 'id', 'data_type', TRUE, " AND `is_notify`='N'"); if ($value > 0) { $content['send_bonus_mails'] = '' . $value . ''; @@ -532,7 +532,7 @@ ORDER BY $content['extra_table'] = $EXTRAS; // Simply load the template... :-) - loadTemplate('admin_overview_task', false, $content); + loadTemplate('admin_overview_task', FALSE, $content); } // @@ -571,12 +571,12 @@ function createExtraTaskRows ($WHATs, $DESCRs, $TITLEs) { SQL_FREERESULT($result); // And insert the final string into extras template - $OUT .= loadTemplate('admin_overview_task_rows', true, $content); + $OUT .= loadTemplate('admin_overview_task_rows', TRUE, $content); } // END- foreach } // END - foreach // Return output in the template - return loadTemplate('admin_overview_task_extras', true, $OUT); + return loadTemplate('admin_overview_task_extras', TRUE, $OUT); } // [EOF] diff --git a/inc/libs/theme_functions.php b/inc/libs/theme_functions.php index a044e8a06c..1a8e05bba2 100644 --- a/inc/libs/theme_functions.php +++ b/inc/libs/theme_functions.php @@ -106,7 +106,7 @@ ORDER BY ); // Return generated selection - return loadTemplate('theme_select_form', true, $content); + return loadTemplate('theme_select_form', TRUE, $content); } // Get version from name @@ -157,11 +157,11 @@ function isThemeActive ($name) { // Is the extension 'theme' installed? if (!isExtensionActive('theme')) { // Then abort here - return false; + return FALSE; } // END - if // Default is nothing active - $active = false; + $active = FALSE; // Is the cache entry there? if (isset($GLOBALS['cache_array']['themes']['theme_active'][$name])) { @@ -234,7 +234,7 @@ function getActualTheme () { // Set default theme setMailerTheme($ret); } elseif ((isMailerThemeSet()) && (isExtensionInstalledAndNewer('sql_patches', '0.1.4'))) { - //die("
".print_r($GLOBALS['cache_array']['themes'], true)."
"); + //die("
".print_r($GLOBALS['cache_array']['themes'], TRUE)."
"); // Get theme from cookie $ret = getSession('mailer_theme'); diff --git a/inc/libs/uberwach_functions.php b/inc/libs/uberwach_functions.php index bcd6764eb1..77a9c2ba85 100644 --- a/inc/libs/uberwach_functions.php +++ b/inc/libs/uberwach_functions.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { // Loads the snippet for the uberwach action function loadUberwachSnippet () { // Simply load the template here - $GLOBALS['__page_footer'] .= loadTemplate('uberwach_snippet', true); + $GLOBALS['__page_footer'] .= loadTemplate('uberwach_snippet', TRUE); } // [EOF] diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index bce9fc7579..a8718292e4 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -77,7 +77,7 @@ function addAlphabeticalSorting ($sortby) { ); // Load template - $OUT = loadTemplate('admin_list_user_alpha', true, $content); + $OUT = loadTemplate('admin_list_user_alpha', TRUE, $content); // Return generated code return $OUT; @@ -129,7 +129,7 @@ function addSortLinks ($letter, $sortby) { $content['list'] = substr($OUT, 0, -1); // Load template - $OUT = loadTemplate('admin_list_user_sort', true, $content); + $OUT = loadTemplate('admin_list_user_sort', TRUE, $content); // Return code return $OUT; @@ -181,7 +181,7 @@ function addPageNavigation ($numPages) { $content['list'] = $OUT; // Load template - $OUT = loadTemplate('admin_list_user_pagenav', true, $content); + $OUT = loadTemplate('admin_list_user_pagenav', TRUE, $content); } // END - if // Return code @@ -233,7 +233,7 @@ function determineRandomReferralId () { // Is the extension version fine? if ((isRandomReferralIdEnabled()) && (isExtensionInstalledAndNewer('user', '0.3.4'))) { // Get all user ids - $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true, runFilterChain('user_exclusion_sql', ' AND `rand_confirmed` >= {?user_min_confirmed?}')); + $totalUsers = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', TRUE, runFilterChain('user_exclusion_sql', ' AND `rand_confirmed` >= {?user_min_confirmed?}')); // Is there at least one? if ($totalUsers > 0) { @@ -269,7 +269,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p $add = ''; $errorCode = '0'; $ext = ''; - $isFound = false; + $isFound = FALSE; // Init array $content = array( @@ -294,7 +294,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p } // No error found? - if (($errorCode == '0') && ($isFound === true)) { + if (($errorCode == '0') && ($isFound === TRUE)) { // Get user data array and set userid (e.g. important if we login with nickname) $content = getUserDataArray(); if (!empty($content['userid'])) { @@ -327,7 +327,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p array($content['hash'], $userid), __FUNCTION__, __LINE__); // No login bonus by default - $GLOBALS['bonus_payed'] = false; + $GLOBALS['bonus_payed'] = FALSE; // Is bonus up-to-date? if (isExtensionInstalledAndNewer('bonus', '0.2.2')) { @@ -342,7 +342,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p if ($probe >= getConfig('login_timeout')) { // Add login bonus to user's account $add = ',`login_bonus`=`login_bonus`+{?login_bonus?}'; - $GLOBALS['bonus_payed'] = true; + $GLOBALS['bonus_payed'] = TRUE; // Subtract login bonus from userid's account or jackpot if ((isExtensionInstalledAndNewer('bonus', '0.3.5')) && (getBonusMode() != 'ADD')) { @@ -366,7 +366,7 @@ function doUserLogin ($userid, $passwd, $successUrl = '', $errorUrl = 'modules.p // Is a success URL set? if (empty($successUrl)) { // Procedure to checking for login data - if (($GLOBALS['bonus_payed'] === true) && (isExtensionActive('bonus'))) { + if (($GLOBALS['bonus_payed'] === TRUE) && (isExtensionActive('bonus'))) { // Bonus added (just displaying!) $url = 'modules.php?module=chk_login&do=bonus'; } else { @@ -427,7 +427,7 @@ function doNewUserPassword ($email, $userid) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'email=' . $email . ',userid=' . $userid . ' - ENTERED!'); // Init found-status and error $errorCode = ''; - $accountFound = false; + $accountFound = FALSE; // Probe userid/nickname if (!empty($email)) { @@ -445,7 +445,7 @@ function doNewUserPassword ($email, $userid) { } // Any entry found? - if ($accountFound === true) { + if ($accountFound === TRUE) { // Is the account confirmed if (getUserData('status') == 'CONFIRMED') { // Generate new password @@ -534,11 +534,11 @@ function insertUserStatsRecord ($userid, $statsType, $statsData) { // Is the extension installed and updated? if ((!isExtensionActive('sql_patches')) || (isExtensionInstalledAndOlder('sql_patches', '0.5.6'))) { // Return zero here - return false; + return FALSE; } // END - if // Default is not working - $return = false; + $return = FALSE; // Does it exist? if ((!getEpocheTimeFromUserStats($statsType, $statsData, $userid)) && (!is_array($statsData))) { @@ -728,7 +728,7 @@ function getTotalTesterUsers () { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = countSumTotalData('', 'user_data', 'userid', '', true, runFilterChain('user_inclusion_sql')); + $GLOBALS[__FUNCTION__] = countSumTotalData('', 'user_data', 'userid', '', TRUE, runFilterChain('user_inclusion_sql')); } // END - if // Return cache @@ -765,7 +765,7 @@ function getNextFreeTesterUserNumber () { // Wrapper function to return a selection box for tester user default referral id function addTesterUserDefaultRefidSelectionBox ($fieldName = 'tester_user_default_refid') { // Return it - return addMemberSelectionBox(getConfig('tester_user_default_refid'), false, true, true, $fieldName, " WHERE `surname` LIKE '{?tester_user_surname_prefix?}%'"); + return addMemberSelectionBox(getConfig('tester_user_default_refid'), FALSE, TRUE, TRUE, $fieldName, " WHERE `surname` LIKE '{?tester_user_surname_prefix?}%'"); } // Checks whether given surname is a test user name @@ -783,7 +783,7 @@ function createTesterUserAccount () { if (!isRegistrationDataComplete()) { // Then abort here //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'isRegistrationDataComplete()=false, please check if you e.g. have selected the required minimum of categories.'); - return false; + return FALSE; } // END - if // Do registration @@ -802,24 +802,54 @@ function isMemberSubIdFree ($subId) { assert(isMember()); // Check it - $isFree = (countSumTotalData(getMemberId(), 'user_subids', 'id', 'userid', true, sprintf(" AND `subid`='%s'", $subId)) == 0); + $isFree = (countSumTotalData(getMemberId(), 'user_subids', 'id', 'userid', TRUE, sprintf(" AND `subid`='%s'", $subId)) == 0); // Return result return $isFree; } -// Prepares given sub id for storage in database -function prepareSubId ($subId) { +// Checks whether the sub id is valid +function isValidSubId ($subId) { // First convert any spaces/dashes to underscores $subId = str_replace(' ', '_', str_replace('-', '_', $subId)); // Then filter out any unwanted characters - $subId = preg_replace('/([^a-zA-Z0-9_])/', '', $subId); + $subIdTest = preg_replace('/([^a-zA-Z0-9_])/', '', $subId); + + // Is it valid? + return ($subId == $subIdTest); +} // END - if + +// Prepares found sub id for updating in database +function prepareFoundSubId ($subId) { + // Then check if it is valid and available + if ((!isValidSubId($subId)) || (isMemberSubIdFree($subId))) { + // Is not free or invalid + $subId = FALSE; + } // END - if + + // Return prepared sub id + return $subId; +} + +// Validates sub id and returns FALSE if not valid +function validateSubId ($subId) { + // Then check if it is valid and available + if (!isValidSubId($subId)) { + // Is not free or invalid + $subId = FALSE; + } // END - if + + // Return prepared sub id + return $subId; +} - // Then Check if it is available - if (!isMemberSubIdFree($subId)) { - // Is not free - $subId = false; +// Prepares given sub id for inserting into database +function prepareSubId ($subId) { + // Then check if it is valid and available + if ((!isValidSubId($subId)) || (!isMemberSubIdFree($subId))) { + // Is not free or invalid + $subId = FALSE; } // END - if // Return prepared sub id @@ -883,7 +913,7 @@ function getTotalMemberSubIds () { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it - $GLOBALS[__FUNCTION__] = countSumTotalData(getMemberId(), 'user_subids', 'id', 'userid', true); + $GLOBALS[__FUNCTION__] = countSumTotalData(getMemberId(), 'user_subids', 'id', 'userid', TRUE); } // END - if // Return cache @@ -942,7 +972,7 @@ function doExpressionUser ($data) { //----------------------------------------------------------------------------- // Template call-back function for list_user admin function -function doTemplateAdminListUserTitle ($template, $clear = false) { +function doTemplateAdminListUserTitle ($template, $clear = FALSE) { // Init title with "all accounts" $code = '{--ADMIN_LIST_ALL_ACCOUNTS--}'; @@ -960,7 +990,7 @@ function doTemplateAdminListUserTitle ($template, $clear = false) { } // Template call-back function for displaying "username" -function doTemplateDisplayUsername ($template, $clear = false, $userid = NULL) { +function doTemplateDisplayUsername ($template, $clear = FALSE, $userid = NULL) { // Is a userid set? if (!isValidUserId($userid)) { // Please don't call this without a valid userid diff --git a/inc/libs/wernis_functions.php b/inc/libs/wernis_functions.php index 11ecf02670..513d455dbb 100644 --- a/inc/libs/wernis_functions.php +++ b/inc/libs/wernis_functions.php @@ -98,7 +98,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { // Is a purpose there? if (isset($requestData['purpose'])) { // Eval the purpose - eval('$purpose = "' . doFinalCompilation($requestData['purpose'], false) . '";'); + eval('$purpose = "' . doFinalCompilation($requestData['purpose'], FALSE) . '";'); // Prepare the purpose, it needs encoding $requestData['purpose'] = encodeString($purpose); @@ -212,7 +212,7 @@ function WERNIS_SEND_REQUEST ($scriptName, $requestData = array()) { // Tests the function by calling balance.php on the API function WERNIS_TEST_API () { // Result is always failed - $result = false; + $result = FALSE; // Return the result from the lower functions $return = WERNIS_SEND_REQUEST('balance.php'); @@ -220,7 +220,7 @@ function WERNIS_TEST_API () { // Did it went smoothly? if ($return['status'] == 'OK') { // All fine! - $result = true; + $result = TRUE; } else { // Status failure text WERNIS_STATUS_MESSAGE($return['message'], $return['status']); @@ -236,15 +236,15 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { if (!isWernisWithdrawActive()) { if (!isExtensionActive('sponsor')) { // No, abort here - return false; + return FALSE; } elseif (!isSponsor()) { // No sponsor, not allowed to withdraw! - return false; + return FALSE; } } // END - if // Default is failed attempt - $result = false; + $result = FALSE; // Prepare the request data $requestData = array( @@ -261,7 +261,7 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { if ($return['status'] == 'OK') { // All fine! - $result = true; + $result = TRUE; // Log the transfer WERNIS_LOG_TRANSFER($wdsId, $amount, 'WITHDRAW'); @@ -281,7 +281,7 @@ function WERNIS_EXECUTE_WITHDRAW ($wdsId, $userMd5, $amount) { // Payout this amount function WERNIS_EXECUTE_PAYOUT ($wdsId, $amount) { // Default is failed attempt - $result = false; + $result = FALSE; // Prepare the request data $requestData = array( @@ -298,7 +298,7 @@ function WERNIS_EXECUTE_PAYOUT ($wdsId, $amount) { if ($return['status'] == 'OK') { // All fine! - $result = true; + $result = TRUE; // Log the transfer WERNIS_LOG_TRANSFER($wdsId, $amount, 'PAYOUT'); @@ -353,7 +353,7 @@ function WERNIS_TAKE_FEE ($points, $mode) { if (!in_array($mode, array('payout', 'withdraw'))) { // Log error and abort logDebugMessage(__FUNCTION__, __LINE__, 'userid=' . getMemberId() . ',mode=' . $mode . ',points=' . $points . ' - unknown mode detected.'); - return false; + return FALSE; } // END - if // Is there a percentage or fixed fee? diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index dad248da2a..213b7fab04 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -41,12 +41,12 @@ if (!defined('__SECURITY')) { } // END - if // Queries the given Yoo!Media API 2.0 script -function YOOMEDIA_QUERY_API ($script, $countQuery = true) { +function YOOMEDIA_QUERY_API ($script, $countQuery = TRUE) { // Init response array $response = array(); // Enougth queries left? - if ((getConfig('yoomedia_requests_remain') > 0) || ($countQuery === false)) { + if ((getConfig('yoomedia_requests_remain') > 0) || ($countQuery === FALSE)) { // Prepare request array $requestData = array( 'id' => getConfig('yoomedia_id'), @@ -60,7 +60,7 @@ function YOOMEDIA_QUERY_API ($script, $countQuery = true) { ); // Run the query - $response = sendGetRequest('http://www.yoomedia.de/interface_2.0/' . $script, $requestData, true); + $response = sendGetRequest('http://www.yoomedia.de/interface_2.0/' . $script, $requestData, TRUE); // Convert from ISO to UTF-8 only if count is > 3 because <= 3 means timeout if (count($response) > 3) { @@ -72,7 +72,7 @@ function YOOMEDIA_QUERY_API ($script, $countQuery = true) { } // END - if // Shall we count the query as used? - if ($countQuery === true) { + if ($countQuery === TRUE) { // Then update the config! updateConfiguration('yoomedia_requests_remain', 1, '-'); } // END - if @@ -87,7 +87,7 @@ function YOOMEDIA_TEST_CONFIG ($data) { // Is this admin? if (!isAdmin()) { // No admin! - return false; + return FALSE; } // END - if // Remove 'ok' @@ -105,7 +105,7 @@ function YOOMEDIA_TEST_CONFIG ($data) { // Query the API with a test request without couting it // If zero reply comes back the data is invalid! - $response = YOOMEDIA_QUERY_API('out_textmail.php', true); // @TODO Ask Yoo!Media for test script + $response = YOOMEDIA_QUERY_API('out_textmail.php', TRUE); // @TODO Ask Yoo!Media for test script // Default error code is 0 = all fine! $errorCode = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($response); @@ -201,10 +201,10 @@ function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) { // Is this an admin? if (!isAdmin()) { // Abort here - return false; + return FALSE; } elseif (!isExtensionActive('bonus')) { // Abort here - return false; + return FALSE; } // Is the waiting time below one second? Then fix it to one (zero seconds are not yet supported!) @@ -221,7 +221,7 @@ function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) { } // END - if // Load template - loadTemplate('admin_send_yoomedia', false, $data); + loadTemplate('admin_send_yoomedia', FALSE, $data); } // Adds the mail to the bonus mail pool @@ -229,10 +229,10 @@ function YOOMEDIA_SEND_BONUS_MAIL ($data, $mailMode) { // Is this an admin? if (!isAdmin()) { // Abort here - return false; + return FALSE; } elseif (!isExtensionActive('bonus')) { // Abort here - return false; + return FALSE; } // Add dummy receiver to avoid notice @@ -259,7 +259,7 @@ function YOOMEDIA_SEND_BONUS_MAIL ($data, $mailMode) { // Lockdown given id function YOOMEDIA_EXCLUDE_MAIL ($data, $mailMode) { // Search for the entry - if (YOOMEDIA_CHECK_RELOAD($data['id'], $data['reload'], $mailMode) === false) { + if (YOOMEDIA_CHECK_RELOAD($data['id'], $data['reload'], $mailMode) === FALSE) { // Convert mode for mails $mailMode = YOOMEDIA_CONVERT_MODE($mailMode); @@ -322,7 +322,7 @@ function translateYooMediaError ($errorCode) { // Checks if the mail id is in reload lock function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) { // Default is not in reload lock - $reloaded = false; + $reloaded = FALSE; // Query database $result = SQL_QUERY_ESC("SELECT `id`, UNIX_TIMESTAMP(`inserted`) AS inserted FROM `{?_MYSQL_PREFIX?}_yoomedia_reload` WHERE `type`='%s' AND `y_id`=%s LIMIT 1", @@ -354,7 +354,7 @@ function YOOMEDIA_CHECK_RELOAD ($id, $reload, $type) { // Lock given mail down for reload lock function YOOMEDIA_RELOAD_LOCK ($data, $mailMode) { // Search for the entry - if (YOOMEDIA_CHECK_RELOAD($data['id'], $data['reload'], $mailMode) === false) { + if (YOOMEDIA_CHECK_RELOAD($data['id'], $data['reload'], $mailMode) === FALSE) { // Convert mode for mails $mailMode = YOOMEDIA_CONVERT_MODE($mailMode); @@ -431,7 +431,7 @@ function YOOMEDIA_GET_ERRORCODE_FROM_RESULT ($response) { $code = '0'; } else { // Should not happen! - reportBug(__FUNCTION__, __LINE__, 'Cannot parse response. Raw response:
' . print_r($response, true) . '
'); + reportBug(__FUNCTION__, __LINE__, 'Cannot parse response. Raw response:
' . print_r($response, TRUE) . '
'); } // Return error code diff --git a/inc/load_config.php b/inc/load_config.php index 0bb8a7aa36..483a4d270b 100644 --- a/inc/load_config.php +++ b/inc/load_config.php @@ -46,12 +46,12 @@ setConfigEntry('WRITE_FOOTER', 'Y'); setConfigEntry('_DB_TYPE' , 'mysql3'); // Mark configuration as NOT loaded which is the default -$GLOBALS['config_local_loaded'] = false; +$GLOBALS['config_local_loaded'] = FALSE; // Is the local configuration there? if ((isIncludeReadable(getCachePath() . 'config-local.php')) && (isIncludeReadable('inc/config.php'))) { // We are better in installation mode - $GLOBALS['__mailer_installing'] = true; + $GLOBALS['__mailer_installing'] = TRUE; // Define default main_title here setConfigEntry('MAIN_TITLE', 'Your mail-exchange title'); @@ -66,7 +66,7 @@ if ((isIncludeReadable(getCachePath() . 'config-local.php')) && (isIncludeReadab loadIncludeOnce(getCachePath() . 'config-local.php'); // Mark configuration as loaded - $GLOBALS['config_local_loaded'] = true; + $GLOBALS['config_local_loaded'] = TRUE; } elseif (isIncludeReadable('inc/config.php')) { // Out-dated inc/config.php found, falling back to load and "wrap" it updateOldConfigFile(); diff --git a/inc/loader/load-extension.php b/inc/loader/load-extension.php index 746957a8cc..a2cd8a9d17 100644 --- a/inc/loader/load-extension.php +++ b/inc/loader/load-extension.php @@ -123,7 +123,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('extension')) && ($GLOBALS['cache unset($EXT_DUMMY); // No database load needed - $res_ext_crt = false; + $res_ext_crt = FALSE; // Load all extension files in test-mode (we initialize them later) foreach ($EXT_POOL as $ext) { @@ -165,7 +165,7 @@ ORDER BY array($content['ext_name']), __FILE__, __LINE__); } else { // Didn't load so deactivate it - doDeactivateExtension($content['ext_name'], true); + doDeactivateExtension($content['ext_name'], TRUE); } // ... and skip it @@ -173,7 +173,7 @@ ORDER BY } // END - if // Get menu entry - $content['ext_menu'] = convertBooleanToYesNo(ifModuleHasMenu($content['ext_name'], true)); + $content['ext_menu'] = convertBooleanToYesNo(ifModuleHasMenu($content['ext_name'], TRUE)); // Get language entry $content['ext_lang'] = convertBooleanToYesNo(isLanguageIncludeReadable($content['ext_name'])); diff --git a/inc/loader/load-modules.php b/inc/loader/load-modules.php index 18777fc59f..03fd6c9bd3 100644 --- a/inc/loader/load-modules.php +++ b/inc/loader/load-modules.php @@ -57,7 +57,7 @@ if (($GLOBALS['cache_instance']->loadCacheFile('modules')) && ($GLOBALS['cache_i $GLOBALS['cache_instance']->removeCacheFile(); // We should fix this - reportBug(__FILE__, __LINE__, 'modArray=
' . print_r($modArray, true) . '
Please try to reload to fix this.'); + reportBug(__FILE__, __LINE__, 'modArray=
' . print_r($modArray, TRUE) . '
Please try to reload to fix this.'); } // END - if // Rewrite some parts diff --git a/inc/loader/load-themes.php b/inc/loader/load-themes.php index 41f43e5a08..c482fc53e8 100644 --- a/inc/loader/load-themes.php +++ b/inc/loader/load-themes.php @@ -43,7 +43,7 @@ if (!defined('__SECURITY')) { return; } elseif (!isExtensionActive('theme')) { // Skip this loader - return false; + return FALSE; } // Next cached table are the themes diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index 902997e729..97cd5205a7 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -117,7 +117,7 @@ LIMIT 1", ), __FILE__, __LINE__); // Load email template and send it to the user! - if ($sentBonusMails === true) { + if ($sentBonusMails === TRUE) { // Add userid to queue array_push($userids, $content['userid']); } else { @@ -128,7 +128,7 @@ LIMIT 1", } // END - while // Shall I send out bonus mails? - if ($sentBonusMails === true) { + if ($sentBonusMails === TRUE) { // Okay, make array to string $receiver = implode(';', $userids); diff --git a/inc/mails/bonus_mails.php b/inc/mails/bonus_mails.php index 1014e7497f..2493a25e59 100644 --- a/inc/mails/bonus_mails.php +++ b/inc/mails/bonus_mails.php @@ -106,7 +106,7 @@ LIMIT 1", ), __FILE__, __LINE__); // Load email template and send it to the user! - if ($sentBonusMails === true) { + if ($sentBonusMails === TRUE) { // Add userid to queue array_push($userids, $content['userid']); } else { @@ -117,7 +117,7 @@ LIMIT 1", } // END - while // Shall I send out bonus mails? - if ($sentBonusMails === true) { + if ($sentBonusMails === TRUE) { // Okay, make array to string $receiver = implode(';', $userids); diff --git a/inc/mails/doubler_mails.php b/inc/mails/doubler_mails.php index 2055a6b938..6babb35b18 100644 --- a/inc/mails/doubler_mails.php +++ b/inc/mails/doubler_mails.php @@ -130,7 +130,7 @@ if (((!SQL_HASZERONUMS($result_total)) && (getConfig('doubler_sent_all') == 'Y') // Only double when points are enougth! if ($DOUBLER_POINTS >= $content['points']) { // Check for his ref points - $refPoints = countSumTotalData($content['userid'], 'doubler', 'points', 'refid', false, " AND `completed`='N' AND `is_ref`='Y'"); + $refPoints = countSumTotalData($content['userid'], 'doubler', 'points', 'refid', FALSE, " AND `completed`='N' AND `is_ref`='Y'"); // Zero refid when empty (might be helpful!) if (empty($refPoints)) { @@ -158,7 +158,7 @@ if (((!SQL_HASZERONUMS($result_total)) && (getConfig('doubler_sent_all') == 'Y') SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_doubler` SET `completed`='Y' WHERE `id`=%s LIMIT 1", array(bigintval($content['id'])), __FILE__, __LINE__); - $okay = false; + $okay = FALSE; // Check for jackpot inclusion in doubling process if (($jackpotPoints > 0) && ($jackpotPoints >= $content['points']) && (getConfig('doubler_jackpot') == 'Y')) { @@ -168,13 +168,13 @@ if (((!SQL_HASZERONUMS($result_total)) && (getConfig('doubler_sent_all') == 'Y') } // END - if // Exclude also webmaster's id in taking points from webmaster's account - if (($userPoints > 0) && ($userPoints >= $content['points']) && ($okay === false) && (getConfig('doubler_userid') > 0) && ($content['userid'] != getConfig('doubler_userid'))) { + if (($userPoints > 0) && ($userPoints >= $content['points']) && ($okay === FALSE) && (getConfig('doubler_userid') > 0) && ($content['userid'] != getConfig('doubler_userid'))) { // Subtract points $okay = subtractPoints('doubler_payout', getConfig('doubler_userid'), $content['points']); } // END - if // Update doubler's account only when others are not updated - if ($okay === false) { + if ($okay === FALSE) { // Add points to used doubler points updateConfiguration('doubler_used', $content['points'], '+'); } // END - if diff --git a/inc/module-functions.php b/inc/module-functions.php index 9c1c823b64..c9c4174672 100644 --- a/inc/module-functions.php +++ b/inc/module-functions.php @@ -46,7 +46,7 @@ function getModuleTitle ($module) { if (!isset($GLOBALS[__FUNCTION__][$module])) { // Init variables $data['title'] = ''; - $result = false; + $result = FALSE; // Is the script installed? if ((isInstalled()) && ($module != 'error')) { @@ -126,7 +126,7 @@ function getModuleStatus ($module) { // Checks whether the given module is registered function isModuleRegistered ($module) { // By default nothing is found - $found = false; + $found = FALSE; // Check if cache is latest version if (isExtensionInstalledAndNewer('cache', '0.1.2')) { @@ -137,7 +137,7 @@ function isModuleRegistered ($module) { incrementStatsEntry('cache_hits'); // Is found - $found = true; + $found = TRUE; } else { // No, then we have to update it! setModuleStatus($module, 'cache_miss'); @@ -157,7 +157,7 @@ function isModuleRegistered ($module) { } // END - foreach // Mark as found - $found = true; + $found = TRUE; } elseif (isDebugModeEnabled()) { // Debug message only in debug-mode... logDebugMessage(__FUNCTION__, __LINE__, 'Module ' . $module . ' not found.'); @@ -253,7 +253,7 @@ function checkModulePermissions ($module = '') { $found = isModuleRegistered($module_chk); // Is the module found? - if ($found === true) { + if ($found === TRUE) { // Check returned values against current access permissions // // Admin access ----- Guest access ----- --- Guest or member? --- @@ -282,7 +282,7 @@ function checkModulePermissions ($module = '') { } // END - if // Still no luck or not found? - if (($found === false) && (!isExtensionActive('cache')) && (getModuleStatus($module_chk) != 'done')) { + if (($found === FALSE) && (!isExtensionActive('cache')) && (getModuleStatus($module_chk) != 'done')) { // ----- Default module ----- ---- Module in base folder ---- --- Module with extension's name --- if ((isIncludeReadable(sprintf("inc/modules/%s.php", $module))) || (isIncludeReadable(sprintf("%s.php", $module))) || (isIncludeReadable(sprintf("%s/%s.php", $extension, $module)))) { // Data is missing so we add it @@ -326,7 +326,7 @@ VALUES } elseif ((getModuleStatus($module_chk) == 'cache_miss') && (isHtmlOutputMode())) { // Rebuild the cache files rebuildCache('modules', 'modules'); - } elseif ($found === false) { + } elseif ($found === FALSE) { // Problem with module detected logDebugMessage(__FUNCTION__, __LINE__, sprintf("Problem in module %s detected. getModuleStatus()=%s,locked=%d,hidden=%d,mem=%d,admin=%d,output_mode=%s", $module_chk, @@ -347,9 +347,9 @@ VALUES } // Checks if the module has a menu -function ifModuleHasMenu ($module, $forceDb = false) { +function ifModuleHasMenu ($module, $forceDb = FALSE) { // All is false by default - $ret = false; + $ret = FALSE; // Extension installed and newer than or has version 0.1.2? if (isExtensionInstalledAndNewer('cache', '0.1.2')) { @@ -366,7 +366,7 @@ function ifModuleHasMenu ($module, $forceDb = false) { // Admin/guest/member/sponsor modules have always a menu! $ret = in_array($module, array('admin', 'index', 'login', 'sponsor')); } - } elseif ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && ((!isExtensionActive('cache')) || ($forceDb === true))) { + } elseif ((isExtensionInstalledAndNewer('sql_patches', '0.3.6')) && ((!isExtensionActive('cache')) || ($forceDb === TRUE))) { // Check database for entry $result = SQL_QUERY_ESC("SELECT `has_menu` FROM `{?_MYSQL_PREFIX?}_mod_reg` WHERE `module`='%s' LIMIT 1", array($module), __FUNCTION__, __LINE__); @@ -418,7 +418,7 @@ function addModuleSql ($module, $title, $locked, $hidden, $adminOnly, $memOnly) // Load the currently set module function loadModule () { // By default all modules are invalid - $isModuleValid = false; + $isModuleValid = FALSE; // Construct module name $GLOBALS['module_inc'] = sprintf("inc/modules/%s.php", getModule()); @@ -435,7 +435,7 @@ function loadModule () { // Does the module exists on local file system? if ((isIncludeReadable($GLOBALS['module_inc'])) && (!ifFatalErrorsDetected())) { // Module is valid, active and located on the local disk... - $isModuleValid = true; + $isModuleValid = TRUE; } elseif (!ifFatalErrorsDetected()) { // Set HTTP status setHttpStatus('404'); @@ -492,7 +492,7 @@ function doIncludeModule () { loadIncludeOnce('inc/header.php'); // Modules are by default not valid! - $isModuleValid = false; + $isModuleValid = FALSE; // By default NULL is used $GLOBALS['module_inc'] = NULL; @@ -510,7 +510,7 @@ function doIncludeModule () { } // Is the module valid? - if (($isModuleValid === true) && (!is_null($GLOBALS['module_inc']))) { + if (($isModuleValid === TRUE) && (!is_null($GLOBALS['module_inc']))) { // Run pre-filter runFilterChain('pre_module_load'); diff --git a/inc/modules/admin.php b/inc/modules/admin.php index b9578683dd..761d9181aa 100644 --- a/inc/modules/admin.php +++ b/inc/modules/admin.php @@ -64,7 +64,7 @@ if (!isAdminRegistered()) { $hashedPass = md5(postRequestElement('admin_pass1')); // Kill maybe existing session variables - destroyAdminSession(false); + destroyAdminSession(FALSE); // Do registration $ret = addAdminAccount(postRequestElement('admin_login'), $hashedPass, getWebmaster()); @@ -76,7 +76,7 @@ if (!isAdminRegistered()) { $done = changeDataInLocalConfigurationFile('ADMIN-SETUP', "setConfigEntry('ADMIN_REGISTERED', '", "');", 'Y', 0); // Was it successfull? - if ($done === true) { + if ($done === TRUE) { // Registering is done redirectToUrl('modules.php?module=admin&register=done'); } else { @@ -166,17 +166,17 @@ if (!isAdminRegistered()) { } // END - if // Output error messages - $content['login_message'] = loadTemplate('admin_login_msg', true, $loginMessage); - $content['pass1_message'] = loadTemplate('admin_login_msg', true, $pass1Message); - $content['pass2_message'] = loadTemplate('admin_login_msg', true, $pass2Message); - $content['error_message'] = loadTemplate('admin_login_msg', true, $errorMessage); + $content['login_message'] = loadTemplate('admin_login_msg', TRUE, $loginMessage); + $content['pass1_message'] = loadTemplate('admin_login_msg', TRUE, $pass1Message); + $content['pass2_message'] = loadTemplate('admin_login_msg', TRUE, $pass2Message); + $content['error_message'] = loadTemplate('admin_login_msg', TRUE, $errorMessage); } // END - if // Output message in seperate template displayMessage('{--ADMIN_ACCOUNT_NOT_REGISTERED_YET--}'); // Load register template - loadTemplate('admin_reg_form', false, $content); + loadTemplate('admin_reg_form', FALSE, $content); } // END - if } elseif (isGetRequestElementSet('reset_pass')) { // Is the form submitted? @@ -185,13 +185,13 @@ if (!isAdminRegistered()) { displayMessage(sendAdminPasswordResetLink(postRequestElement('email'))); } elseif (isGetRequestElementSet('hash')) { // Output form for hash validation - loadTemplate('admin_validate_reset_hash_form', false, getRequestElement('hash')); + loadTemplate('admin_validate_reset_hash_form', FALSE, getRequestElement('hash')); } elseif ((isPostRequestElementSet('validate_hash')) && (isPostRequestElementSet('admin_login')) && (isPostRequestElementSet('hash'))) { // Validate the login data and hash $valid = adminResetValidateHashLogin(postRequestElement('hash'), postRequestElement('admin_login')); // Valid? - if ($valid === true) { + if ($valid === TRUE) { // Prepare content first $content = array( 'hash' => postRequestElement('hash'), @@ -199,7 +199,7 @@ if (!isAdminRegistered()) { ); // Validation okay so display form for final password change - loadTemplate('admin_reset_password_form', false, $content); + loadTemplate('admin_reset_password_form', FALSE, $content); } else { // Cannot validate the login data and hash displayMessage('{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED--}'); @@ -208,7 +208,7 @@ if (!isAdminRegistered()) { // Okay, we shall the admin password here. So first revalidate the hash if (adminResetValidateHashLogin(postRequestElement('hash'), postRequestElement('admin_login'))) { // Output result - loadTemplate('admin_reset_password_done', false, doResetAdminPassword(postRequestElement('admin_login'), postRequestElement('admin_pass1'))); + loadTemplate('admin_reset_password_done', FALSE, doResetAdminPassword(postRequestElement('admin_login'), postRequestElement('admin_pass1'))); } else { // Validation failed displayMessage('{--ADMIN_VALIDATION_RESET_LOGIN_HASH_FAILED2--}'); @@ -305,10 +305,10 @@ if (!isAdminRegistered()) { // Load message templates if the messages have been set if (!empty($loginMessage)) { - $content['login_message'] = loadTemplate('admin_login_msg', true, $loginMessage); + $content['login_message'] = loadTemplate('admin_login_msg', TRUE, $loginMessage); } // END - if if (!empty($passwdMessage)) { - $content['pass_message'] = loadTemplate('admin_login_msg', true, $passwdMessage); + $content['pass_message'] = loadTemplate('admin_login_msg', TRUE, $passwdMessage); } // END - if } // END - if @@ -316,7 +316,7 @@ if (!isAdminRegistered()) { $content['all_parameter'] = addAllGetRequestParameters(); // Load login form template - loadTemplate('admin_login_form', false, $content); + loadTemplate('admin_login_form', FALSE, $content); } // END - if } elseif (isGetRequestElementSet('logout')) { // Only try to remove cookies @@ -340,7 +340,7 @@ if (!isAdminRegistered()) { } } else { // Something went wrong here... - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_LOGOUT_FAILED--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_LOGOUT_FAILED--}'); // Add fatal message addFatalMessage(__FILE__, __LINE__, '{--CANNOT_UNREG_SESS--}'); diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index 10afaf399b..7e4e709c95 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -158,18 +158,18 @@ function doAdminAction () { // Load welcome template if (isExtensionActive('admins')) { // @TODO This and the next getCurrentAdminId() call might be moved into the templates? - $content['welcome'] = loadTemplate('admin_welcome_admins', true, getCurrentAdminId()); + $content['welcome'] = loadTemplate('admin_welcome_admins', TRUE, getCurrentAdminId()); } else { - $content['welcome'] = loadTemplate('admin_welcome', true, getCurrentAdminId()); + $content['welcome'] = loadTemplate('admin_welcome', TRUE, getCurrentAdminId()); } // Load header, footer, render menu - $content['header'] = loadTemplate('admin_header' , true, $content); - $content['footer'] = loadTemplate('admin_footer' , true, $content); + $content['header'] = loadTemplate('admin_header' , TRUE, $content); + $content['footer'] = loadTemplate('admin_footer' , TRUE, $content); $content['menu'] = addAdminMenu($action, $what); // Load main template - loadTemplate('admin_main', false, $content); + loadTemplate('admin_main', FALSE, $content); // Check if action/what pair is valid $result_action = SQL_QUERY_ESC("SELECT @@ -200,26 +200,26 @@ LIMIT 1", if (SQL_NUMROWS($result_action) == 1) { // Is valid but does the inlcude file exists? $inc = sprintf("inc/modules/admin/action-%s.php", $action); - if ((isIncludeReadable($inc)) && (isMenuActionValid('admin', $action, $what)) && ($GLOBALS['acl_allow'] === true)) { + if ((isIncludeReadable($inc)) && (isMenuActionValid('admin', $action, $what)) && ($GLOBALS['acl_allow'] === TRUE)) { // Ok, we finally load the admin action module loadInclude($inc); - } elseif ($GLOBALS['acl_allow'] === false) { + } elseif ($GLOBALS['acl_allow'] === FALSE) { // Access denied - loadTemplate('admin_menu_failed', false, '{%message,ADMIN_ACCESS_DENIED=' . $what . '%}'); + loadTemplate('admin_menu_failed', FALSE, '{%message,ADMIN_ACCESS_DENIED=' . $what . '%}'); } else { // Include file not found :-( - loadTemplate('admin_menu_failed', false, '{%message,ADMIN_ACTION_404=' . $action . '%}'); + loadTemplate('admin_menu_failed', FALSE, '{%message,ADMIN_ACTION_404=' . $action . '%}'); } } else { // Invalid action/what pair found - loadTemplate('admin_menu_failed', false, '{%message,ADMIN_ACTION_INVALID=' . $action . '/' . $what . '%}'); + loadTemplate('admin_menu_failed', FALSE, '{%message,ADMIN_ACTION_INVALID=' . $action . '/' . $what . '%}'); } // Free memory SQL_FREERESULT($result_action); // Tableset footer - loadTemplate('admin_main_footer', false, $content); + loadTemplate('admin_main_footer', FALSE, $content); } /** @@ -241,7 +241,7 @@ function isAdminAllowedAccessMenu ($action, $what = NULL) { // Adds an admin menu function addAdminMenu ($action, $what) { // Init variables - $SUB = false; + $SUB = FALSE; $OUT = ''; // Menu descriptions @@ -272,7 +272,7 @@ ORDER BY // Is the current admin allowed to access this 'action' menu? if (isAdminAllowedAccessMenu($mainContent['main_action'])) { - if ($SUB === false) { + if ($SUB === FALSE) { // Insert compiled menu title and description $GLOBALS['menu']['title'][$mainContent['main_action']] = $mainContent['main_title']; $GLOBALS['menu']['description'][$mainContent['main_action']] = $mainContent['main_descr']; @@ -353,7 +353,7 @@ ORDER BY // Are there entries? if (ifAdminMenuHasEntries($mainContent['main_action'])) { // Sub menu has been called - $SUB = true; + $SUB = TRUE; // Are there entries? if (!SQL_HASZERONUMS($result_what)) { @@ -443,7 +443,7 @@ ORDER BY // Load all entries while ($content = SQL_FETCHARRAY($result)) { // Add the entry - $OUT .= loadTemplate('select_admins_option', true, $content); + $OUT .= loadTemplate('select_admins_option', TRUE, $content); } // END - if // Free memory @@ -453,11 +453,11 @@ ORDER BY $content['form_selection'] = $OUT; // Output form - loadTemplate('select_admins_box', false, $content); + loadTemplate('select_admins_box', FALSE, $content); } // Create a member selection box -function addMemberSelectionBox ($userid = NULL, $add_all = false, $return = false, $none = false, $field = 'userid', $whereStatement = " WHERE `surname` NOT LIKE '{?tester_user_surname_prefix?}%'") { +function addMemberSelectionBox ($userid = NULL, $add_all = FALSE, $return = FALSE, $none = FALSE, $field = 'userid', $whereStatement = " WHERE `surname` NOT LIKE '{?tester_user_surname_prefix?}%'") { // Output selection form with all confirmed user accounts listed $result = SQL_QUERY('SELECT `userid`, @@ -473,9 +473,9 @@ ORDER BY $OUT = ''; // USe this only for adding points (e.g. adding refs really makes no sence ;-) ) - if ($add_all === true) { + if ($add_all === TRUE) { $OUT = ' '; - } elseif ($none === true) { + } elseif ($none === TRUE) { $OUT = ' '; } @@ -492,13 +492,13 @@ ORDER BY // Free memory SQL_FREERESULT($result); - if ($return === false) { + if ($return === FALSE) { // Remeber options in constant $content['form_selection'] = $OUT; $content['what'] = '{%pipe,getWhat%}'; // Load template - loadTemplate('admin_form_selection_box', false, $content); + loadTemplate('admin_form_selection_box', FALSE, $content); } else { // Return content in selection frame return ''; @@ -544,7 +544,7 @@ function adminMenuSelectionBox_DEPRECATED ($mode, $default = '', $defid = '') { } // Wrapper for $_POST and adminSaveSettings -function adminSaveSettingsFromPostData ($tableName = '_config', $whereStatement = '`config`=0', $translateComma = array(), $alwaysAdd = false, $displayMessage = true) { +function adminSaveSettingsFromPostData ($tableName = '_config', $whereStatement = '`config`=0', $translateComma = array(), $alwaysAdd = FALSE, $displayMessage = TRUE) { // Get the array $postData = postRequestArray(); @@ -553,10 +553,10 @@ function adminSaveSettingsFromPostData ($tableName = '_config', $whereStatement } // Save settings to the database -function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement = '`config`=0', $translateComma = array(), $alwaysAdd = false, $displayMessage = true) { +function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement = '`config`=0', $translateComma = array(), $alwaysAdd = FALSE, $displayMessage = TRUE) { // Prepare all arrays, variables $tableData = array(); - $skip = false; + $skip = FALSE; // Now, walk through all entries and prepare them for saving foreach ($postData as $id => $val) { @@ -570,7 +570,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement convertSelectionsToEpocheTime($postData, $tableData, $id, $skip); // Shall we process this id? It muss not be empty, of course - if (($skip === false) && (!empty($id)) && ((!isset($GLOBALS['skip_config'][$id]))) || ($tableName != '_config')) { + if (($skip === FALSE) && (!empty($id)) && ((!isset($GLOBALS['skip_config'][$id]))) || ($tableName != '_config')) { // Translate the value? (comma to dot!) if ((is_array($translateComma)) && (in_array($id, $translateComma))) { // Then do it here... :) @@ -591,7 +591,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement } // Do not add a config entry twice - $GLOBALS['skip_config'][$id] = true; + $GLOBALS['skip_config'][$id] = TRUE; // Update current configuration setConfigEntry($id, $val); @@ -599,8 +599,8 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement } // END - foreach // Check if entry does exist - $result = false; - if ($alwaysAdd === false) { + $result = FALSE; + if ($alwaysAdd === FALSE) { if (!empty($whereStatement)) { $result = SQL_QUERY("SELECT * FROM `{?_MYSQL_PREFIX?}" . $tableName . "` WHERE " . $whereStatement . " LIMIT 1", __FUNCTION__, __LINE__); } else { @@ -653,7 +653,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement rebuildCache('config', 'config'); // Settings saved, so display message? - if ($displayMessage === true) displayMessage('{--SETTINGS_SAVED--}'); + if ($displayMessage === TRUE) displayMessage('{--SETTINGS_SAVED--}'); // Return affected rows return $affected; @@ -662,7 +662,7 @@ function adminSaveSettings (&$postData, $tableName = '_config', $whereStatement // Generate a selection box function adminAddMenuSelectionBox ($menu, $type, $name, $default = '') { // Open the requested menu directory - $menuArray = getArrayFromDirectory(sprintf("inc/modules/%s/", $menu), $type . '-', false, false); + $menuArray = getArrayFromDirectory(sprintf("inc/modules/%s/", $menu), $type . '-', FALSE, FALSE); // Init the selection box $OUT = ''; // Load final template -loadTemplate('admin_list_transfer', false, $content); +loadTemplate('admin_list_transfer', FALSE, $content); // [EOF] ?> diff --git a/inc/modules/admin/what-del_user.php b/inc/modules/admin/what-del_user.php index 69698955e8..ba011d5f5e 100644 --- a/inc/modules/admin/what-del_user.php +++ b/inc/modules/admin/what-del_user.php @@ -54,7 +54,7 @@ if ((isFormSent()) || ((isFormSent('delete')) && (isPostRequestElementSet('reaso displayMessage('{--ADMIN_DELETE_COMPLETED--}'); } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); } } elseif (isPostRequestElementSet('no')) { // Do not delete him... @@ -72,10 +72,10 @@ if ((isFormSent()) || ((isFormSent('delete')) && (isPostRequestElementSet('reaso ); // Display form - loadTemplate('admin_delete_user', false, $content); + loadTemplate('admin_delete_user', FALSE, $content); } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}'); } } diff --git a/inc/modules/admin/what-edit_emails.php b/inc/modules/admin/what-edit_emails.php index 4d998c0132..911dc01ea0 100644 --- a/inc/modules/admin/what-edit_emails.php +++ b/inc/modules/admin/what-edit_emails.php @@ -70,7 +70,7 @@ LIMIT 1', SQL_FREERESULT($result); // Load template - loadTemplate('admin_edit_email', false, $content); + loadTemplate('admin_edit_email', FALSE, $content); } elseif (isGetRequestElementSet('mid')) { // Make also this email editable $result = SQL_QUERY_ESC('SELECT @@ -93,7 +93,7 @@ LIMIT 1', SQL_FREERESULT($result); // Load template - loadTemplate('admin_edit_email', false, $content); + loadTemplate('admin_edit_email', FALSE, $content); } elseif (isGetRequestElementSet('bid')) { // Make also this email editable $result = SQL_QUERY_ESC('SELECT @@ -115,7 +115,7 @@ LIMIT 1', SQL_FREERESULT($result); // Load template - loadTemplate('admin_edit_bonus_email', false, $content); + loadTemplate('admin_edit_bonus_email', FALSE, $content); } elseif (isFormSent('save')) { // Save changes if (isPostRequestElementSet('mid')) { @@ -190,14 +190,14 @@ ORDER BY $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Load row template and switch colors - $OUT .= loadTemplate('admin_edit_email_row', true, $content); + $OUT .= loadTemplate('admin_edit_email_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result); // Load email template - loadTemplate('admin_edit_email_select', false, $OUT); + loadTemplate('admin_edit_email_select', FALSE, $OUT); } else { // No mail orders left in pool displayMessage('{--ADMIN_NO_MAILS_IN_POOL--}'); diff --git a/inc/modules/admin/what-edit_sponsor.php b/inc/modules/admin/what-edit_sponsor.php index 29bbdf826d..cf61c57c58 100644 --- a/inc/modules/admin/what-edit_sponsor.php +++ b/inc/modules/admin/what-edit_sponsor.php @@ -119,12 +119,12 @@ LIMIT 1", break; case 'edit': // Edit sponsor account - $PASS = true; + $PASS = TRUE; if ((postRequestElement('pass1') != postRequestElement('pass2')) || ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass1')))) { // Remove passwords unsetPostRequestElement('pass1'); unsetPostRequestElement('pass2'); - $PASS = false; + $PASS = FALSE; } // END - if // Convert time selection @@ -137,10 +137,10 @@ LIMIT 1", postRequestElement('gender' , '{%pipe,translateGender=' . postRequestElement('gender') . '%}'); postRequestElement('warning_interval', '{%pipe,createFancyTime=' . postRequestElement('warning_interval') . '%}'); - if ($PASS === false) setPostRequestElement('pass1', '{--SPONSOR_PASS_UNCHANGED--}'); + if ($PASS === FALSE) setPostRequestElement('pass1', '{--SPONSOR_PASS_UNCHANGED--}'); // Load email template and send the mail away - $message = loadEmailTemplate('admin_sponsor_edit', postRequestArray(), false); + $message = loadEmailTemplate('admin_sponsor_edit', postRequestArray(), FALSE); sendEmail(postRequestElement('email'), '{--ADMIN_SPONSOR_EDIT_SUBJECT--}', $message); break; @@ -159,7 +159,7 @@ LIMIT 1", $content['contact'] = '' . $content['surname'] . ' ' . $content['family'] . ''; // Load mode template - loadTemplate($TPL, false, $content); + loadTemplate($TPL, FALSE, $content); } else { // Template not found displayMessage('{%message,ADMIN_SPONSOR_MODUS_TPL_404', getRequestElement('do') . '%}'); diff --git a/inc/modules/admin/what-edit_user.php b/inc/modules/admin/what-edit_user.php index 11a4f2677e..a241477977 100644 --- a/inc/modules/admin/what-edit_user.php +++ b/inc/modules/admin/what-edit_user.php @@ -46,7 +46,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Fix a notice -$result_main = false; +$result_main = FALSE; if (isGetRequestElementSet('userid')) { // Load user entry $result_main = SQL_QUERY_ESC("SELECT @@ -71,17 +71,17 @@ if ((!isGetRequestElementSet('userid')) || (SQL_NUMROWS($result_main) == 1)) { addMemberSelectionBox(); } elseif (isFormSent('edit')) { // Ok, change the account... - $updateUser = false; $add = ''; + $updateUser = FALSE; $add = ''; if ((!isPostRequestElementSet('pass1')) && (!isPostRequestElementSet('pass2'))) { // Don't change the password - $updateUser = true; + $updateUser = TRUE; } elseif ((postRequestElement('pass1') == postRequestElement('pass2'))) { // Change the password - $updateUser = true; + $updateUser = TRUE; $add = ",`password`='" . generateHash(postRequestElement('pass1')) . "'"; } - if ($updateUser === true) { + if ($updateUser === TRUE) { // We have to add the following things: birthday and max receive mails SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` @@ -122,11 +122,11 @@ LIMIT 1", $content = SQL_FETCHARRAY($result_main); // Load template - loadTemplate('admin_edit_user', false, $content); + loadTemplate('admin_edit_user', FALSE, $content); } } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')) . '%}'); } // Free the result diff --git a/inc/modules/admin/what-email_archiv.php b/inc/modules/admin/what-email_archiv.php index ede6370692..87e534fbc1 100644 --- a/inc/modules/admin/what-email_archiv.php +++ b/inc/modules/admin/what-email_archiv.php @@ -86,8 +86,8 @@ if (!SQL_HASZERONUMS($result)) { // Mail orders are in pool so we can display them // Add navigation table rows - $content['top_email_nav'] = addEmailNavigation($numPages, getMailsPage(), true , 3, true); - $content['bottom_email_nav'] = addEmailNavigation($numPages, getMailsPage(), false, 3, true); + $content['top_email_nav'] = addEmailNavigation($numPages, getMailsPage(), TRUE , 3, TRUE); + $content['bottom_email_nav'] = addEmailNavigation($numPages, getMailsPage(), FALSE, 3, TRUE); // List all entries $OUT = ''; @@ -112,14 +112,14 @@ if (!SQL_HASZERONUMS($result)) { $content = merge_array($content, $pool); // Load row template and switch colors - $OUT .= loadTemplate('admin_email_archiv_row', true, $content); + $OUT .= loadTemplate('admin_email_archiv_row', TRUE, $content); } // END - while // Remmber generated rows in array $content['rows'] = $OUT; // Load main template - loadTemplate('admin_email_archiv', false, $content); + loadTemplate('admin_email_archiv', FALSE, $content); } else { // No mail orders fond displayMessage('{--ADMIN_NO_MAILS_IN_POOL--}'); diff --git a/inc/modules/admin/what-email_details.php b/inc/modules/admin/what-email_details.php index a5a4ab2f1d..fed64612ec 100644 --- a/inc/modules/admin/what-email_details.php +++ b/inc/modules/admin/what-email_details.php @@ -47,7 +47,7 @@ addYouAreHereLink('admin', __FILE__); if (!isExtensionInstalledAndNewer('sql_patches', '0.7.4')) { // No, abort here displayMessage(generateExtensionOutdatedMessage('sql_patches', '0.7.4')); - return false; + return FALSE; } // END - if // Normal mails ordered by your members @@ -91,7 +91,7 @@ ORDER BY } // Init result_bonus -$result_bonus = false; +$result_bonus = FALSE; if ((isExtensionActive('bonus')) && (empty($WHO))) { // Check for maximum pages @@ -149,7 +149,7 @@ if (isConfigEntrySet('mails_page')) { // Free result SQL_FREERESULT($result_normal); -$MAIL = false; +$MAIL = FALSE; if (!SQL_HASZERONUMS($result_list)) { // Init rows $OUT = ''; @@ -173,23 +173,23 @@ if (!SQL_HASZERONUMS($result_list)) { $content['timestamp'] = generateDateTime($content['timestamp'], 0); // Load row template - $OUT .= loadTemplate('admin_list_emails_row', true, $content); + $OUT .= loadTemplate('admin_list_emails_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result_list); // Add navigation (with change box and colspan=3) - $content['nav'] = addEmailNavigation($numPages, getMailsPage(), false, 3, true); + $content['nav'] = addEmailNavigation($numPages, getMailsPage(), FALSE, 3, TRUE); // Prepare content $content['rows'] = $OUT; $content['who'] = $WHO; // Mail orders are in pool so we can display them - loadTemplate('admin_list_emails', false, $content); + loadTemplate('admin_list_emails', FALSE, $content); - $MAIL = true; + $MAIL = TRUE; if ((isExtensionActive('bonus')) && (empty($WHO))) { // Only check if bonus extension is active if (!SQL_HASZERONUMS($result_bonus)) outputHtml('

'); @@ -212,22 +212,22 @@ if ((isExtensionActive('bonus')) && (empty($WHO))) { $content['timestamp'] = generateDateTime($content['timestamp'], 0); // Load row template - $OUT .= loadTemplate('admin_list_bonus_emails_row', true, $content); + $OUT .= loadTemplate('admin_list_bonus_emails_row', TRUE, $content); } // END - while // Add navigation (without change box but with colspan=3) - $content['nav'] = addEmailNavigation($numPages, getMailsPage(), false, 3, true); + $content['nav'] = addEmailNavigation($numPages, getMailsPage(), FALSE, 3, TRUE); // Prepare content $content['rows'] = $OUT; // Load main template - loadTemplate('admin_list_bonus_emails', false, $content); - $MAIL = true; + loadTemplate('admin_list_bonus_emails', FALSE, $content); + $MAIL = TRUE; } // END - if } // END - if -if ($MAIL === false) { +if ($MAIL === FALSE) { // No mail orders fond displayMessage('{--ADMIN_NO_MAILS_IN_POOL--}'); } // END - if diff --git a/inc/modules/admin/what-extensions.php b/inc/modules/admin/what-extensions.php index 48e424977d..7c914cb7cb 100644 --- a/inc/modules/admin/what-extensions.php +++ b/inc/modules/admin/what-extensions.php @@ -161,12 +161,12 @@ if (isGetRequestElementSet('reg_ext')) { ); // Load row template and switch color - $OUT .= loadTemplate('admin_edit_extensions_row', true, $content); + $OUT .= loadTemplate('admin_edit_extensions_row', TRUE, $content); } // END - if } // END - foreach // Load template - loadTemplate('admin_edit_extensions', false, $OUT); + loadTemplate('admin_edit_extensions', FALSE, $OUT); $do = 'edit'; } } elseif ((isPostRequestElementSet('delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { @@ -188,7 +188,7 @@ if (isGetRequestElementSet('reg_ext')) { // Listing of SQLs enabled? if (isVerboseSqlEnabled()) { // Load SQL commands in remove mode - if (loadExtension($ext_name, 'remove', '0.0.0', true)) { + if (loadExtension($ext_name, 'remove', '0.0.0', TRUE)) { // Generate extra table with loaded SQL commands $VERBOSE_OUT = addExtensionVerboseSqlTable(); } // END - if @@ -202,7 +202,7 @@ if (isGetRequestElementSet('reg_ext')) { ); // Load row template and switch color - $OUT .= loadTemplate('admin_delete_extensions_row', true, $content); + $OUT .= loadTemplate('admin_delete_extensions_row', TRUE, $content); } else { // Prepare data for the row template $content = array( @@ -210,12 +210,12 @@ if (isGetRequestElementSet('reg_ext')) { ); // Not valid! - $OUT .= loadTemplate('admin_delete_extensions_row_404', true, $content); + $OUT .= loadTemplate('admin_delete_extensions_row_404', TRUE, $content); } } // END - foreach // Load template - loadTemplate('admin_delete_extensions', false, $OUT); + loadTemplate('admin_delete_extensions', FALSE, $OUT); $do = 'delete'; } elseif ((isFormSent('do_delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // Remove extensions from DB (you have to delete all files manually!) @@ -245,12 +245,12 @@ if (isGetRequestElementSet('reg_ext')) { // Show next link if (isExtensionActive('task')) { - loadTemplate('admin_next_link', false, array( + loadTemplate('admin_next_link', FALSE, array( 'url' => 'modules.php?module=admin&what=list_task', 'title' => '{--ADMIN_EXTENSION_REGISTER_NEXT_LINK--}' )); } else { - loadTemplate('admin_next_link', false, array( + loadTemplate('admin_next_link', FALSE, array( 'url' => 'modules.php?module=admin', 'title' => '{--ADMIN_EXTENSION_REGISTER_NEXT_LINK--}' )); @@ -317,14 +317,14 @@ ORDER BY $content['ext_css'] = $cssSelection; // Load row template and switch color - $OUT .= loadTemplate('admin_list_extensions_row', true, $content); + $OUT .= loadTemplate('admin_list_extensions_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result); // Load template - loadTemplate('admin_list_extensions', false, $OUT); + loadTemplate('admin_list_extensions', FALSE, $OUT); } else { // No extensions are registered displayMessage('{--ADMIN_NO_EXTENSION_REGISTERED--}'); @@ -333,7 +333,7 @@ ORDER BY case 'register': // Register new extension // Are there some tasks? - $numTasks = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', true, "AND `task_type`='EXTENSION'"); + $numTasks = countSumTotalData(getCurrentAdminId(), 'task_system', 'id', 'assigned_admin', TRUE, "AND `task_type`='EXTENSION'"); // Is the id number valid and the task was found? if (($taskId > 0) && ($numTasks > 0)) { diff --git a/inc/modules/admin/what-guest_add.php b/inc/modules/admin/what-guest_add.php index 43205e66a7..81659dc623 100644 --- a/inc/modules/admin/what-guest_add.php +++ b/inc/modules/admin/what-guest_add.php @@ -177,7 +177,7 @@ ORDER BY `sort` ASC", $content['action_selection'] = adminAddMenuSelectionBox('guest', 'action', 'menu'); // Display form - loadTemplate('admin_add_guest_menu', false, $content); + loadTemplate('admin_add_guest_menu', FALSE, $content); } elseif (!isDemoModeActive()) { // Insert new menu entry if (isPostRequestElementSet('menu')) { diff --git a/inc/modules/admin/what-guestedit.php b/inc/modules/admin/what-guestedit.php index 10ee27a8c1..dad4a78ae4 100644 --- a/inc/modules/admin/what-guestedit.php +++ b/inc/modules/admin/what-guestedit.php @@ -78,13 +78,13 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() ); // Load row template - $OUT .= loadTemplate('admin_edit_guest_menu_row', true, $content); + $OUT .= loadTemplate('admin_edit_guest_menu_row', TRUE, $content); } else { // Entry not found $content = array( 'sel' => $sel ); - $OUT .= loadTemplate('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content); } // Free result and switch color @@ -98,7 +98,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['count'] = $count; // Load template - loadTemplate('admin_edit_guest_menu_form', false, $content); + loadTemplate('admin_edit_guest_menu_form', FALSE, $content); } elseif ((isFormSent('delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // Del menu entries with or without confirmation $content['sub'] = $subMenu; @@ -120,13 +120,13 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() 'menu' => $content['title'], 'sel' => $sel, ); - $OUT .= loadTemplate('admin_delete_guest_menu_row', true, $content); + $OUT .= loadTemplate('admin_delete_guest_menu_row', TRUE, $content); } else { // Entry not found? $content = array( 'sel' => $sel ); - $OUT .= loadTemplate('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content); } SQL_FREERESULT($result); } // END - if @@ -138,7 +138,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['count'] = $count; // Load template - loadTemplate('admin_delete_guest_menu', false, $content); + loadTemplate('admin_delete_guest_menu', FALSE, $content); } elseif ((isPostRequestElementSet('status')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // Change status (visible / locked) $content['sub'] = $subMenu; @@ -163,13 +163,13 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() ); // Load template - $OUT .= loadTemplate('admin_menu_status_row', true, $content); + $OUT .= loadTemplate('admin_menu_status_row', TRUE, $content); } else { // Entry not found? $content = array( 'sel' => $sel ); - $OUT .= loadTemplate('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content); } SQL_FREERESULT($result); @@ -182,7 +182,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['count'] = $count; // Load template - loadTemplate('admin_guest_menu_status', false, $content); + loadTemplate('admin_guest_menu_status', FALSE, $content); } elseif ((isFormSent()) && (!isDemoModeActive())) { // An action is done... adminProcessMenuEditForm('guest', $subMenu); @@ -234,7 +234,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() ); // Load row template - $OUT .= loadTemplate('admin_menu_overview_row', true, $content); + $OUT .= loadTemplate('admin_menu_overview_row', TRUE, $content); } // END - while // Add rows/sub @@ -245,7 +245,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() SQL_FREERESULT($result); // Load template - loadTemplate('admin_edit_guest_menu', false, $content); + loadTemplate('admin_edit_guest_menu', FALSE, $content); } else { // Menu entries are missing... (???) displayMessage('{--ADMIN_NO_MENUS_FOUND--}'); diff --git a/inc/modules/admin/what-list_ b/inc/modules/admin/what-list_ index 4885a6a285..c18d48e917 100644 --- a/inc/modules/admin/what-list_ +++ b/inc/modules/admin/what-list_ @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // By default show the list... -$show = true; +$show = TRUE; // Check for '???_id' element if ((countRequestPost() > 0) && (!ifPostContainsSelections('???_id'))) { @@ -61,7 +61,7 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_edit_show_!!!s'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_edit')) { // Change data of entries showEntriesByXmlCallback('admin_edit_do_!!!s'); @@ -70,7 +70,7 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_delete_show_!!!s'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_delete')) { // Remove entries from database showEntriesByXmlCallback('admin_delete_do_!!!s'); @@ -79,7 +79,7 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_lock_show_!!!s'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_lock')) { // Un-/lock selected URLs. This does not work for pending URLs showEntriesByXmlCallback('admin_lock_do_!!!s'); @@ -88,16 +88,16 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_undelete_show_!!!s'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_undelete')) { // Undelete selected URLs. This does only work for deleted URLs... ;-) showEntriesByXmlCallback('admin_undelete_do_!!!s'); } // Show entries? -if ($show === false) { +if ($show === FALSE) { // No, a form has already been show - return false; + return FALSE; } // END - if // List all !!! diff --git a/inc/modules/admin/what-list_admins_acls.php b/inc/modules/admin/what-list_admins_acls.php index acb7783c64..904b458c08 100644 --- a/inc/modules/admin/what-list_admins_acls.php +++ b/inc/modules/admin/what-list_admins_acls.php @@ -66,11 +66,11 @@ if ((isFormSent('edit')) && (ifPostContainsSelections())) { ); // Load row template - $OUT .= loadTemplate('admin_edit_admins_acls_row', true, $content); + $OUT .= loadTemplate('admin_edit_admins_acls_row', TRUE, $content); } // END - foreach // Load main template - loadTemplate('admin_edit_admins_acls', false, $OUT); + loadTemplate('admin_edit_admins_acls', FALSE, $OUT); } elseif ((isFormSent('do_edit')) && (ifPostContainsSelections())) { // Change entries foreach (postRequestElement('sel') as $id => $selected) { @@ -116,11 +116,11 @@ LIMIT 1", $content['access_mode'] = '{--ADMIN_ADMINS_ACCESS_MODE_' . strtoupper($content['access_mode']) . '--}'; // Load row template and switch colors - $OUT .= loadTemplate('admin_delete_admins_acls_row', true, $content); + $OUT .= loadTemplate('admin_delete_admins_acls_row', TRUE, $content); } // END - foreach // Load main template - loadTemplate('admin_delete_admins_acls', false, $OUT); + loadTemplate('admin_delete_admins_acls', FALSE, $OUT); } elseif ((isFormSent('do_delete')) && (ifPostContainsSelections())) { // Remove entries // @TODO Rewrite this to filter 'run_sqls' @@ -139,18 +139,18 @@ LIMIT 1", $mode = getAdminDefaultAcl(bigintval(postRequestElement('admin_id'))); // Default ACL is false - $ACL = false; + $ACL = FALSE; if (isPostRequestElementSet('what_menu')) { // Check parent ACL $ACL = isAdminsAllowedByAcl(getActionFromModuleWhat('admin', postRequestElement('what_menu')), ''); } // END - if - if (($mode != postRequestElement('do')) || (($ACL === true) && (postRequestElement('do') == 'deny'))) { + if (($mode != postRequestElement('do')) || (($ACL === TRUE) && (postRequestElement('do') == 'deny'))) { // Mode is fine $BOTH = ((isPostRequestElementSet('action_menu')) && (isPostRequestElementSet('what_menu')) && (postRequestElement('action_menu') != '') && (postRequestElement('what_menu') != '')); // Check if one has been selected - if ((((isPostRequestElementSet('action_menu')) && (postRequestElement('action_menu') != '')) || ((isPostRequestElementSet('what_menu')) && (postRequestElement('what_menu') != ''))) && ($BOTH === false)) { + if ((((isPostRequestElementSet('action_menu')) && (postRequestElement('action_menu') != '')) || ((isPostRequestElementSet('what_menu')) && (postRequestElement('what_menu') != ''))) && ($BOTH === FALSE)) { // Main or sub menu selected $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins_acls` WHERE `admin_id`=%s AND `action_menu`='%s' AND `what_menu`='%s' LIMIT 1", array( @@ -222,14 +222,14 @@ ORDER BY $content['access_mode'] = '{--ADMIN_ADMINS_ACCESS_MODE_' . strtoupper($content['access_mode']) . '--}'; // Load row template and switch colors - $OUT .= loadTemplate('admin_list_admins_acls_row', true, $content); + $OUT .= loadTemplate('admin_list_admins_acls_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result); // Load main template - loadTemplate('admin_list_admins_acls', false, $OUT); + loadTemplate('admin_list_admins_acls', FALSE, $OUT); } // END - if // Prepare some constants for the template @@ -238,7 +238,7 @@ ORDER BY $content['what_selection'] = adminMenuSelectionBox_DEPRECATED('what'); // Load template for adding new ACL - loadTemplate('admin_add_admins_acl', false, $content); + loadTemplate('admin_add_admins_acl', FALSE, $content); } // [EOF] diff --git a/inc/modules/admin/what-list_autopurge.php b/inc/modules/admin/what-list_autopurge.php index 5bad1b5779..60570ece33 100644 --- a/inc/modules/admin/what-list_autopurge.php +++ b/inc/modules/admin/what-list_autopurge.php @@ -83,7 +83,7 @@ if (!SQL_HASZERONUMS($result)) { ); // Load row template - $OUT .= loadTemplate('admin_list_autopurge_row', true, $content); + $OUT .= loadTemplate('admin_list_autopurge_row', TRUE, $content); } // END - while // Free memory @@ -91,7 +91,7 @@ if (!SQL_HASZERONUMS($result)) { $content['rows'] = $OUT; // Load main template - loadTemplate('admin_list_autopurge', false, $content); + loadTemplate('admin_list_autopurge', FALSE, $content); } else { // All members are active or you don't have any registered displayMessage('{--ADMIN_AUTOPURGE_ALL_ACTIVE--}'); diff --git a/inc/modules/admin/what-list_bank_package.php b/inc/modules/admin/what-list_bank_package.php index 963faa233b..f35badc028 100644 --- a/inc/modules/admin/what-list_bank_package.php +++ b/inc/modules/admin/what-list_bank_package.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Check if there is enougth selected -$show = true; +$show = TRUE; if (ifPostContainsSelections('id')) { // Okay, which button was pressed? if (isFormSent('change')) { @@ -108,7 +108,7 @@ if (ifPostContainsSelections('id')) { '' ) ); - $show = false; + $show = FALSE; } elseif (isFormSent('do_edit')) { // Delete entries (with confirmation) adminEditEntriesConfirm( @@ -118,7 +118,7 @@ if (ifPostContainsSelections('id')) { array(), array(), array(), - array(true) + array(TRUE) ); } elseif (isFormSent('delete')) { // Delete entries (with confirmation) @@ -145,7 +145,7 @@ if (ifPostContainsSelections('id')) { '' ) ); - $show = false; + $show = FALSE; } elseif (isFormSent('do_delete')) { // Delete entries (with confirmation) adminDeleteEntriesConfirm( @@ -155,13 +155,13 @@ if (ifPostContainsSelections('id')) { array(), array(), array(), - array(true) + array(TRUE) ); } } // END - if // Skip showing old entries? -if ($show === false) return; +if ($show === FALSE) return; // Load all banking packages from DB $result = SQL_QUERY('SELECT @@ -183,11 +183,11 @@ if (!SQL_HASZERONUMS($result)) { $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Load row template - $OUT .= loadTemplate('admin_list_bank_package_row', true, $content); + $OUT .= loadTemplate('admin_list_bank_package_row', TRUE, $content); } // END - while // Load main template - loadTemplate('admin_list_bank_package', false, $OUT); + loadTemplate('admin_list_bank_package', FALSE, $OUT); } else { // No packages found displayMessage('{--ADMIN_BANK_NO_PACKAGES_FOUND--}'); diff --git a/inc/modules/admin/what-list_beg.php b/inc/modules/admin/what-list_beg.php index c168877428..ad47803a44 100644 --- a/inc/modules/admin/what-list_beg.php +++ b/inc/modules/admin/what-list_beg.php @@ -106,7 +106,7 @@ ORDER BY ); // Load template and add it - $OUT .= loadTemplate('admin_list_beg_rows', true, $row); + $OUT .= loadTemplate('admin_list_beg_rows', TRUE, $row); $count++; $total += $content['beg_points']; } // END - while @@ -117,21 +117,21 @@ ORDER BY // Check if we need to display form or not with manuel withdraw if (getLastMonth() == getMonth()) { // Load form - $content['withdraw_form'] = loadTemplate('admin_list_beg_form', true); + $content['withdraw_form'] = loadTemplate('admin_list_beg_form', TRUE); } else { // Display message "no manual withdraw possible" - $content['withdraw_form'] = displayMessage('{--ADMIN_BEG_ALREADY_WITHDRAW--}', true); + $content['withdraw_form'] = displayMessage('{--ADMIN_BEG_ALREADY_WITHDRAW--}', TRUE); } // Prepare constant for timemark if (isExtensionActive('autopurge')) { $content['autopurge_timeout'] = generateDateTime(time() - getApInactiveSince(), 2); } else { - $content['autopurge_timeout'] = displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=autopurge%}', true); + $content['autopurge_timeout'] = displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=autopurge%}', TRUE); } // Load final template - loadTemplate('admin_list_beg', false, $content); + loadTemplate('admin_list_beg', FALSE, $content); } else { // No one has joined the begging rallye... displayMessage('{--ADMIN_BEG_NO_RALLYE--}'); diff --git a/inc/modules/admin/what-list_bonus.php b/inc/modules/admin/what-list_bonus.php index 068106e5d4..70c57a3a5e 100644 --- a/inc/modules/admin/what-list_bonus.php +++ b/inc/modules/admin/what-list_bonus.php @@ -117,7 +117,7 @@ ORDER BY $content['count'] = $count; // Load template and add it - $OUT .= loadTemplate('admin_list_bonus_rows', true, $content); + $OUT .= loadTemplate('admin_list_bonus_rows', TRUE, $content); $count++; } // END - while @@ -127,10 +127,10 @@ ORDER BY // Check if we need to display form or not with manuel withdraw if (getLastMonth() == getMonth()) { // Load form - $content['withdraw_form'] = loadTemplate('admin_list_bonus_form', true); + $content['withdraw_form'] = loadTemplate('admin_list_bonus_form', TRUE); } else { // Display message "no manual withdraw possible" - $content['withdraw_form'] = loadTemplate('admin_settings_unsaved', true, '{--ADMIN_BONUS_ALREADY_WITHDRAW--}'); + $content['withdraw_form'] = loadTemplate('admin_settings_unsaved', TRUE, '{--ADMIN_BONUS_ALREADY_WITHDRAW--}'); } // Prepare constant for timemark @@ -142,7 +142,7 @@ ORDER BY } // Load final template - loadTemplate('admin_list_bonus', false, $content); + loadTemplate('admin_list_bonus', FALSE, $content); } else { // No one has become an "activity bonus"... displayMessage('{--ADMIN_BONUS_NO_ACTIVE_RALLYE--}'); diff --git a/inc/modules/admin/what-list_cats.php b/inc/modules/admin/what-list_cats.php index 15a090bda7..f1574fd561 100644 --- a/inc/modules/admin/what-list_cats.php +++ b/inc/modules/admin/what-list_cats.php @@ -80,7 +80,7 @@ if (isGetRequestElementSet('userid')) { $content['sel'] = $selection; // Load row template and count up - $OUT .= loadTemplate('admin_list_user_cats_row', true, $content); + $OUT .= loadTemplate('admin_list_user_cats_row', TRUE, $content); $count++; } // END - while @@ -91,10 +91,10 @@ if (isGetRequestElementSet('userid')) { $content['rows'] = $OUT; // Load main template - loadTemplate('admin_list_user_cats', false, $content); + loadTemplate('admin_list_user_cats', FALSE, $content); } else { // No categories selected! :-( - loadTemplate('admin_list_user_cats_404', false, $content); + loadTemplate('admin_list_user_cats_404', FALSE, $content); } } else { // User not found diff --git a/inc/modules/admin/what-list_country.php b/inc/modules/admin/what-list_country.php index c27f2284b3..518ce7690b 100644 --- a/inc/modules/admin/what-list_country.php +++ b/inc/modules/admin/what-list_country.php @@ -74,7 +74,7 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl adminChangeActivationStatus(postRequestElement('id'), 'countries', 'is_active'); // Show next link - loadTemplate('admin_next_link', false, array( + loadTemplate('admin_next_link', FALSE, array( 'url' => 'modules.php?module=admin&what=list_country', 'title' => '{--ADMIN_COUNTRY_ACTIVATION_NEXT_LINK--}' )); @@ -114,7 +114,7 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl $content['is_active'] = $isActive; // Insert row template and switch color - $OUT .= loadTemplate($row, true, $content); + $OUT .= loadTemplate($row, TRUE, $content); } // END - if // Free result @@ -132,7 +132,7 @@ if ((isFormSent('add')) && (isPostRequestElementSet('code')) && (isPostRequestEl ); // Load main template - loadTemplate('admin_list_country_form', false, $content); + loadTemplate('admin_list_country_form', FALSE, $content); } // END - if } else { // Shall we modify / remove entries now? @@ -181,24 +181,24 @@ LIMIT 1"); $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Load row template and switch colors - $OUT .= loadTemplate('admin_list_country_row', true, $content); + $OUT .= loadTemplate('admin_list_country_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result); } else { // No code setup so far (not possible by this software! 'DE' for 'Deutschland' is default - $OUT = loadTemplate('admin_list_country_no_row', true); + $OUT = loadTemplate('admin_list_country_no_row', TRUE); } // Add list to constant for the template $content['rows'] = $OUT; // Include add template - $content['add_form'] = loadTemplate('admin_add_country', true); + $content['add_form'] = loadTemplate('admin_add_country', TRUE); // Load main template - loadTemplate('admin_list_country', false, $content); + loadTemplate('admin_list_country', FALSE, $content); } // [EOF] diff --git a/inc/modules/admin/what-list_coupon.php b/inc/modules/admin/what-list_coupon.php index cd47e625e7..af6b30d1ac 100644 --- a/inc/modules/admin/what-list_coupon.php +++ b/inc/modules/admin/what-list_coupon.php @@ -82,11 +82,11 @@ ORDER BY $content['coupon_expired'] = generateDateTime($content['coupon_expired'], '2'); // Add the row template - $OUT .= loadTemplate('admin_list_coupon_usr_row', true, $content); + $OUT .= loadTemplate('admin_list_coupon_usr_row', TRUE, $content); } // END - while // Load main template - loadTemplate('admin_list_coupon_usr', false, $OUT); + loadTemplate('admin_list_coupon_usr', FALSE, $OUT); } else { // No cashed coupons found displayMessage('{--ADMIN_LIST_COUPON_404--}'); @@ -121,11 +121,11 @@ ORDER BY $content['coupon_expired'] = generateDateTime($content['coupon_expired'], '2'); // Add the row template - $OUT .= loadTemplate('admin_list_coupon_row', true, $content); + $OUT .= loadTemplate('admin_list_coupon_row', TRUE, $content); } // END - while // Load main template - loadTemplate('admin_list_coupon', false, $OUT); + loadTemplate('admin_list_coupon', FALSE, $OUT); } else { // No cashed coupons found displayMessage('{--ADMIN_LIST_COUPON_404--}'); diff --git a/inc/modules/admin/what-list_doubler.php b/inc/modules/admin/what-list_doubler.php index 4bcb982a76..190be0268f 100644 --- a/inc/modules/admin/what-list_doubler.php +++ b/inc/modules/admin/what-list_doubler.php @@ -71,7 +71,7 @@ switch (getRequestElement('do')) { $sumAlready = '0'; $sumWaiting = '0'; // Number of direct already payouts and referral - $count = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='N'"); + $count = countSumTotalData('Y', 'doubler', 'id', 'completed', TRUE, " AND `is_ref`='N'"); if ($count > 0) { // Something was payed out @@ -79,7 +79,7 @@ switch (getRequestElement('do')) { $content['already_direct_link'] = '' . $count . ''; } // END - if - $count = countSumTotalData('Y','doubler','id','completed',true, " AND `is_ref`='Y'"); + $count = countSumTotalData('Y', 'doubler', 'id', 'completed', TRUE, " AND `is_ref`='Y'"); if ($count > 0) { // Something was payed out @@ -88,7 +88,7 @@ switch (getRequestElement('do')) { } // END - if // And the same for waiting pouts (direct and referral) - $count = countSumTotalData('N','doubler','id','completed',true, " AND `is_ref`='N'"); + $count = countSumTotalData('N', 'doubler', 'id', 'completed', TRUE, " AND `is_ref`='N'"); if ($count > 0) { // Something was payed out @@ -96,7 +96,7 @@ switch (getRequestElement('do')) { $content['waiting_direct_link'] = '' . $count . ''; } // END - if - $count = countSumTotalData('N','doubler','id','completed',true, " AND `is_ref`='Y'"); + $count = countSumTotalData('N', 'doubler', 'id', 'completed', TRUE, " AND `is_ref`='Y'"); if ($count > 0) { // Something was payed out @@ -113,7 +113,7 @@ switch (getRequestElement('do')) { } // END - switch // Load mode template -loadTemplate('admin_list_doubler_' . getRequestElement('do'), false, $content); +loadTemplate('admin_list_doubler_' . getRequestElement('do'), FALSE, $content); // [EOF] ?> diff --git a/inc/modules/admin/what-list_email_max_rec.php b/inc/modules/admin/what-list_email_max_rec.php index beba87e5e2..0dc271e48c 100644 --- a/inc/modules/admin/what-list_email_max_rec.php +++ b/inc/modules/admin/what-list_email_max_rec.php @@ -108,12 +108,12 @@ if (isPostRequestElementSet('add_max')) { SQL_FREERESULT($result); // Load row template and switch color - $OUT .= loadTemplate('admin_delete_email_max_rec_row', true, $content); + $OUT .= loadTemplate('admin_delete_email_max_rec_row', TRUE, $content); } // END - foreach $content['rows'] = $OUT; // Load main template - loadTemplate('admin_delete_email_max_rec', false, $content); + loadTemplate('admin_delete_email_max_rec', FALSE, $content); } elseif ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit entries $OUT = ''; @@ -125,12 +125,12 @@ if (isPostRequestElementSet('add_max')) { SQL_FREERESULT($result); // Load row template and switch color - $OUT .= loadTemplate('admin_edit_email_max_rec_row', true, $content); + $OUT .= loadTemplate('admin_edit_email_max_rec_row', TRUE, $content); } // END - foreach $content['rows'] = $OUT; // Load main template - loadTemplate('admin_edit_email_max_rec', false, $content); + loadTemplate('admin_edit_email_max_rec', FALSE, $content); } else { $result = SQL_QUERY("SELECT `id`, `value`, `comment` FROM `{?_MYSQL_PREFIX?}_max_receive` ORDER BY `value` ASC", __FILE__, __LINE__); @@ -139,7 +139,7 @@ if (isPostRequestElementSet('add_max')) { $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Load row template and switch color - $OUT .= loadTemplate('admin_list_email_max_rec_row', true, $content); + $OUT .= loadTemplate('admin_list_email_max_rec_row', TRUE, $content); } // END - while // Free memory @@ -147,7 +147,7 @@ if (isPostRequestElementSet('add_max')) { $content['rows'] = $OUT; // Load main template - loadTemplate('admin_list_email_max_rec', false, $content); + loadTemplate('admin_list_email_max_rec', FALSE, $content); } // END - if // Display form diff --git a/inc/modules/admin/what-list_forced_ads.php b/inc/modules/admin/what-list_forced_ads.php index b728277d3d..4771a77db5 100644 --- a/inc/modules/admin/what-list_forced_ads.php +++ b/inc/modules/admin/what-list_forced_ads.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // By default show the list... -$show = true; +$show = TRUE; // Check for 'url_id' element if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('forced_ads_id'))) { @@ -64,7 +64,7 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_edit_show_forced_ads'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_edit')) { // Change data of entries showEntriesByXmlCallback('admin_edit_do_forced_ads'); @@ -73,16 +73,16 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_delete_show_forced_ads'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_delete')) { // Remove entries from database showEntriesByXmlCallback('admin_delete_do_forced_ads'); } // Show entries? -if ($show === false) { +if ($show === FALSE) { // No, a form has already been show - return false; + return FALSE; } // END - if // List all URLs diff --git a/inc/modules/admin/what-list_forced_campaigns.php b/inc/modules/admin/what-list_forced_campaigns.php index 3a1ad98836..50949df580 100644 --- a/inc/modules/admin/what-list_forced_campaigns.php +++ b/inc/modules/admin/what-list_forced_campaigns.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // By default show the list... -$show = true; +$show = TRUE; // Check for 'url_id' element if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('forced_campaign_id'))) { @@ -64,7 +64,7 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_edit_show_forced_campaigns'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_edit')) { // Change data of entries showEntriesByXmlCallback('admin_edit_do_forced_campaigns'); @@ -73,7 +73,7 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_delete_show_forced_campaigns'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_delete')) { // Remove entries from database showEntriesByXmlCallback('admin_delete_do_forced_campaigns'); @@ -82,7 +82,7 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_lock_show_forced_campaigns'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_lock')) { // Un-/lock selected campaigns. This does not work for pending campaigns showEntriesByXmlCallback('admin_lock_do_forced_campaigns'); @@ -98,9 +98,9 @@ if (isFormSent('add')) { } // Show entries? -if ($show === false) { +if ($show === FALSE) { // No, a form has already been show - return false; + return FALSE; } // END - if // List all campaigns @@ -112,7 +112,7 @@ $content = array( ); // Display form for adding a forced-ad -loadTemplate('admin_add_forced_campaign', false, $content); +loadTemplate('admin_add_forced_campaign', FALSE, $content); // [EOF] ?> diff --git a/inc/modules/admin/what-list_forced_costs.php b/inc/modules/admin/what-list_forced_costs.php index 81c683069e..e4f3ae4406 100644 --- a/inc/modules/admin/what-list_forced_costs.php +++ b/inc/modules/admin/what-list_forced_costs.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // By default show the list... -$show = true; +$show = TRUE; // Check for 'url_id' element if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('forced_costs_id'))) { @@ -64,7 +64,7 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_edit_show_forced_costs'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_edit')) { // Change data of entries showEntriesByXmlCallback('admin_edit_do_forced_costs'); @@ -73,16 +73,16 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_delete_show_forced_costs'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_delete')) { // Remove entries from database showEntriesByXmlCallback('admin_delete_do_forced_costs'); } // Show entries? -if ($show === false) { +if ($show === FALSE) { // No, a form has already been show - return false; + return FALSE; } // END - if // List all URLs diff --git a/inc/modules/admin/what-list_grade_data.php b/inc/modules/admin/what-list_grade_data.php index 173bcbe72f..d6eb5bf20f 100644 --- a/inc/modules/admin/what-list_grade_data.php +++ b/inc/modules/admin/what-list_grade_data.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // By default show the list... -$show = true; +$show = TRUE; // Check for '???_id' element if ((countRequestPost() > 0) && (!ifPostContainsSelections('grade_id'))) { @@ -61,7 +61,7 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_edit_show_grade_data'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_edit')) { // Change data of entries showEntriesByXmlCallback('admin_edit_do_grade_data'); @@ -70,16 +70,16 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_delete_show_grade_data'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_delete')) { // Remove entries from database showEntriesByXmlCallback('admin_delete_do_grade_data'); } // Show entries? -if ($show === false) { +if ($show === FALSE) { // No, a form has already been show - return false; + return FALSE; } // END - if // List all URLs diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index 772b46616b..e3899b351c 100644 --- a/inc/modules/admin/what-list_holiday.php +++ b/inc/modules/admin/what-list_holiday.php @@ -71,14 +71,14 @@ if (!SQL_HASZERONUMS($result)) { ); // Load row template and switch color - $OUT .= loadTemplate('admin_list_holiday_row', true, $content); + $OUT .= loadTemplate('admin_list_holiday_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result); // Load main template - loadTemplate('admin_list_holiday', false, $OUT); + loadTemplate('admin_list_holiday', FALSE, $OUT); } else { // No holiday requests found displayMessage('{--ADMIN_HOLIDAY_NOTHING_FOUND--}'); diff --git a/inc/modules/admin/what-list_links.php b/inc/modules/admin/what-list_links.php index 1b024ace19..4a94c12924 100644 --- a/inc/modules/admin/what-list_links.php +++ b/inc/modules/admin/what-list_links.php @@ -90,7 +90,7 @@ if (isGetRequestElementSet('userid')) { // Initializes all other elements $linkData['mail_id'] = ''; $linkData['problem'] = '{--ADMIN_GENERAL_MAIL_PROBLEM--}'; - $result_data = false; + $result_data = FALSE; // Load data from stats table... // @TODO Rewrite this to includes/filter @@ -131,10 +131,10 @@ if (isGetRequestElementSet('userid')) { $mailData['timestamp'] = generateDateTime($mailData['timestamp'], 0); // Load row template - $OUT .= loadTemplate('admin_list_links_row', true, $mailData); + $OUT .= loadTemplate('admin_list_links_row', TRUE, $mailData); } else { // Load template for error - $OUT .= loadTemplate('admin_list_links_problem', true, $linkData); + $OUT .= loadTemplate('admin_list_links_problem', TRUE, $linkData); } // Free result @@ -153,7 +153,7 @@ if (isGetRequestElementSet('userid')) { SQL_FREERESULT($result); // Load final template - loadTemplate('admin_list_links', false, $content); + loadTemplate('admin_list_links', FALSE, $content); } } else { // No mails left to confirm diff --git a/inc/modules/admin/what-list_network_array_translation.php b/inc/modules/admin/what-list_network_array_translation.php index 40f63f3cd0..506804755f 100644 --- a/inc/modules/admin/what-list_network_array_translation.php +++ b/inc/modules/admin/what-list_network_array_translation.php @@ -50,13 +50,13 @@ if (doVerifyExpertSettings() != 'agreed') { } // END - if // By default we should display list/add new forms -$GLOBALS['network_display'] = true; +$GLOBALS['network_display'] = TRUE; // Handle form here doNetworkHandleForm(); // Display forms? -if ($GLOBALS['network_display'] === false) { +if ($GLOBALS['network_display'] === FALSE) { // Abort here return; } // END - if @@ -116,15 +116,15 @@ ORDER BY // Add it to network if the type matches selected if ($row['network_type_id'] == postRequestElement('network_type_id')) { // Matches, then add it for disabling this entry - $GLOBALS['network_array_translation_disabled'][$row['network_array_index']] = true; + $GLOBALS['network_array_translation_disabled'][$row['network_array_index']] = TRUE; } // END - if // Add row template and switch color - $OUT .= loadTemplate('admin_list_network_array_translation_row', true, $row); + $OUT .= loadTemplate('admin_list_network_array_translation_row', TRUE, $row); } // END - while // Load main template - loadTemplate('admin_list_network_array_translation', false, $OUT); + loadTemplate('admin_list_network_array_translation', FALSE, $OUT); } else { // No entries found displayMessage('{%message,ADMIN_NETWORK_ARRAY_TRANSLATION_404=' . $networkData['network_title'] . '%}'); @@ -134,7 +134,7 @@ ORDER BY SQL_FREERESULT($result); // Add form for adding new array_translation pair - loadTemplate('admin_add_network_array_translation', false, $networkData); + loadTemplate('admin_add_network_array_translation', FALSE, $networkData); } else { // Generate network list for this script outputHtml(generateAdminNetworkList()); diff --git a/inc/modules/admin/what-list_network_data.php b/inc/modules/admin/what-list_network_data.php index aa4a9321bd..04a6c37da5 100644 --- a/inc/modules/admin/what-list_network_data.php +++ b/inc/modules/admin/what-list_network_data.php @@ -50,13 +50,13 @@ if (doVerifyExpertSettings() != 'agreed') { } // END - if // By default we should display list/add new forms -$GLOBALS['network_display'] = true; +$GLOBALS['network_display'] = TRUE; // Handle form here doNetworkHandleForm(); // Display forms? -if ($GLOBALS['network_display'] === false) { +if ($GLOBALS['network_display'] === FALSE) { // Abort here return; } // END - if @@ -84,11 +84,11 @@ if (!SQL_HASZERONUMS($result)) { $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Load row template - $OUT .= loadTemplate('admin_list_network_data_row', true, $content); + $OUT .= loadTemplate('admin_list_network_data_row', TRUE, $content); } // END - while // Load main template - loadTemplate('admin_list_network_data', false, $OUT); + loadTemplate('admin_list_network_data', FALSE, $OUT); } else { // Display a message that there are sponsor networks supported, yet displayMessage('{--ADMIN_NETWORK_NONE_SUPPORTED--}'); diff --git a/inc/modules/admin/what-list_network_request_params.php b/inc/modules/admin/what-list_network_request_params.php index 74e1909cd6..1831d44610 100644 --- a/inc/modules/admin/what-list_network_request_params.php +++ b/inc/modules/admin/what-list_network_request_params.php @@ -50,13 +50,13 @@ if (doVerifyExpertSettings() != 'agreed') { } // END - if // By default we should display list/add new forms -$GLOBALS['network_display'] = true; +$GLOBALS['network_display'] = TRUE; // Handle form here doNetworkHandleForm(); // Display forms? -if ($GLOBALS['network_display'] === false) { +if ($GLOBALS['network_display'] === FALSE) { // Abort here return; } // END - if @@ -112,15 +112,15 @@ ORDER BY // Add it to network if the type matches selected if ($row['network_type_id'] == postRequestElement('network_type_id')) { // Matches, then add it for disabling this entry - $GLOBALS['network_request_params_disabled'][$row['network_request_param_key']] = true; + $GLOBALS['network_request_params_disabled'][$row['network_request_param_key']] = TRUE; } // END - if // Add row template and switch color - $OUT .= loadTemplate('admin_list_network_request_params_row', true, $row); + $OUT .= loadTemplate('admin_list_network_request_params_row', TRUE, $row); } // END - while // Load main template - loadTemplate('admin_list_network_request_params', false, $OUT); + loadTemplate('admin_list_network_request_params', FALSE, $OUT); } else { // No entries found displayMessage('{%message,ADMIN_NETWORK_REQUEST_PARAMETER_404=' . $networkData['network_title'] . '%}'); @@ -130,7 +130,7 @@ ORDER BY SQL_FREERESULT($result); // Add form for adding new params - loadTemplate('admin_add_network_request_param', false, $networkData); + loadTemplate('admin_add_network_request_param', FALSE, $networkData); } else { // Generate network list for this script outputHtml(generateAdminNetworkList()); diff --git a/inc/modules/admin/what-list_network_types.php b/inc/modules/admin/what-list_network_types.php index bb15cf56cb..91adcd523b 100644 --- a/inc/modules/admin/what-list_network_types.php +++ b/inc/modules/admin/what-list_network_types.php @@ -50,13 +50,13 @@ if (doVerifyExpertSettings() != 'agreed') { } // END - if // By default we should display list/add new forms -$GLOBALS['network_display'] = true; +$GLOBALS['network_display'] = TRUE; // Handle form here doNetworkHandleForm(); // Display forms? -if ($GLOBALS['network_display'] === false) { +if ($GLOBALS['network_display'] === FALSE) { // Abort here return; } // END - if @@ -92,14 +92,14 @@ ORDER BY $OUT = ''; while ($row = SQL_FETCHARRAY($result)) { // Set disabled entry - $GLOBALS['network_types_disabled'][$row['network_type_handler']] = true; + $GLOBALS['network_types_disabled'][$row['network_type_handler']] = TRUE; // Add row template and switch color - $OUT .= loadTemplate('admin_list_network_types_row', true, $row); + $OUT .= loadTemplate('admin_list_network_types_row', TRUE, $row); } // END - while // Load main template - loadTemplate('admin_list_network_types', false, $OUT); + loadTemplate('admin_list_network_types', FALSE, $OUT); } else { // No entries found displayMessage('{%message,ADMIN_NETWORK_TYPE_HANDLER_404=' . $networkData['network_title'] . '%}'); @@ -112,7 +112,7 @@ ORDER BY $networkData['network_type_reload_time_unit'] = generateTimeUnitSelectionBox('h', 'network_type_reload_time_unit', array('W', 'D', 'h', 'm', 's')); // Add form for adding new types - loadTemplate('admin_add_network_type', false, $networkData); + loadTemplate('admin_add_network_type', FALSE, $networkData); } else { // Generate network list for this script outputHtml(generateAdminNetworkList()); diff --git a/inc/modules/admin/what-list_network_vcheck_params.php b/inc/modules/admin/what-list_network_vcheck_params.php index b2b77a5248..82bf013f46 100644 --- a/inc/modules/admin/what-list_network_vcheck_params.php +++ b/inc/modules/admin/what-list_network_vcheck_params.php @@ -50,13 +50,13 @@ if (doVerifyExpertSettings() != 'agreed') { } // END - if // By default we should display list/add new forms -$GLOBALS['network_display'] = true; +$GLOBALS['network_display'] = TRUE; // Handle form here doNetworkHandleForm(); // Display forms? -if ($GLOBALS['network_display'] === false) { +if ($GLOBALS['network_display'] === FALSE) { // Abort here return; } // END - if @@ -89,14 +89,14 @@ ORDER BY $OUT = ''; while ($row = SQL_FETCHARRAY($result)) { // Add this entry - $GLOBALS['network_vcheck_params_disabled'][$row['network_vcheck_param_key']] = true; + $GLOBALS['network_vcheck_params_disabled'][$row['network_vcheck_param_key']] = TRUE; // Add row template and switch color - $OUT .= loadTemplate('admin_list_network_vcheck_params_row', true, $row); + $OUT .= loadTemplate('admin_list_network_vcheck_params_row', TRUE, $row); } // END - while // Load main template - loadTemplate('admin_list_network_vcheck_params', false, $OUT); + loadTemplate('admin_list_network_vcheck_params', FALSE, $OUT); } else { // No entries found displayMessage('{%message,ADMIN_NETWORK_VCHECK_PARAMETER_404=' . $networkData['network_title'] . '%}'); @@ -106,7 +106,7 @@ ORDER BY SQL_FREERESULT($result); // Add form for adding new params - loadTemplate('admin_add_network_vcheck_param', false, $networkData); + loadTemplate('admin_add_network_vcheck_param', FALSE, $networkData); } else { // Generate network list for this script outputHtml(generateAdminNetworkList()); diff --git a/inc/modules/admin/what-list_notifications.php b/inc/modules/admin/what-list_notifications.php index f61e1785a8..51020c6906 100644 --- a/inc/modules/admin/what-list_notifications.php +++ b/inc/modules/admin/what-list_notifications.php @@ -45,7 +45,7 @@ addYouAreHereLink('admin', __FILE__); // Init variables $SQL2 = ''; -$result_max = false; +$result_max = FALSE; // Set offset an current page to default values if (!isGetRequestElementSet('page')) setGetRequestElement('page' , 1); @@ -95,17 +95,17 @@ if ((isExtensionActive('bonus')) && (!SQL_HASZERONUMS($result_max)) && (!empty($ $content['timestamp'] = generateDateTime($content['timestamp'], 0); // Load row template - $OUT .= loadTemplate('admin_list_notify_emails_row', true, $content); + $OUT .= loadTemplate('admin_list_notify_emails_row', TRUE, $content); } // END - if // Add navigation (without change box but with colspan=3) - $content['nav'] = addEmailNavigation($numPages, getMailsPage(), false, 3, true); + $content['nav'] = addEmailNavigation($numPages, getMailsPage(), FALSE, 3, TRUE); // Prepare content $content['rows'] = $OUT; // Load main template - loadTemplate('admin_list_notify_emails', false, $content); + loadTemplate('admin_list_notify_emails', FALSE, $content); } } elseif ((SQL_NUMROWS($result_max) === 0) && (is_resource($result_max))) { // No notifications found diff --git a/inc/modules/admin/what-list_payouts.php b/inc/modules/admin/what-list_payouts.php index c52066f03f..a4c330c85a 100644 --- a/inc/modules/admin/what-list_payouts.php +++ b/inc/modules/admin/what-list_payouts.php @@ -124,7 +124,7 @@ LIMIT 1", } // END - switch // Transfer variables... - $reason = encodeString(getMessage('ADMIN_PAYOUT_REASON'), false); + $reason = encodeString(getMessage('ADMIN_PAYOUT_REASON'), FALSE); // Execute transfer $ret = sendGetRequest($data['engine_url']); @@ -160,11 +160,11 @@ LIMIT 1", } else { // Something goes wrong... :-( $content = implode('
', $ret); - loadTemplate('admin_payout_failed_transfer', false, $content); + loadTemplate('admin_payout_failed_transfer', FALSE, $content); } } else { // Cannot load payout id - loadTemplate('admin_settings_unsaved', false, '{--ADMIN_PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}'); + loadTemplate('admin_settings_unsaved', FALSE, '{--ADMIN_PAYOUT_FAILED_OBTAIN_PAYOUT_ID--}'); } } else { // Prepare content @@ -175,7 +175,7 @@ LIMIT 1", ); // Load template - loadTemplate('admin_payout_accept_form', false, $content); + loadTemplate('admin_payout_accept_form', FALSE, $content); } } elseif ((getRequestElement('do') == 'reject') && (getUserData('email') != '')) { // Ok, now we can output the form or execute rejecting @@ -206,7 +206,7 @@ LIMIT 1", ); // Load template - loadTemplate('admin_payout_reject_form', false, $content); + loadTemplate('admin_payout_reject_form', FALSE, $content); } } else { // Cannot load user data @@ -254,10 +254,10 @@ ORDER BY // Banner/Textlink views/clicks request if (!empty($content['banner'])) { // Load template for the banner - $content['target_account'] = loadTemplate('admin_list_payouts_banner', true, $content); + $content['target_account'] = loadTemplate('admin_list_payouts_banner', TRUE, $content); } else { // Textlink - $content['target_account'] = loadTemplate('admin_list_payouts_txt', true, $content); + $content['target_account'] = loadTemplate('admin_list_payouts_txt', TRUE, $content); } // Admins can addionally test the URL for framekillers @@ -268,14 +268,14 @@ ORDER BY $content['payout_timestamp'] = generateDateTime($content['payout_timestamp'], 2); // Add row and switch color - $OUT .= loadTemplate('admin_list_payouts_row', true, $content); + $OUT .= loadTemplate('admin_list_payouts_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result); // Load final template - loadTemplate('admin_list_payouts', false, $OUT); + loadTemplate('admin_list_payouts', FALSE, $OUT); } else { // No payout requests are sent so far displayMessage('{--ADMIN_PAYOUT_NO_REQUESTS_FOUND--}'); diff --git a/inc/modules/admin/what-list_point_accounts.php b/inc/modules/admin/what-list_point_accounts.php index b6f542d442..a605653754 100644 --- a/inc/modules/admin/what-list_point_accounts.php +++ b/inc/modules/admin/what-list_point_accounts.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // By default show the list... -$show = true; +$show = TRUE; // Check for 'url_id' element if ((!isFormSent('add')) && (countRequestPost() > 0) && (!ifPostContainsSelections('id'))) { @@ -70,7 +70,7 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_edit_show_point_accounts'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_edit')) { // Change data of only custom entries showEntriesByXmlCallback('admin_edit_do_point_accounts'); @@ -79,16 +79,16 @@ if (isFormSent('add')) { showEntriesByXmlCallback('admin_delete_show_point_accounts'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif ((isFormSent('do_delete')) && (ifPointsAccountTypeMatchesPost('CUSTOM'))) { // Remove only custom entries showEntriesByXmlCallback('admin_delete_do_point_accounts'); } // Show entries? -if ($show === false) { +if ($show === FALSE) { // No, a form has already been show - return false; + return FALSE; } // END - if // List all campaigns diff --git a/inc/modules/admin/what-list_rallyes.php b/inc/modules/admin/what-list_rallyes.php index 14c2124e01..73087c8421 100644 --- a/inc/modules/admin/what-list_rallyes.php +++ b/inc/modules/admin/what-list_rallyes.php @@ -56,13 +56,13 @@ if (isGetRequestElementSet('rallye_id')) { switch (getRequestElement('activate')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `is_active`='Y' WHERE `id`=%s AND `is_active`='N' LIMIT 1", - array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `is_active`='N' WHERE `id`=%s AND `is_active`='Y' LIMIT 1", - array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE) ); break; } // END - switch @@ -71,13 +71,13 @@ if (isGetRequestElementSet('rallye_id')) { switch (getRequestElement('notify')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `send_notify`='Y' WHERE `id`=%s AND `send_notify`='N' LIMIT 1", - array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `send_notify`='N' WHERE `id`=%s AND `send_notify`='Y' LIMIT 1", - array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE) ); break; } // END - switch @@ -86,13 +86,13 @@ if (isGetRequestElementSet('rallye_id')) { switch (getRequestElement('auto')) { case '1': // Activate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `auto_add_new_user`='Y' WHERE `id`=%s AND `auto_add_new_user`='N' LIMIT 1", - array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE) ); break; case '0': // Deactivate addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_rallye_data` SET `auto_add_new_user`='N' WHERE `id`=%s AND `auto_add_new_user`='Y' LIMIT 1", - array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, false) + array(bigintval(getRequestElement('rallye_id'))), __FILE__, __LINE__, FALSE) ); break; } // END - switch @@ -110,11 +110,11 @@ if (isGetRequestElementSet('rallye_id')) { foreach (postRequestElement('sel') as $id => $selected) { // Remove selected rallye entirely... addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_data` WHERE `id`=%s LIMIT 1", - array(bigintval($id)), __FILE__, __LINE__, false)); + array(bigintval($id)), __FILE__, __LINE__, FALSE)); addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s", - array(bigintval($id)), __FILE__, __LINE__, false)); + array(bigintval($id)), __FILE__, __LINE__, FALSE)); addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_rallye_users` WHERE `rallye_id`=%s", - array(bigintval($id)), __FILE__, __LINE__, false)); + array(bigintval($id)), __FILE__, __LINE__, FALSE)); } // END - foreach // Run SQLS @@ -164,7 +164,7 @@ LIMIT 1", bigintval(postRequestElement('min_users', $id)), bigintval(postRequestElement('min_prices', $id)), $id - ), __FILE__, __LINE__, false)); + ), __FILE__, __LINE__, FALSE)); } // Run SQLS @@ -241,11 +241,11 @@ LIMIT 1", $content['rallye_id'] = bigintval($id); // Output row - $OUT .= loadTemplate('admin_' . $mode . '_rallyes_row', true, $content); + $OUT .= loadTemplate('admin_' . $mode . '_rallyes_row', TRUE, $content); } // END - foreach // Load final template - loadTemplate('admin_' . $mode . '_rallyes', false, $OUT); + loadTemplate('admin_' . $mode . '_rallyes', FALSE, $OUT); } else { // Nothing selected to edit displayMessage('{--ADMIN_RALLYE_NO_RALLYES_SELECTED--}'); @@ -281,7 +281,7 @@ ORDER BY } // END - if // Get user points - $points = countSumTotalData($row['userid'], 'user_points', 'points', 'userid', false, " AND `ref_depth`=1"); + $points = countSumTotalData($row['userid'], 'user_points', 'points', 'userid', FALSE, " AND `ref_depth`=1"); //* DEBUG: */ debugOutput(basename(__FILE__).':userid='.$row['userid'].',points='.$points.',opoints='.$row['curr_points']); // Prepare content @@ -295,7 +295,7 @@ ORDER BY ); // Load row template and switch color - $OUT .= loadTemplate('admin_list_rallye_usr_row', true, $row); + $OUT .= loadTemplate('admin_list_rallye_usr_row', TRUE, $row); } // END - while // Remember rows @@ -306,7 +306,7 @@ ORDER BY SQL_FREERESULT($result); // Load template - loadTemplate('admin_list_rallye_usr', false, $content); + loadTemplate('admin_list_rallye_usr', FALSE, $content); } else { // No entries found? displayMessage('{--ADMIN_RALLYE_USERS_404--}'); @@ -338,7 +338,7 @@ ORDER BY $OUT = ''; while ($data = SQL_FETCHARRAY($result)) { // Count joined userids - $users = countSumTotalData($data['rallye_id'], 'rallye_users', 'rallye_id', 'rallye_id', true); + $users = countSumTotalData($data['rallye_id'], 'rallye_users', 'rallye_id', 'rallye_id', TRUE); // Did some users joined this rallye? if ($users > 0) { @@ -360,7 +360,7 @@ ORDER BY 'send_notify' => $data['send_notify'], 'auto_add_new_user' => $data['auto_add_new_user'], 'notified' => $data['notified'], - 'prices_cnt' => countSumTotalData($data['rallye_id'], 'rallye_prices', 'rallye_id', 'rallye_id', true), + 'prices_cnt' => countSumTotalData($data['rallye_id'], 'rallye_prices', 'rallye_id', 'rallye_id', TRUE), 'descr' => $data['descr'], 'min_users' => $data['min_users'], 'min_prices' => $data['min_prices'], @@ -408,7 +408,7 @@ ORDER BY } // END - switch // Output row - $OUT .= loadTemplate('admin_list_rallyes_row', true, $row); + $OUT .= loadTemplate('admin_list_rallyes_row', TRUE, $row); } // END - while // Free memory @@ -418,7 +418,7 @@ ORDER BY $content['rows'] = $OUT; // Load template - loadTemplate('admin_list_rallyes', false, $content); + loadTemplate('admin_list_rallyes', FALSE, $content); } else { // No rallyes setup so far displayMessage('{--ADMIN_RALLYE_NO_RALLYES_SETUP--}'); diff --git a/inc/modules/admin/what-list_refs.php b/inc/modules/admin/what-list_refs.php index 7c4d99b462..3989f940b8 100644 --- a/inc/modules/admin/what-list_refs.php +++ b/inc/modules/admin/what-list_refs.php @@ -43,7 +43,7 @@ if (isGetRequestElementSet('userid')) { $userid = bigintval(getRequestElement('userid')); // Fix missing variable - $result_levels = false; + $result_levels = FALSE; // User found? if (fetchUserData($userid)) { @@ -95,7 +95,7 @@ ORDER BY // Is the data there? if (fetchUserData($content['refid'])) { // Check for referrals - $refs_cnt = countSumTotalData(getUserData('userid'), 'user_refs', 'id', 'userid', true); + $refs_cnt = countSumTotalData(getUserData('userid'), 'user_refs', 'id', 'userid', TRUE); // Prepare data for the template // @TODO Try to rewrite some to EL @@ -112,10 +112,10 @@ ORDER BY } // END - if // Load template for level one - $OUT_REFS .= loadTemplate('admin_list_refs_row', true, $content); + $OUT_REFS .= loadTemplate('admin_list_refs_row', TRUE, $content); } else { // No refs found - $OUT_REFS = loadTemplate('admin_list_refs_nodata', true, $content); + $OUT_REFS = loadTemplate('admin_list_refs_nodata', TRUE, $content); } // Add content @@ -126,14 +126,14 @@ ORDER BY $levels['info'] = sprintf(getMessage('ADMIN_USER_TOTAL_REFS'), generateUserProfileLink($userid), 0, 0); // No refs found - $levels['rows'] = loadTemplate('admin_list_refs_norefs', true, array('userid' => $userid)); + $levels['rows'] = loadTemplate('admin_list_refs_norefs', TRUE, array('userid' => $userid)); } // Free result SQL_FREERESULT($result_refs); // Load level template - $OUT .= loadTemplate('admin_list_refs_level', true, $levels); + $OUT .= loadTemplate('admin_list_refs_level', TRUE, $levels); } // END - while // Prepare content @@ -143,7 +143,7 @@ ORDER BY ); // Load main template - loadTemplate('admin_list_refs', false, $content); + loadTemplate('admin_list_refs', FALSE, $content); } else { // No refs made so far displayMessage('{--USER_REFERRAL_404--}'); diff --git a/inc/modules/admin/what-list_sponsor.php b/inc/modules/admin/what-list_sponsor.php index c5dc0eb0fd..27c8cf75f3 100644 --- a/inc/modules/admin/what-list_sponsor.php +++ b/inc/modules/admin/what-list_sponsor.php @@ -79,10 +79,10 @@ WHERE $content['last_online'] = generateDateTime($content['last_online'], 2); $content['last_change'] = generateDateTime($content['last_change'], 2); // Orders total - $content['orders'] = countSumTotalData(bigintval(getRequestElement('id')), 'sponsor_orders', 'id', 'sponsor_id', true); + $content['orders'] = countSumTotalData(bigintval(getRequestElement('id')), 'sponsor_orders', 'id', 'sponsor_id', TRUE); // Load template - loadTemplate('admin_list_sponsor_details', false, $content); + loadTemplate('admin_list_sponsor_details', FALSE, $content); } else { // Sponsor not found displayMessage('{%message,ADMIN_SPONSOR_404=' . bigintval(getRequestElement('id')) . '%}'); @@ -156,14 +156,14 @@ ORDER BY $content['last_online'] = generateDateTime($content['last_online'], 2); // Load row template - $OUT .= loadTemplate('admin_list_sponsor_row', true, $content); + $OUT .= loadTemplate('admin_list_sponsor_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result_main); // Load final template - loadTemplate('admin_list_sponsor', false, $OUT); + loadTemplate('admin_list_sponsor', FALSE, $OUT); } else { // No sponsors registered so far displayMessage('{--ADMIN_SPONSOR_NONE_REGISTERED--}'); diff --git a/inc/modules/admin/what-list_sponsor_pay.php b/inc/modules/admin/what-list_sponsor_pay.php index e4eff806bc..16276c4da5 100644 --- a/inc/modules/admin/what-list_sponsor_pay.php +++ b/inc/modules/admin/what-list_sponsor_pay.php @@ -148,14 +148,14 @@ if (isFormSent('add')) { if (isFormSent('edit')) { // Edit entry - $OUT .= loadTemplate('admin_list_sponsor_pay_edit_row', true, $content); + $OUT .= loadTemplate('admin_list_sponsor_pay_edit_row', TRUE, $content); } else { // Delete entry - $OUT .= loadTemplate('admin_list_sponsor_pay_del_row', true, $content); + $OUT .= loadTemplate('admin_list_sponsor_pay_del_row', TRUE, $content); } } else { // Entry invalid - $OUT .= loadTemplate('admin_list_sponsor_pay_404', true, $id); + $OUT .= loadTemplate('admin_list_sponsor_pay_404', TRUE, $id); } // Free result @@ -165,10 +165,10 @@ if (isFormSent('add')) { // Load main template depending on mode (edit/delete) if (isFormSent('edit')) { // Load main edit template - loadTemplate('admin_list_sponsor_pay_edit', false, $OUT); + loadTemplate('admin_list_sponsor_pay_edit', FALSE, $OUT); } else { // Load main delete template - loadTemplate('admin_list_sponsor_pay_del', false, $OUT); + loadTemplate('admin_list_sponsor_pay_del', FALSE, $OUT); } } else { // Load all payment types @@ -192,24 +192,24 @@ ORDER BY // List alle found payment types while ($content = SQL_FETCHARRAY($result)) { // Add row - $OUT .= loadTemplate('admin_list_sponsor_pay_row', true, $content); + $OUT .= loadTemplate('admin_list_sponsor_pay_row', TRUE, $content); } // END - while // Load list template - $content['list_out'] = loadTemplate('admin_list_sponsor_pay', true, $OUT); + $content['list_out'] = loadTemplate('admin_list_sponsor_pay', TRUE, $OUT); } else { // Noting setup so far! - $content['list_out'] = displayMessage('{--ADMIN_SPONSOR_NO_PAYTYPES--}', true); + $content['list_out'] = displayMessage('{--ADMIN_SPONSOR_NO_PAYTYPES--}', TRUE); } // Free memory SQL_FREERESULT($result); // Add new payment types here - $content['add_out'] = loadTemplate('admin_add_sponsor_paytype', true); + $content['add_out'] = loadTemplate('admin_add_sponsor_paytype', TRUE); // Load final template - loadTemplate('admin_sponsor_paytypes', false, $content); + loadTemplate('admin_sponsor_paytypes', FALSE, $content); } // [EOF] diff --git a/inc/modules/admin/what-list_surfbar_actions.php b/inc/modules/admin/what-list_surfbar_actions.php index 34865328c8..53a6e68b5c 100644 --- a/inc/modules/admin/what-list_surfbar_actions.php +++ b/inc/modules/admin/what-list_surfbar_actions.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // By default show the list... -$show = true; +$show = TRUE; // Edit or delete button hit? if (isFormSent('edit')) { @@ -52,16 +52,16 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_edit_show_surfbar_actions'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_edit')) { // Change data of entries showEntriesByXmlCallback('admin_edit_do_surfbar_actions'); } // Show entries? -if ($show === false) { +if ($show === FALSE) { // No, a form has already been show - return false; + return FALSE; } // END - if // List all URLs diff --git a/inc/modules/admin/what-list_surfbar_urls.php b/inc/modules/admin/what-list_surfbar_urls.php index d06b8285a7..02943e89df 100644 --- a/inc/modules/admin/what-list_surfbar_urls.php +++ b/inc/modules/admin/what-list_surfbar_urls.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // By default show the list... -$show = true; +$show = TRUE; // Check for 'url_id' element if ((countRequestPost() > 0) && (!ifPostContainsSelections('url_id'))) { @@ -61,7 +61,7 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_edit_show_surfbar_urls'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_edit')) { // Change data of entries showEntriesByXmlCallback('admin_edit_do_surfbar_urls'); @@ -70,7 +70,7 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_delete_show_surfbar_urls'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_delete')) { // Remove entries from database showEntriesByXmlCallback('admin_delete_do_surfbar_urls'); @@ -79,7 +79,7 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_lock_show_surfbar_urls'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_lock')) { // Un-/lock selected URLs. This does not work for pending URLs showEntriesByXmlCallback('admin_lock_do_surfbar_urls'); @@ -88,16 +88,16 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_undelete_show_surfbar_urls'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_undelete')) { // Undelete selected URLs. This does only work for deleted URLs... ;-) showEntriesByXmlCallback('admin_undelete_do_surfbar_urls'); } // Show entries? -if ($show === false) { +if ($show === FALSE) { // No, a form has already been show - return false; + return FALSE; } // END - if // List all URLs diff --git a/inc/modules/admin/what-list_task.php b/inc/modules/admin/what-list_task.php index 0862a618d4..31389aa8ad 100644 --- a/inc/modules/admin/what-list_task.php +++ b/inc/modules/admin/what-list_task.php @@ -121,7 +121,7 @@ ORDER BY } // END - foreach } else { // Unknown action performed - reportBug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=
%s
", print_r(postRequestArray(), true))); + reportBug(__FILE__, __LINE__, sprintf("Unknown task action performed. data=
%s
", print_r(postRequestArray(), TRUE))); } // Update query @@ -167,10 +167,10 @@ ORDER BY // Is there an extension task? if (isExtensionTask($content)) { // Load extension row template - $OUT .= loadTemplate('admin_list_task_ext_rows', true, $content); + $OUT .= loadTemplate('admin_list_task_ext_rows', TRUE, $content); } else { // Load default row template - $OUT .= loadTemplate('admin_list_task_rows', true, $content); + $OUT .= loadTemplate('admin_list_task_rows', TRUE, $content); } } // END - while @@ -187,10 +187,10 @@ ORDER BY // Load footer template if (getRequestElement('type') == 'deleted') { // Delete now button - loadTemplate('admin_list_task_delete', false, $content); + loadTemplate('admin_list_task_delete', FALSE, $content); } else { // Normal footer - loadTemplate('admin_list_task', false, $content); + loadTemplate('admin_list_task', FALSE, $content); } } } // END - if diff --git a/inc/modules/admin/what-list_transfer.php b/inc/modules/admin/what-list_transfer.php index 52e14432ef..a83f0ea0ec 100644 --- a/inc/modules/admin/what-list_transfer.php +++ b/inc/modules/admin/what-list_transfer.php @@ -66,7 +66,7 @@ if (!SQL_HASZERONUMS($result)) { $content['reason'] = wordwrap($content['reason'], 15); // Load row template add points and switch color - $OUT .= loadTemplate('admin_list_transfer_row', true, $content); + $OUT .= loadTemplate('admin_list_transfer_row', TRUE, $content); $total += $content['points']; } // END - while @@ -76,7 +76,7 @@ if (!SQL_HASZERONUMS($result)) { // Nothing for in and out $OUT = ' - ' . displayMessage('{--TRANSFER_NO_INOUT_TRANSFERS--}', true) . ' + ' . displayMessage('{--TRANSFER_NO_INOUT_TRANSFERS--}', TRUE) . ' '; } @@ -97,7 +97,7 @@ $content['balance'] = '{--TRANSFER_TOTAL_BALANCE--}'; $content['delete'] = ' '; // Load final template -loadTemplate('admin_list_transfer', false, $content); +loadTemplate('admin_list_transfer', FALSE, $content); // [EOF] ?> diff --git a/inc/modules/admin/what-list_unconfirmed.php b/inc/modules/admin/what-list_unconfirmed.php index c9177fa93a..02479af987 100644 --- a/inc/modules/admin/what-list_unconfirmed.php +++ b/inc/modules/admin/what-list_unconfirmed.php @@ -49,7 +49,7 @@ if (!isExtensionActive('mailid')) { } // END - if // Don't load the admin_list_unconfirmed template by default -$listed = false; +$listed = FALSE; // Init query $sql = ''; @@ -77,7 +77,7 @@ LIMIT 1", $ID = -1; // Load admin_list_unconfirmed template - $listed = true; + $listed = TRUE; $DATA = getRequestElement('mid'); $mailType = 'mailid'; } elseif ((isGetRequestElementSet('bid')) && (isExtensionActive('bonus'))) { @@ -107,7 +107,7 @@ LIMIT 1", $ID = getRequestElement('bid'); // Load admin_list_unconfirmed template - $listed = true; + $listed = TRUE; $DATA = $ID; $mailType = 'bonusid'; } else { @@ -116,7 +116,7 @@ LIMIT 1", } // Shall I display links or not? -if (($listed === true) && (!empty($sql))) { +if (($listed === TRUE) && (!empty($sql))) { // Load mail data $result_master = SQL_QUERY($sql, __FILE__, __LINE__); @@ -179,18 +179,18 @@ LIMIT %s", ); // Load row template and switch colors - $OUT .= loadTemplate('admin_list_unconfirmed_row', true, $row); + $OUT .= loadTemplate('admin_list_unconfirmed_row', TRUE, $row); } else { // No user data found - $OUT .= loadTemplate('admin_list_unconfirmed_row_404', true, $row); + $OUT .= loadTemplate('admin_list_unconfirmed_row_404', TRUE, $row); } } // END - while // Render it in our new listing - $OUT = loadTemplate('admin_list_unconfirmed_list', true, $OUT); + $OUT = loadTemplate('admin_list_unconfirmed_list', TRUE, $OUT); } else { // All links are confirmed... strange, you shall normally not get a link to this place in this scenario... hmmm. - $OUT = displayMessage('{--ADMIN_UNCONFIRMED_NO_LINK_LEFT--}', true); + $OUT = displayMessage('{--ADMIN_UNCONFIRMED_NO_LINK_LEFT--}', TRUE); } // Prepare content @@ -203,13 +203,13 @@ LIMIT %s", SQL_FREERESULT($result); // Load final template - loadTemplate('admin_list_unconfirmed', false, $content); + loadTemplate('admin_list_unconfirmed', FALSE, $content); } elseif (getRequestElement('mid') > 0) { // Data in pool or in user_stats not found, so let's find out where data is missing - if (countSumTotalData(bigintval($ID), 'pool', 'id', 'id', true) == 1) { + if (countSumTotalData(bigintval($ID), 'pool', 'id', 'id', TRUE) == 1) { // pool table displayMessage('{%message,ADMIN_UNCONFIRMED_POOL_MISSING=' . $ID . '%}'); - } elseif (countSumTotalData(bigintval($ID), 'user_stats', 'id', 'pool_id', true) == 1) { + } elseif (countSumTotalData(bigintval($ID), 'user_stats', 'id', 'pool_id', TRUE) == 1) { // user_stats table displayMessage('{%message,ADMIN_UNCONFIRMED_STATS_MISSING=' . $ID . '%}'); } else { diff --git a/inc/modules/admin/what-list_user.php b/inc/modules/admin/what-list_user.php index 9fa32e59f1..82728709f2 100644 --- a/inc/modules/admin/what-list_user.php +++ b/inc/modules/admin/what-list_user.php @@ -103,7 +103,7 @@ LIMIT 1', // Get count/sum of refs, selected categories, unconfirmed mails // @TODO Refacture these old link generation to functions $content['refs'] = countSumTotalData($userid, 'refsystem', 'counter'); - $content['cats'] = countSumTotalData($userid, 'user_cats', 'id', 'userid', true); + $content['cats'] = countSumTotalData($userid, 'user_cats', 'id', 'userid', TRUE); $content['links'] = getTotalUnconfirmedMails($userid); // Add links to the numbers @@ -175,7 +175,7 @@ LIMIT 1', $content['userid'] = $userid; // Load user-details template - loadTemplate('admin_user_details', false, $content); + loadTemplate('admin_user_details', FALSE, $content); } else { // Account does not exist! displayMessage('{%message,ADMIN_MEMBER_404=' . $userid . '%}'); @@ -321,7 +321,7 @@ ORDER BY // Transfer data to array $content['email'] = '[' . $content['email'] . ']'; $content['lock_timestamp'] = generateDateTime($content['lock_timestamp'], '2'); - $content['refs'] = countSumTotalData($content['userid'], 'user_refs', 'id', 'userid', true); + $content['refs'] = countSumTotalData($content['userid'], 'user_refs', 'id', 'userid', TRUE); // Prepare array for filter $data = array( @@ -363,7 +363,7 @@ ORDER BY } // Load row template and switch colors - $OUT .= loadTemplate('admin_list_user_row', true, $content); + $OUT .= loadTemplate('admin_list_user_row', TRUE, $content); } // END - while // Free memory @@ -379,7 +379,7 @@ ORDER BY $content = merge_array($content, $templateContent); // Load main template - loadTemplate('admin_list_user', false, $content); + loadTemplate('admin_list_user', FALSE, $content); } else { // No one as registered so far! :-( displayMessage('{--ADMIN_NO_NONE_REGISTERED--}'); diff --git a/inc/modules/admin/what-list_user_subid.php b/inc/modules/admin/what-list_user_subid.php index 75dba7e9b9..4249f27851 100644 --- a/inc/modules/admin/what-list_user_subid.php +++ b/inc/modules/admin/what-list_user_subid.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // By default show the list... -$show = true; +$show = TRUE; // Check for 'id' element if ((countRequestPost() > 0) && (!ifPostContainsSelections('id')) && (!ifPostContainsSelections('subid'))) { @@ -61,7 +61,7 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_edit_show_user_subid'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_edit')) { // Change data of entries showEntriesByXmlCallback('admin_edit_do_user_subid'); @@ -70,7 +70,7 @@ if (isFormSent('edit')) { showEntriesByXmlCallback('admin_delete_show_user_subid'); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } elseif (isFormSent('do_delete')) { // Remove entries from database showEntriesByXmlCallback('admin_delete_do_user_subid'); @@ -90,7 +90,7 @@ if (isFormSent('edit')) { loadIncludeOnce($incFile); // Do not show the list of URLs after this template - $show = false; + $show = FALSE; } else { // Display error message reportBug(__FILE__, __LINE__, 'Invalid include file ' . basename($incFile) . ' detected.'); @@ -98,9 +98,9 @@ if (isFormSent('edit')) { } // Show entries? -if ($show === false) { +if ($show === FALSE) { // No, a form has already been show - return false; + return FALSE; } // END - if // Is a user id sent? diff --git a/inc/modules/admin/what-list_wernis.php b/inc/modules/admin/what-list_wernis.php index 91b7914e14..9c45ff11d3 100644 --- a/inc/modules/admin/what-list_wernis.php +++ b/inc/modules/admin/what-list_wernis.php @@ -75,11 +75,11 @@ if (!SQL_HASZERONUMS($result)) { } // END - if // Append it and switch colors - $OUT .= loadTemplate('admin_list_wernis_row', true, $content); + $OUT .= loadTemplate('admin_list_wernis_row', TRUE, $content); } // END - while // Load main template - loadTemplate('admin_list_wernis_main', false, $OUT); + loadTemplate('admin_list_wernis_main', FALSE, $OUT); } else { // Nothing to display! displayMessage('{--ADMIN_WERNIS_NO_TRANSFERS--}'); diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index bf6969fcd8..84a09db7b4 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -69,7 +69,7 @@ if (getConfig('yoomedia_requests_remain') == '0') { displayMessage('{--ADMIN_YOOMEDIA_REQUESTS_DEPLETED--}'); // Abort here! - return false; + return FALSE; } // END - if // Get parsed array back @@ -79,27 +79,27 @@ $result = YOOMEDIA_GET_PARSED_RESULT_TEXTMAILS(); if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) { // Invalid result displayMessage('{--ADMIN_YOOMEDIA_INVALID_RESULT--}'); - return false; + return FALSE; } elseif (count($result[0]) < 7) { // Error received so prepare error code $code = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($result); // Output message - loadTemplate('admin_yoomedia_error', false, sprintf("{--ADMIN_YOOMEDIA_ERROR_%s--}", strtoupper(translateYooMediaError($code)))); - return false; + loadTemplate('admin_yoomedia_error', FALSE, sprintf("{--ADMIN_YOOMEDIA_ERROR_%s--}", strtoupper(translateYooMediaError($code)))); + return FALSE; } // Prepare all entries $OUT = ''; foreach ($result as $entry) { // Translate some data - $entry['pay'] = translateComma($entry['pay'], true, 5); + $entry['pay'] = translateComma($entry['pay'], TRUE, 5); // Check reload lock $reload = YOOMEDIA_CHECK_RELOAD($entry['id'], $entry['reload'], 'textmail'); // Is this mail already sent? - if ($reload !== false) { + if ($reload !== FALSE) { // Init countdown $countdown = '0'; @@ -122,15 +122,15 @@ foreach ($result as $entry) { } // Load row template for displaying - $OUT .= loadTemplate('admin_list_yoomedia_tm_already', true, $entry); + $OUT .= loadTemplate('admin_list_yoomedia_tm_already', TRUE, $entry); } else { // Load row template with buttons - $OUT .= loadTemplate('admin_list_yoomedia_tm_row', true, $entry); + $OUT .= loadTemplate('admin_list_yoomedia_tm_row', TRUE, $entry); } } // END - foreach // Load main template -loadTemplate('admin_list_yoomedia_tm', false, $OUT); +loadTemplate('admin_list_yoomedia_tm', FALSE, $OUT); // [EOF] ?> diff --git a/inc/modules/admin/what-lock_sponsor.php b/inc/modules/admin/what-lock_sponsor.php index 3190cc2c06..4464c66abc 100644 --- a/inc/modules/admin/what-lock_sponsor.php +++ b/inc/modules/admin/what-lock_sponsor.php @@ -99,7 +99,7 @@ if (isGetRequestElementSet('id')) { $content['email_link'] = '' . $content['gender'] . ' ' . $content['surname'] . ' ' . $content['family'] . ''; // Display form - loadTemplate('admin_lock_sponsor', false, $content); + loadTemplate('admin_lock_sponsor', FALSE, $content); } } else { // Cannot change status on unconfirmed or pending accounts! diff --git a/inc/modules/admin/what-lock_user.php b/inc/modules/admin/what-lock_user.php index 7fa06f1fcf..d750d2e5ca 100644 --- a/inc/modules/admin/what-lock_user.php +++ b/inc/modules/admin/what-lock_user.php @@ -46,7 +46,7 @@ addYouAreHereLink('admin', __FILE__); // Is a userid set? if (isGetRequestElementSet('userid')) { // Action not performed by default - $isActive = false; + $isActive = FALSE; // Load user's data if (fetchUserData(getRequestElement('userid'))) { @@ -74,7 +74,7 @@ if (isGetRequestElementSet('userid')) { // Prepare message $message = '{%message,ADMIN_USER_ACCOUNT_LOCKED=' . bigintval(getRequestElement('userid')) . '%}'; - $isActive = true; + $isActive = TRUE; } elseif ((isPostRequestElementSet('unlock')) && (getUserData('status') == 'LOCKED')) { // Ok, unlock the account! if (isExtensionInstalledAndNewer('user', '0.3.5')) { @@ -109,10 +109,10 @@ LIMIT 1", // Prepare message $message = '{%message,ADMIN_USER_ACCOUNT_UNLOCKED=' . bigintval(getRequestElement('userid')) . '%}'; - $isActive = true; + $isActive = TRUE; } elseif (isFormSent('delete')) { // Delete the account - $isActive = true; + $isActive = TRUE; loadIncludeOnce('inc/modules/admin/what-del_user.php'); } elseif (isPostRequestElementSet('no')) { // Do not lock him... @@ -145,10 +145,10 @@ LIMIT 1", } // Output form - loadTemplate('admin_lock_user', false, $content); + loadTemplate('admin_lock_user', FALSE, $content); } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}'); } } @@ -159,14 +159,14 @@ LIMIT 1", } elseif ($isActive) { // An action was performed... if (!empty($message)) { - loadTemplate('admin_settings_unsaved', false, $message); + loadTemplate('admin_settings_unsaved', FALSE, $message); } else { displayMessage('{--ADMIN_USER_UPDATED--}'); } } } else { // Account does not exists! - loadTemplate('admin_settings_unsaved', false, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}'); + loadTemplate('admin_settings_unsaved', FALSE, '{%message,ADMIN_MEMBER_404=' . bigintval(getRequestElement('userid')), '%}'); } } else { // List all users diff --git a/inc/modules/admin/what-maintenance.php b/inc/modules/admin/what-maintenance.php index 08b729e539..83de3c0242 100644 --- a/inc/modules/admin/what-maintenance.php +++ b/inc/modules/admin/what-maintenance.php @@ -74,7 +74,7 @@ if (isFormSent()) { } // END - switch // Display form - loadTemplate('admin_maintenance_form', false, $message); + loadTemplate('admin_maintenance_form', FALSE, $message); } // [EOF] diff --git a/inc/modules/admin/what-mem_add.php b/inc/modules/admin/what-mem_add.php index ae023ac81e..24c0cbeedf 100644 --- a/inc/modules/admin/what-mem_add.php +++ b/inc/modules/admin/what-mem_add.php @@ -166,7 +166,7 @@ if (!isFormSent()) { $content['action_selection'] = adminAddMenuSelectionBox('member', 'action', 'menu'); // Display form - loadTemplate('admin_add_member_menu', false, $content); + loadTemplate('admin_add_member_menu', FALSE, $content); } elseif (!isDemoModeActive()) { // Insert new menu entry if (isPostRequestElementSet('menu')) { diff --git a/inc/modules/admin/what-memedit.php b/inc/modules/admin/what-memedit.php index e16002dc3f..29c2c9b1eb 100644 --- a/inc/modules/admin/what-memedit.php +++ b/inc/modules/admin/what-memedit.php @@ -74,7 +74,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() ); // Load template - $OUT .= loadTemplate('admin_edit_member_menu_row', true, $content); + $OUT .= loadTemplate('admin_edit_member_menu_row', TRUE, $content); } else { // Entry not found? $content = array( @@ -82,7 +82,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() ); // Load template - $OUT .= loadTemplate('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content); } SQL_FREERESULT($result); } // END - if @@ -95,7 +95,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['count'] = $count; // Load template - loadTemplate('admin_edit_member_menu', false, $content); + loadTemplate('admin_edit_member_menu', FALSE, $content); } elseif ((isFormSent('delete')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // Del menu entries with or without confirmation $content['sub'] = $subMenu; @@ -116,7 +116,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() ); // Load template - $OUT .= loadTemplate('admin_delete_member_menu_row', true, $content); + $OUT .= loadTemplate('admin_delete_member_menu_row', TRUE, $content); } else { // Entry not found? $content = array( @@ -124,7 +124,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() ); // Load template - $OUT .= loadTemplate('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content); } SQL_FREERESULT($result); } // END - if @@ -136,7 +136,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['count'] = $count; // Load template - loadTemplate('admin_delete_member_menu', false, $content); + loadTemplate('admin_delete_member_menu', FALSE, $content); } elseif ((isPostRequestElementSet('status')) && (ifPostContainsSelections()) && (!isDemoModeActive())) { // Change status (visible / locked) $content['sub'] = $subMenu; @@ -159,7 +159,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() ); // Load template - $OUT .= loadTemplate('admin_menu_status_row', true, $content); + $OUT .= loadTemplate('admin_menu_status_row', TRUE, $content); } else { // Entry not found? $content = array( @@ -167,7 +167,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() ); // Load template - $OUT .= loadTemplate('admin_menu_404_row', true, $content); + $OUT .= loadTemplate('admin_menu_404_row', TRUE, $content); } SQL_FREERESULT($result); } // END - if @@ -179,7 +179,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['count'] = $count; // Load template - loadTemplate('admin_member_menu_status', false, $content); + loadTemplate('admin_member_menu_status', FALSE, $content); } elseif ((isFormSent()) && (!isDemoModeActive())) { // Process menu editing form adminProcessMenuEditForm('member', $subMenu); @@ -220,7 +220,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['do'] = 'mem'; // Load row template and switch color - $OUT .= loadTemplate('admin_menu_overview_row', true, $content); + $OUT .= loadTemplate('admin_menu_overview_row', TRUE, $content); } // END - while // Free memory @@ -231,7 +231,7 @@ if ((isFormSent('edit')) && (ifPostContainsSelections()) && (!isDemoModeActive() $content['sub'] = $subMenu; // Load main template - loadTemplate('admin_member_menu_overview', false, $content); + loadTemplate('admin_member_menu_overview', FALSE, $content); } else { // Menu entries are missing... (???) displayMessage('{--ADMIN_NO_MENUS_FOUND--}'); diff --git a/inc/modules/admin/what-optimize.php b/inc/modules/admin/what-optimize.php index 16c12d8826..575825702c 100644 --- a/inc/modules/admin/what-optimize.php +++ b/inc/modules/admin/what-optimize.php @@ -79,7 +79,7 @@ foreach ($content['tables'] as $row_array) { ); // Load row template and switch color - $OUT .= loadTemplate('admin_optimize_row', true, $row); + $OUT .= loadTemplate('admin_optimize_row', TRUE, $row); } // END - foreach // Remember rows @@ -89,7 +89,7 @@ $content['rows'] = $OUT; $content['now_optimized'] = $gain_tabs; // Load main template -loadTemplate('admin_optimize', false, $content); +loadTemplate('admin_optimize', FALSE, $content); // [EOF] ?> diff --git a/inc/modules/admin/what-payments.php b/inc/modules/admin/what-payments.php index 8723a902c2..0f11f5fed2 100644 --- a/inc/modules/admin/what-payments.php +++ b/inc/modules/admin/what-payments.php @@ -51,7 +51,7 @@ if (isFormSent()) { switch (getRequestElement('do')) { case 'add': addSql("INSERT INTO `{?_MYSQL_PREFIX?}_payments` (`time`, `payment`, `mail_title`, `price`) VALUES ('".postRequestElement('t_wait')."','".postRequestElement('payment')."','".postRequestElement('title')."','".postRequestElement('price')."')"); - if (countSumTotalData(postRequestElement('t_wait'), 'payments', 'id', 'time', true) == 1) { + if (countSumTotalData(postRequestElement('t_wait'), 'payments', 'id', 'time', TRUE) == 1) { // Re-init the array here initSqls(); } // END - if @@ -99,11 +99,11 @@ if (isFormSent()) { SQL_FREERESULT($result); // Load row template and switch colors - $OUT .= loadTemplate('admin_delete_payments_row', true, $content); + $OUT .= loadTemplate('admin_delete_payments_row', TRUE, $content); } // END - foreach // Load main template - loadTemplate('admin_delete_payments', false, $OUT); + loadTemplate('admin_delete_payments', FALSE, $OUT); } elseif ((isFormSent('edit')) && (ifPostContainsSelections())) { // Edit entries $OUT = ''; @@ -116,11 +116,11 @@ if (isFormSent()) { SQL_FREERESULT($result); // Load row template and switch colors - $OUT .= loadTemplate('admin_edit_payments_row', true, $content); + $OUT .= loadTemplate('admin_edit_payments_row', TRUE, $content); } // END - foreach // Load main template - loadTemplate('admin_edit_payments', false, $OUT); + loadTemplate('admin_edit_payments', FALSE, $OUT); } else { // Referral levels $result = SQL_QUERY("SELECT `id`, `time`, `payment`, `mail_title`, `price` FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `time` ASC", __FILE__, __LINE__); @@ -131,14 +131,14 @@ if (isFormSent()) { // List already existing categories for editing while ($content = SQL_FETCHARRAY($result)) { // Load row template and switch colors - $OUT .= loadTemplate('admin_list_payments_row', true, $content); + $OUT .= loadTemplate('admin_list_payments_row', TRUE, $content); } // END - switch // Free memory SQL_FREERESULT($result); // Load main template - loadTemplate('admin_list_payments', false, $OUT); + loadTemplate('admin_list_payments', FALSE, $OUT); } // END - if // Form for adding new referral levels diff --git a/inc/modules/admin/what-refbanner.php b/inc/modules/admin/what-refbanner.php index 1f48c21fca..0982ed3ef8 100644 --- a/inc/modules/admin/what-refbanner.php +++ b/inc/modules/admin/what-refbanner.php @@ -114,11 +114,11 @@ VALUES ('%s','%s','%s')", $content['visible'] = addSelectionBox('yn', $content['visible'], 'visible'); // Load row template and switch color - $OUT .= loadTemplate('admin_edit_refbanner_row', true, $content); + $OUT .= loadTemplate('admin_edit_refbanner_row', TRUE, $content); } // END - foreach // Load main template - loadTemplate('admin_edit_refbanner', false, $OUT); + loadTemplate('admin_edit_refbanner', FALSE, $OUT); } else { if ((ifPostContainsSelections()) && (isFormSent('delete'))) { // Delete banner @@ -137,14 +137,14 @@ VALUES ('%s','%s','%s')", $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { // Load row template and switch color - $OUT .= loadTemplate('admin_list_refbanner_row', true, $content); + $OUT .= loadTemplate('admin_list_refbanner_row', TRUE, $content); } // END - while // Free memory SQL_FREERESULT($result); // Load main template - loadTemplate('admin_list_refbanner', false, $OUT); + loadTemplate('admin_list_refbanner', FALSE, $OUT); } // END - if // Form for adding new referral levels diff --git a/inc/modules/admin/what-repair_lang.php b/inc/modules/admin/what-repair_lang.php index 176829cb46..def5592964 100644 --- a/inc/modules/admin/what-repair_lang.php +++ b/inc/modules/admin/what-repair_lang.php @@ -44,7 +44,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { addYouAreHereLink('admin', __FILE__); // Get a list with current language files -$langFiles = getArrayFromDirectory('inc/language/', '', false, false, array('_de.php'), '.php', '@(\.|\.\.)$@', true, getCurrentLanguage()); +$langFiles = getArrayFromDirectory('inc/language/', '', FALSE, FALSE, array('_de.php'), '.php', '@(\.|\.\.)$@', TRUE, getCurrentLanguage()); // By default nothing is checked, which is isn't right... $OUT = ''; @@ -83,7 +83,7 @@ foreach ($validLanguages as $lang) { ); // Compares, all fine - $OUT .= loadTemplate('admin_repair_lang_row_compares', true, $content); + $OUT .= loadTemplate('admin_repair_lang_row_compares', TRUE, $content); } else { // Generate difference output only if count is smaller/equals 100 entries $diffContent = '