From: Roland Häder Date: Sun, 7 Oct 2012 11:41:02 +0000 (+0000) Subject: Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of anoth... X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=8fad776382e63b3f73f8dbe289f229d79cfc2c22 Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of another SELECT query --- diff --git a/ajax.php b/ajax.php index 8ef804fb8f..3dcd835c8d 100644 --- a/ajax.php +++ b/ajax.php @@ -72,7 +72,7 @@ if ((getHttpRequestMethod() == 'POST') && (isPostRequestElementSet('level'))) { // Process the request processAjaxRequest(); - // Do we have an error? ('200 OK' is fine) + // Is there an error? ('200 OK' is fine) if ((getHttpStatus() != '200 OK') && (getHttpStatus() != '404 NOT FOUND')) { // The process was handled but didn't work reportBug(__FUNCTION__, __LINE__, 'AJAX request is valid but does not do anything.'); diff --git a/inc/config-functions.php b/inc/config-functions.php index 87c8e28d8b..4b597a204d 100644 --- a/inc/config-functions.php +++ b/inc/config-functions.php @@ -206,13 +206,13 @@ function updateOldConfigFile () { // Default comment $comment = str_replace('_', '-', $new); - // Do we have a special comment? + // Is there a special comment? if (isset($comments[$new])) { // Then use it $comment = $comments[$new]; } // END - if - // Do we need to make $new lowercase? + // Does $new needs to be lower-case? $oldNew = $new; if (in_array($new, $lowerCase)) { // Then do so... :) @@ -283,7 +283,7 @@ function updateConfiguration ($entries, $values, $updateMode = '', $config = '0' // Default is empty SQL $SQL = ''; - // Do we have multiple entries? + // Is there multiple entries? if (is_array($entries)) { // Walk through all foreach ($entries as $idx => $entry) { diff --git a/inc/daily/daily_holiday.php b/inc/daily/daily_holiday.php index 23bf85b4e5..9fad7691ad 100644 --- a/inc/daily/daily_holiday.php +++ b/inc/daily/daily_holiday.php @@ -81,7 +81,7 @@ WHERE LIMIT 1", array(bigintval($content['userid'])), __FILE__, __LINE__); - // Do we have an entry? + // Is there an entry? if (SQL_NUMROWS($result_holiday) == 1) { // Okay, this user can be send away to holiday... $content = merge_array($content, SQL_FETCHARRAY($result_holiday)); diff --git a/inc/daily/daily_profile.php b/inc/daily/daily_profile.php index 7801f8e62d..97a34f5ab5 100644 --- a/inc/daily/daily_profile.php +++ b/inc/daily/daily_profile.php @@ -75,7 +75,7 @@ WHERE ORDER BY `userid` ASC", __FILE__, __LINE__); - // Do we have some notifications to sent? + // Are there some notifications to sent? if (!SQL_HASZERONUMS($result)) { // We need to send-out notifications... while ($content = SQL_FETCHARRAY($result)) { diff --git a/inc/db/lib-mysql3.php b/inc/db/lib-mysql3.php index 1da0f27c5a..c5f502723f 100644 --- a/inc/db/lib-mysql3.php +++ b/inc/db/lib-mysql3.php @@ -42,7 +42,7 @@ if (!defined('__SECURITY')) { // SQL queries function SQL_QUERY ($sqlString, $F, $L, $enableCodes = true) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$sqlString])) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Called: ' . $sqlString); @@ -305,7 +305,7 @@ function SQL_INSERTID () { // Escape a string for the database function SQL_ESCAPE ($str, $secureString = true, $strip = true) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['sql_escapes']['' . $str . ''])) { // Prepare the string here $str = SQL_PREPARE_SQL_STRING($str); @@ -423,7 +423,7 @@ function SQL_ALTER_TABLE ($sql, $F, $L, $enableCodes = true) { // Debug log //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'columnName=' . $columnName . ',idx=' . $idx . ',sql=' . $sql . ',hasZeroNums=' . intval(ifSqlColumnExists($tableName, $columnName))); - // Do we have no entry on ADD or an entry on DROP/CHANGE? + // Is there no entry on ADD or an entry on DROP/CHANGE? 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); @@ -531,7 +531,7 @@ function SQL_SET_LINK ($link) { // Checks if the link is up function SQL_IS_LINK_UP () { - // Do we have cached this? + // Is there cached this? if (!isset($GLOBALS['is_sql_link_up'])) { // Determine it $GLOBALS['is_sql_link_up'] = is_resource(SQL_GET_LINK()); @@ -578,7 +578,7 @@ function SQL_ERROR ($file, $line, $message) { // Remember plain error in last_sql_error $GLOBALS['last_sql_error'] = mysql_error(); - // Do we have installation phase? + // Is there installation phase? if (isInstallationPhase()) { /* * In installation phase, we don't want SQL errors abort e.g. connection @@ -594,7 +594,7 @@ function SQL_ERROR ($file, $line, $message) { // Check if there is a SQL table created function ifSqlTableExists ($tableName) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ' - ENTERED!'); - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$tableName])) { // Check if the table is there $result = SQL_QUERY_ESC("SHOW TABLES FROM `{?__DB_NAME?}` WHERE `Tables_in_{?__DB_NAME?}`='{?_MYSQL_PREFIX?}_%s'", @@ -613,7 +613,7 @@ function ifSqlTableExists ($tableName) { // Is a table column there? function ifSqlColumnExists ($tableName, $columnName) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',columnName=' . $columnName . ' - ENTERED!'); - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$tableName][$columnName])) { // And column name as well $columnName = str_replace('`', '', $columnName); @@ -641,7 +641,7 @@ function ifSqlColumnExists ($tableName, $columnName) { // Checks depending on the mode if the index is there function isSqlTableIndexFound ($tableName, $keyName) { //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'tableName=' . $tableName . ',columnName=' . $keyName . ' - ENTERED!'); - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$tableName][$keyName])) { // Show indexes $result = SQL_QUERY_ESC("SHOW INDEX FROM `%s`", array($tableName), __FUNCTION__, __LINE__); @@ -686,7 +686,7 @@ function getArrayFromSupportedSqlEngines ($support = 'YES') { // This also worked, now we need to check if the selected database type is supported $result = SQL_QUERY('SHOW ENGINES', __FUNCTION__, __LINE__); - // Do we have entries? (Bad if not) + // Are there entries? (Bad if not) if (SQL_NUMROWS($result) > 0) { // Load all and check for active entries while ($content = SQL_FETCHARRAY($result)) { diff --git a/inc/expression-functions.php b/inc/expression-functions.php index 92e1757623..f8e823d9bc 100644 --- a/inc/expression-functions.php +++ b/inc/expression-functions.php @@ -53,7 +53,7 @@ function isExpressionFunctionAvaiable ($data) { // Get the enty we need and trim it $entry = trim($data['matches'][4][$data['key']]); - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['expression_function_available'][$entry])) { // Init function name $functionName = 'get'; @@ -108,7 +108,7 @@ function doExpressionCode ($data) { // Expression call-back function for URLs function doExpressionUrl ($data) { - // Do we have JS-mode? + // Is there JS-mode? if ($data['callback'] == 'js') { // Switch to it $data['output_mode'] = '1'; @@ -169,7 +169,7 @@ function doExpressionExt ($data) { // Expression call-back function for getting configuration data // @TODO FILTER_COMPILE_CONFIG does not handle call-back functions so we handle it here again function doExpressionConfig ($data) { - // Do we have a special expression function for it? + // Is there a special expression function for it? if (isExpressionFunctionAvaiable($data)) { // Then use it $replacer = '{DQUOTE} . ' . $data['callback'] . '(' . getExpressionFunction($data) . '()) . {DQUOTE}'; @@ -193,7 +193,7 @@ function doExpressionPipe ($data) { // We need callback and extra_func: callback is really the call-back function, extra_func is our value $replacer = $data['extra_func']; - // Do we have a call-back? Should always be there! + // Is there a call-back? Should always be there! if (!empty($data['callback'])) { //* DEBUG: */ if ($data['callback'] == 'getMemberId') die('
'.encodeEntities(print_r($data, true)).'
'); // If the value is empty, we don't add it diff --git a/inc/extensions-functions.php b/inc/extensions-functions.php index acd01be780..93e1fdf84a 100644 --- a/inc/extensions-functions.php +++ b/inc/extensions-functions.php @@ -125,7 +125,7 @@ function loadExtension ($ext_name, $ext_mode, $ext_ver = '0.0.0', $isDryRun = fa loadLanguageFile($ext_name); } // END - if - // Do we have cache? + // Is there cache? if (isExtensionFunctionFileReadable($ext_name)) { // Not yet loaded? if ((($GLOBALS['cache_array']['extension']['ext_func'][$ext_name] == 'Y') || (!isset($GLOBALS['cache_array']['extension']['ext_func'][$ext_name]))) && (!isExtensionLibraryLoaded($ext_name))) { @@ -474,7 +474,7 @@ function doExtensionSqls ($ext_id, $load_mode) { // Debug message //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'SQLs::count=' . countSqls()); - // Do we have entries? + // Are there entries? if (isSqlsValid()) { // Run SQL commands... runFilterChain('run_sqls'); @@ -529,7 +529,7 @@ function isExtensionInstalled ($ext_name) { // Look in database $ext_id = getExtensionId($ext_name); - // Do we have a record? + // Is there a record? $isInstalled = ($ext_id > 0); // Log debug message @@ -793,9 +793,9 @@ function addExtensionVerboseSqlTable ($title = '{--ADMIN_SQLS_EXECUTED_ON_REMOVA // Init variables $OUT = ''; - // Do we have queries? + // Is there queries? if (isVerboseSqlEnabled()) { - // Do we have entries? + // Are there entries? if (countExtensionSqls() > 0) { // Init counter $idx = 0; @@ -883,7 +883,7 @@ function getExtensionId ($ext_name) { // Init id number $data['ext_id'] = '0'; - // Do we have cache? + // Is there cache? if (isset($GLOBALS['cache_array']['extension']['ext_id'][$ext_name])) { // Load from cache $data['ext_id'] = $GLOBALS['cache_array']['extension']['ext_id'][$ext_name]; @@ -914,7 +914,7 @@ function getExtensionId ($ext_name) { // Determines whether the given extension name is valid function isExtensionNameValid ($ext_name) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['ext_name_valid'][$ext_name])) { // Generate include file name $INC = sprintf("inc/extensions/ext-%s.php", $ext_name); @@ -1655,7 +1655,7 @@ function FILTER_INIT_EXTENSIONS () { // Init notification pool initIncludePool('notify'); - // Do we have some entries? + // Are there some entries? if (isset($GLOBALS['cache_array']['extension']['ext_name'])) { // Load all found extensions if found //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'CACHE - START!'); @@ -1746,7 +1746,7 @@ function removeExtensionFromArray () { // "Getter" for 'extension has a CSS file' (with same name, of course) function getExtensionHasCss () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][getCurrentExtensionName()][getCurrentTheme()])) { // Construct FQFN for check $FQFN = sprintf("%stheme/%s/css/%s.css", @@ -1765,7 +1765,7 @@ function getExtensionHasCss () { // Checks whether the given extension has a language file function ifExtensionHasLanguageFile ($ext_name) { - // Do we have cache? + // Is there cache? if (isset($GLOBALS['cache_array']['extension']['ext_lang'][$ext_name])) { // Count cache hits incrementStatsEntry('cache_hits'); @@ -2112,7 +2112,7 @@ function isExtensionProductive ($ext_name = '') { } // END - if //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - ENTERED!'); - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$ext_name])) { // Load extension only if not yet loaded if (!isset($GLOBALS['ext_productive'][$ext_name])) { diff --git a/inc/filter-functions.php b/inc/filter-functions.php index 58d9a96513..66d04ec8bb 100644 --- a/inc/filter-functions.php +++ b/inc/filter-functions.php @@ -364,7 +364,7 @@ function loadExtensionFilters ($ext_name) { // Debug message //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'ext_name=' . $ext_name . ' - ENTERED!'); - // Do we have cache entry? + // Is there a cache entry? if (!isset($GLOBALS[__FUNCTION__][$ext_name])) { // Default is not found $GLOBALS[__FUNCTION__][$ext_name] = false; diff --git a/inc/filter/earning_filter.php b/inc/filter/earning_filter.php index 4f290e70db..0b4bcace85 100644 --- a/inc/filter/earning_filter.php +++ b/inc/filter/earning_filter.php @@ -76,7 +76,7 @@ ORDER BY getMemberId() ), __FUNCTION__, __LINE__); - // Do we have entries left? + // Are there entries left? if (!SQL_HASZERONUMS($result)) { // Load all names while ($content = SQL_FETCHARRAY($result)) { diff --git a/inc/filters.php b/inc/filters.php index 3437775a70..bd3d3fabbc 100644 --- a/inc/filters.php +++ b/inc/filters.php @@ -271,7 +271,7 @@ function FILTER_RUN_SQLS ($filterData) { // Is there still a query left? if (!empty($sql)) { - // Do we have an "ALTER TABLE" command? + // Is there an "ALTER TABLE" command? if (substr(strtolower($sql), 0, 11) == 'alter table') { // Analyse the alteration command //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'Alterting table: ' . $sql . ',enable_codes=' . intval($filterData['enable_codes'])); @@ -380,7 +380,7 @@ function FILTER_REMOVE_UPDATES ($filterData) { // Simply remove it unsetExtensionSqls(); - // Do we need to remove update depency? + // Are there update dependencies to remove? if (countExtensionUpdateDependencies() > 0) { // Then find all updates we shall no longer execute foreach (getExtensionUpdateDependencies() as $id => $ext_name) { @@ -434,7 +434,7 @@ function FILTER_COMPILE_CONFIG ($code, $compiled = false) { // Save the uncompiled code $uncompiled = $code; - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['compiled_config'][$code])) { // Compile {?some_var?} to getConfig('some_var') preg_match_all('/\{\?(([a-zA-Z0-9-_]+)*)\?\}/', $code, $matches); @@ -443,7 +443,7 @@ function FILTER_COMPILE_CONFIG ($code, $compiled = false) { if ((count($matches) > 0) && (count($matches[0]) > 0)) { // Replace all matches foreach ($matches[0] as $key => $match) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['compile_config'][$matches[1][$key]])) { // Is the config valid? if (isConfigEntrySet($matches[1][$key])) { @@ -559,7 +559,7 @@ function FILTER_COMPILE_EXPRESSION_CODE ($filterData) { } // END - foreach } // END - if - // Do we have non-HTML mode? + // Is there non-HTML mode? if (!isHtmlOutputMode()) { $filterData = decodeEntities($filterData); } // END - if @@ -877,7 +877,7 @@ function FILTER_COUNT_MODULE () { // Handles fatal errors function FILTER_HANDLE_FATAL_ERRORS () { - // Do we have errors to handle and right output mode? + // Is there errors to handle and right output mode? if ((!ifFatalErrorsDetected()) || (!isHtmlOutputMode())) { // Abort executing here return false; @@ -990,7 +990,7 @@ function FILTER_FLUSH_TEMPLATE_CACHE () { return; } // END - if - // Do we have cached eval() data? + // Is there cached eval() data? if ((isset($GLOBALS['template_eval'])) && (count($GLOBALS['template_eval']) > 0)) { // Now flush all foreach ($GLOBALS['template_eval'] as $template => $eval) { diff --git a/inc/fix_filters.php b/inc/fix_filters.php index 9f53a5a65b..f4f95a55d6 100644 --- a/inc/fix_filters.php +++ b/inc/fix_filters.php @@ -50,14 +50,14 @@ ORDER BY `filter_name` ASC, `filter_function` ASC', __FILE__, __LINE__); -// Do we have entries? (we should have!) +// Are there entries? (there should be!) 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']))); - // Do we have more than one entry? + // Is there more than one entry? if ($count > 1) { // Then clean them up, except one addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_filters` WHERE `filter_name`='%s' AND `filter_function`='%s' LIMIT %s", diff --git a/inc/fix_refsystem.php b/inc/fix_refsystem.php index 3c9f1eec1d..bf874dbc2f 100644 --- a/inc/fix_refsystem.php +++ b/inc/fix_refsystem.php @@ -40,7 +40,7 @@ if (!defined('__SECURITY')) { die(); } // END - if -// Sanity-check: Do we have ref level 0? If so, this must be fixed to NULL and `level` must be increased by one +// Sanity-check: Is there ref level 0? If so, this must be fixed to NULL and `level` must be increased by one $result = SQL_QUERY('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refsystem` WHERE `level`=0', __FILE__, __LINE__); if (!SQL_HASZERONUMS($result)) { // Remove index temporaly @@ -73,7 +73,7 @@ WHERE ORDER BY `userid` ASC', __FILE__, __LINE__); -// Do we have entries? +// Are there entries? if (!SQL_HASZERONUMS($result_direct)) { // When 'walk' through all users while ($content = SQL_FETCHARRAY($result_direct)) { diff --git a/inc/fix_user_points.php b/inc/fix_user_points.php index a485c21d7f..f720907ff1 100644 --- a/inc/fix_user_points.php +++ b/inc/fix_user_points.php @@ -54,7 +54,7 @@ WHERE ORDER BY `userid` ASC', __FILE__, __LINE__); -// Do we have entries? (we should have!) +// Are there entries? (there should be!) if (!SQL_HASZERONUMS($result)) { // Load row by row while ($row = SQL_FETCHARRAY($result)) { diff --git a/inc/functions.php b/inc/functions.php index 780919b4f6..9305df0bc2 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -72,7 +72,7 @@ function getTotalFatalErrors () { // Init count $count = '0'; - // Do we have at least the first entry? + // Is there at least the first entry? if (!empty($GLOBALS['fatal_messages'][0])) { // Get total count $count = count($GLOBALS['fatal_messages']); @@ -419,7 +419,7 @@ function redirectToUrl ($url, $allowSpider = true) { // Default 'rel' value is external, nofollow is evil from Google and hurts the Internet $rel = ' rel="external"'; - // Do we have internal or external URL? + // Is there internal or external URL? if (substr($url, 0, strlen(getUrl())) == getUrl()) { // Own (=internal) URL $rel = ''; @@ -594,7 +594,7 @@ function createEpocheTimeFromSelections ($prefix, $postData) { // Initial return value $ret = '0'; - // Do we have a leap year? + // Is there a leap year? $SWITCH = '0'; $TEST = getYear() / 4; $M1 = getMonth(); @@ -642,7 +642,7 @@ function createFancyTime ($stamp) { } // END - if } // END - foreach - // Do we have something there? + // Is something there? if (strlen($ret) > 0) { // Remove leading commata and space $ret = substr($ret, 2); @@ -722,7 +722,7 @@ function generateHash ($plainText, $salt = '', $hash = true) { } } // END - if - // Do we miss an arry element here? + // Is an arry element missing here? if (!isConfigEntrySet('file_hash')) { // Stop here reportBug(__FUNCTION__, __LINE__, 'Missing file_hash in ' . __FUNCTION__ . '.'); @@ -933,7 +933,7 @@ function getCurrentTheme () { // The default theme is 'default'... ;-) $ret = 'default'; - // Do we have ext-theme installed and active or is 'theme' in URL or POST data? + // Is there ext-theme installed and active or is 'theme' in URL or POST data? if (isExtensionActive('theme')) { // Call inner method $ret = getActualTheme(); @@ -1289,11 +1289,11 @@ function handleExtraValues ($filterFunction, $value, $extraValue) { // Default is the value itself $ret = $value; - // Do we have a special filter function? + // Is there a special filter function? if (!empty($filterFunction)) { // Does the filter function exist? if (function_exists($filterFunction)) { - // Do we have extra parameters here? + // Is there extra parameters here? if (!empty($extraValue)) { // Put both parameters in one new array by default $args = array($value, $extraValue); @@ -1754,7 +1754,7 @@ function mapModuleToTable ($moduleName) { // Add SQL debug data to array for later output function addSqlToDebug ($result, $sqlString, $timing, $F, $L) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['debug_sql_available'])) { // Check it and cache it in $GLOBALS $GLOBALS['debug_sql_available'] = ((isConfigurationLoaded()) && (isDisplayDebugSqlEnabled())); @@ -1857,13 +1857,13 @@ function getModuleFromFileName ($file, $accessLevel) { // Encodes an URL for adding session id, etc. function encodeUrl ($url, $outputMode = '0') { - // Do we have already have a PHPSESSID inside or view.php is called? Then abort here + // Is there already have a PHPSESSID inside or view.php is called? Then abort here if ((isInStringIgnoreCase(session_name(), $url)) || (isRawOutputMode())) { // Raw output mode detected or session_name() found in URL return $url; } // END - if - // Do we have a valid session? + // Is there a valid session? if (((!isset($GLOBALS['valid_session'])) || ($GLOBALS['valid_session'] === false) || (!isset($_COOKIE[session_name()]))) && (isSpider() === false)) { // Determine right separator $separator = '&'; @@ -1884,7 +1884,7 @@ function encodeUrl ($url, $outputMode = '0') { $url = '{?URL?}/' . $url; } // END - if - // Do we have to decode entities? + // Is there to decode entities? if ((!isHtmlOutputMode()) || ($outputMode != '0')) { // Decode them for e.g. JavaScript parts $url = decodeEntities($url); @@ -2008,7 +2008,7 @@ function convertNullToZero ($number) { // Capitalizes a string with underscores, e.g.: some_foo_string will become SomeFooString // Note: This function is cached function capitalizeUnderscoreString ($str) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$str])) { // Init target string $capitalized = ''; @@ -2067,7 +2067,7 @@ function generateAdminMailLinks ($mailType, $mailId) { bigintval($mailId) ), __FILE__, __LINE__); - // Do we have one entry there? + // Is there one entry there? if (SQL_NUMROWS($result) == 1) { // Load the entry $content = SQL_FETCHARRAY($result); @@ -2163,7 +2163,7 @@ function getArrayKeysFromSubStrArray ($heystack, $needles, $offset = 0) { // Now check all entries foreach ($needles as $key => $needle) { - // Do we have found a partial string? + // Is there found a partial string? //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'heystack='.$heystack.',key='.$key.',needle='.$needle.',offset='.$offset); if (strpos($heystack, $needle, $offset) !== false) { // Add the found key @@ -2222,7 +2222,7 @@ function convertStringToBoolean ($str) { // Debug message (to measure how often this function is called) //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'str=' . $str); - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$str])) { // Trim it lower-case for validation $strTrimmed = trim(strtolower($str)); @@ -2255,7 +2255,7 @@ function makeParseableVariable ($varString) { reportBug(__FUNCTION__, __LINE__, 'varString=' . $varString . ' - No dollar sign detected, will not parse it.'); } // END - if - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$varString])) { // Snap them in, if [,] are there $GLOBALS[__FUNCTION__][$varString] = str_replace(array('[', ']'), array("['", "']"), $varString); diff --git a/inc/http-functions.php b/inc/http-functions.php index c8cdf7acf3..5715c6edd0 100644 --- a/inc/http-functions.php +++ b/inc/http-functions.php @@ -73,7 +73,7 @@ function sendHttpHeaders () { // Checks whether the URL is full-qualified (http[s]:// + hostname [+ request data]) function isFullQualifiedUrl ($url) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$url])) { // Determine it $GLOBALS[__FUNCTION__][$url] = ((substr($url, 0, 7) == 'http://') || (substr($url, 0, 8) == 'https://')); @@ -105,7 +105,7 @@ function generateGetUrlFromBaseUrlData ($baseUrl, $requestData = array()) { // There should be data, else we don't need to extend $baseUrl with $body if (!empty($body)) { - // Do we have a question-mark in the script? + // Is there a question-mark in the script? if (!isInString('?', $baseUrl)) { // No, so first char must be question mark $body = '?' . $body; @@ -176,7 +176,7 @@ function sendHeadRequest ($baseUrl, $requestData = array()) { // Generate full GET URL $getUrl = generateGetUrlFromBaseUrlData($baseUrl, $requestData); - // Do we have http[s]:// in front of the URL? + // Is there http[s]:// in front of the URL? if (isFullQualifiedUrl($getUrl)) { // Remove http[s]:// from URL $getUrl = removeHttpHostNameFromUrl($getUrl); @@ -215,7 +215,7 @@ function sendGetRequest ($baseUrl, $requestData = array(), $removeHeader = false // Generate full GET URL $getUrl = generateGetUrlFromBaseUrlData($baseUrl, $requestData); - // Do we have http[s]:// in front of the URL? + // Is there http[s]:// in front of the URL? if (isFullQualifiedUrl($getUrl)) { // Remove http[s]:// from url $getUrl = removeHttpHostNameFromUrl($getUrl); @@ -260,7 +260,7 @@ function sendPostRequest ($baseUrl, $requestData = array(), $removeHeader = fals // Copy baseUrl to getUrl $getUrl = $baseUrl; - // Do we have http[s]:// in front of the URL? + // Is there http[s]:// in front of the URL? if (isFullQualifiedUrl($getUrl)) { // Remove http[s]:// from url $getUrl = removeHttpHostNameFromUrl($getUrl); @@ -371,7 +371,7 @@ function sendRawRequest ($host, $request) { return $response; } - // Do we use proxy? + // Shall proxy be used? if (isProxyUsed() === true) { // Setup proxy tunnel $response = setupProxyTunnel($host, $proxyHost, $port, $resource); diff --git a/inc/inc-functions.php b/inc/inc-functions.php index 7b33f37322..13ce10c5fd 100644 --- a/inc/inc-functions.php +++ b/inc/inc-functions.php @@ -117,7 +117,7 @@ function loadIncludePool ($pool) { // Loads an include file and logs any missing files for debug purposes function loadInclude ($inc) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['inc_loaded'][$inc])) { // Is the include file there? if (!isIncludeReadable($inc)) { @@ -147,7 +147,7 @@ function loadIncludeOnce ($inc) { // Checks whether an include file (non-FQFN better) is readable function isIncludeReadable ($inc) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['inc_readable'][$inc])) { // Construct FQFN $FQFN = getPath() . $inc; diff --git a/inc/install-functions.php b/inc/install-functions.php index 40a6ab6280..8b9bb808ba 100644 --- a/inc/install-functions.php +++ b/inc/install-functions.php @@ -274,7 +274,7 @@ function doInstallerPostCheck ($currentTab, &$saveStatus) { $saveStatus['status'] = 'failed'; $saveStatus['message'] = '{%message,INSTALLER_POST_CHECK_' . strtoupper($currentTab) . '_FAILED=' . $GLOBALS['installer_post_error'][$currentTab] . '%}'; - // Do we have failed fields? + // Is there failed fields? if (count($GLOBALS['installer_failed_fields'][$currentTab]) > 0) { // Then merge both $saveStatus['failed_fields'] = merge_array($saveStatus['failed_fields'], $GLOBALS['installer_failed_fields'][$currentTab]); @@ -372,7 +372,7 @@ function isInstallerWebmasterValid ($value) { // Is it a valid email address? (isEmailValid($value)) || - // Or do we have 'localhost/127.0.0.1' as hostname? Then don't check email address (e.g. you@localhost) + // Or is there 'localhost/127.0.0.1' as hostname? Then don't check email address (e.g. you@localhost) (in_array(detectServerName(), array('localhost', '127.0.0.1'))) ); diff --git a/inc/language-functions.php b/inc/language-functions.php index 3d716d966f..5e393b7225 100644 --- a/inc/language-functions.php +++ b/inc/language-functions.php @@ -118,7 +118,7 @@ function isCurrentLanguageSet () { // "Getter" for language function getLanguage () { - // Do we have cache? + // Is there cache? if (!isCurrentLanguageSet()) { // Default is 'de'. DO NOT CHANGE THIS!!! $ret = 'de'; @@ -164,7 +164,7 @@ function setLanguage ($lang) { // Checks whether a language file is there for optional extension function isLanguageIncludeReadable ($ext_name = 'none') { - // Do we have array element? + // Is there array element? if (!isset($GLOBALS['lang_inc'][$ext_name])) { // Generate filename if ($ext_name == 'none') { @@ -200,7 +200,7 @@ function loadLanguageFile ($ext_name = 'none') { setLanguage($currLanguage); } // END - if - // Do we have the language file NOT? + // Is there the language file NOT? if (!isLanguageIncludeReadable($ext_name)) { // Switch to default (DO NOT CHANGE!!!) setLanguage('de'); @@ -303,7 +303,7 @@ function ifLanguageFilesCompares ($source, $target, $targetLanguage) { // Set target language setCurrentLanguage($targetLanguage); - // Do we have an array? + // Is there an array? if (!isset($GLOBALS['messages'][$targetLanguage])) { // Then create it to avoid notice $GLOBALS['messages'][$targetLanguage] = array(); diff --git a/inc/libs/admins_functions.php b/inc/libs/admins_functions.php index df2023fc3c..c1851a0cfe 100644 --- a/inc/libs/admins_functions.php +++ b/inc/libs/admins_functions.php @@ -418,7 +418,7 @@ function adminsDeleteAdminAccount ($postData) { $result = SQL_QUERY_ESC("SELECT `login`,`email`,`default_acl` AS `access_mode`,`la_mode` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1", array($id), __FUNCTION__, __LINE__); - // Do we have an entry? + // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Entry found, so load data $content = SQL_FETCHARRAY($result); @@ -676,7 +676,7 @@ function getAdminLoginFailures ($adminId) { $result = SQL_QUERY_ESC("SELECT `login_failures` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1", array($adminId), __FUNCTION__, __LINE__); - // Do we have an entry? + // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Get it $data = SQL_FETCHARRAY($result); @@ -712,7 +712,7 @@ function getAdminLastFailure ($adminId) { $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`last_failure`) AS `last_failure` FROM `{?_MYSQL_PREFIX?}_admins` WHERE `id`=%s LIMIT 1", array($adminId), __FUNCTION__, __LINE__); - // Do we have an entry? + // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Get it $data = SQL_FETCHARRAY($result); diff --git a/inc/libs/autopurge_functions.php b/inc/libs/autopurge_functions.php index fde4b07587..769099587e 100644 --- a/inc/libs/autopurge_functions.php +++ b/inc/libs/autopurge_functions.php @@ -59,7 +59,7 @@ function addPointsAutoPurge ($userid, $points) { // Checks whether auto-purging is enabled function isAutoPurgingActive () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = (getConfig('auto_purge_active') == 'Y'); @@ -71,7 +71,7 @@ function isAutoPurgingActive () { // Wrapper for 'autopurge_inactive function getAutopurgeInactive () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = (getConfig('autopurge_inactive') == 'Y'); @@ -83,7 +83,7 @@ function getAutopurgeInactive () { // Checks whether purging of inactive accounts is enabled function isAutopurgeInactiveEnabled () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = (getAutopurgeInactive() == 'Y'); diff --git a/inc/libs/beg_functions.php b/inc/libs/beg_functions.php index 120333bf97..149a96b5f4 100644 --- a/inc/libs/beg_functions.php +++ b/inc/libs/beg_functions.php @@ -94,7 +94,7 @@ function doTemplateOutputBegPoints ($templateName, $clear = false) { // "Getter" for beg_new_member_notify function getBegNewMemberNotify () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Get it $GLOBALS[__FUNCTION__] = getConfig('beg_new_member_notify'); @@ -106,7 +106,7 @@ function getBegNewMemberNotify () { // Checks whether beg_new_member_notify is enabled function isBegNewMemberNotifyEnabled () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = ((isExtensionInstalledAndNewer('beg', '0.2.7')) && (getBegNewMemberNotify() == 'Y')); @@ -118,7 +118,7 @@ function isBegNewMemberNotifyEnabled () { // "Getter" for beg_userid function getBegUserid () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Get it $GLOBALS[__FUNCTION__] = getConfig('beg_userid'); @@ -130,7 +130,7 @@ function getBegUserid () { // "Getter" for beg_timeout function getBegTimeout () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_timeout'); @@ -142,7 +142,7 @@ function getBegTimeout () { // "Getter" for beg_userid_timeout function getBegUseridTimeout () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_userid_timeout'); @@ -154,7 +154,7 @@ function getBegUseridTimeout () { // "Getter" for beg_ip_timeout function getBegIpTimeout () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_ip_timeout'); @@ -166,7 +166,7 @@ function getBegIpTimeout () { // "Getter" for beg_ranks function getBegRanks () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_ranks'); @@ -178,7 +178,7 @@ function getBegRanks () { // "Getter" for beg_points_max function getBegPointsMax () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_points_max'); @@ -190,7 +190,7 @@ function getBegPointsMax () { // "Getter" for beg_points function getBegPoints () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_points'); @@ -202,7 +202,7 @@ function getBegPoints () { // "Getter" for beg_notify_bonus function getBegNotifyBonus () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_notify_bonus'); @@ -214,7 +214,7 @@ function getBegNotifyBonus () { // "Getter" for beg_notify_wait function getBegNotifyWait () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_notify_wait'); @@ -226,7 +226,7 @@ function getBegNotifyWait () { // "Getter" for beg_pay_mode function getBegPayMode () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_pay_mode'); @@ -238,7 +238,7 @@ function getBegPayMode () { // "Getter" for beg_include_own function getBegIncludeOwn () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_include_own'); @@ -250,7 +250,7 @@ function getBegIncludeOwn () { // Checks whether beg_include_own is "Y" function isBegIncludeOwnEnabled () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = (getBegIncludeOwn() == 'Y'); @@ -262,7 +262,7 @@ function isBegIncludeOwnEnabled () { // "Getter" for beg_active function getBegActive () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_active'); @@ -274,7 +274,7 @@ function getBegActive () { // Checks whether beg_active is "Y" function isBegActiveEnabled () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = (getBegActive() == 'Y'); @@ -286,7 +286,7 @@ function isBegActiveEnabled () { // "Getter" for beg_rallye function getBegRallye () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_rallye'); @@ -298,7 +298,7 @@ function getBegRallye () { // Checks whether beg_rallye is "Y" function isBegRallyeEnabled () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = (getBegRallye() == 'Y'); @@ -310,7 +310,7 @@ function isBegRallyeEnabled () { // "Getter" for beg_rallye_enable_notify function getBegRallyeEnableNotify () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_rallye_enable_notify'); @@ -322,7 +322,7 @@ function getBegRallyeEnableNotify () { // Checks whether beg_rallye_enable_notify is "Y" function isBegRallyeEnableNotifyEnabled () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = (getBegRallyeEnableNotify() == 'Y'); @@ -334,7 +334,7 @@ function isBegRallyeEnableNotifyEnabled () { // "Getter" for beg_rallye_disable_notify function getBegRallyeDisableNotify () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('beg_rallye_disable_notify'); @@ -346,7 +346,7 @@ function getBegRallyeDisableNotify () { // Checks whether beg_rallye_disable_notify is "Y" function isBegRallyeDisableNotifyEnabled () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = (getBegRallyeDisableNotify() == 'Y'); diff --git a/inc/libs/birthday_functions.php b/inc/libs/birthday_functions.php index 9ea5bd2171..8480178783 100644 --- a/inc/libs/birthday_functions.php +++ b/inc/libs/birthday_functions.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { // Getter for birthday_points function getBirthdayPoints () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('birthday_points'); diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index eb23d16747..48d29cd3bc 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -281,7 +281,7 @@ function purgeExpiredTurboBonus() { // Determines whether the "bonus rallye" is active function isBonusRallyeActive () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['bonus_rallye_active'])) { // Just determine it $GLOBALS['bonus_rallye_active'] = (getConfig('bonus_active') == 'Y'); @@ -293,7 +293,7 @@ function isBonusRallyeActive () { // Determines whether the "bonus new_member_notify" is active function isBonusNewMemberNotifyEnabled () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['bonus_new_member_notify_active'])) { // Just determine it $GLOBALS['bonus_new_member_notify_active'] = (getConfig('bonus_new_member_notify') == 'Y'); @@ -305,7 +305,7 @@ function isBonusNewMemberNotifyEnabled () { // Getter for bonus_timeout function getBonusTimeout () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('bonus_timeout'); @@ -317,7 +317,7 @@ function getBonusTimeout () { // Getter for bonus_mode function getBonusMode () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('bonus_mode'); @@ -329,7 +329,7 @@ function getBonusMode () { // Getter for bonus_ranks function getBonusRanks () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('bonus_ranks'); @@ -341,7 +341,7 @@ function getBonusRanks () { // Getter for turbo_rates function getTurboRates () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('turbo_rates'); @@ -353,7 +353,7 @@ function getTurboRates () { // Getter for login_timeout function getLoginTimeout () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('login_timeout'); @@ -365,7 +365,7 @@ function getLoginTimeout () { // Getter for bonus_ref function getBonusRef () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('bonus_ref'); diff --git a/inc/libs/coupon_functions.php b/inc/libs/coupon_functions.php index 62bc2d4167..e061fb16c5 100644 --- a/inc/libs/coupon_functions.php +++ b/inc/libs/coupon_functions.php @@ -42,7 +42,7 @@ if (!defined('__SECURITY')) { // Wrapper function for 'coupon_default_points' function getCouponDefaultPoints () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Get config entry $GLOBALS[__FUNCTION__] = getConfig('coupon_default_points'); @@ -54,7 +54,7 @@ function getCouponDefaultPoints () { // Wrapper function for 'coupon_autopurge_time' function getCouponAutopurgeTime () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Get config entry $GLOBALS[__FUNCTION__] = getConfig('coupon_autopurge_time'); @@ -66,7 +66,7 @@ function getCouponAutopurgeTime () { // Wrapper function for 'coupon_userid' function getCouponUserid () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Get config entry $GLOBALS[__FUNCTION__] = getConfig('coupon_userid'); diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index fd1c866ba4..c29c36b3c4 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -168,7 +168,7 @@ function getDoublerUserid () { // "Getter" for doubler_timeout function getDoublerTimeout () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('doubler_timeout'); @@ -180,7 +180,7 @@ function getDoublerTimeout () { // "Getter" for doubler_send_mode function getDoublerSendMode () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('doubler_send_mode'); @@ -192,7 +192,7 @@ function getDoublerSendMode () { // "Getter" for doubler_ref function getDoublerRef () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('doubler_ref'); @@ -204,7 +204,7 @@ function getDoublerRef () { // "Getter" for doubler_points function getDoublerPoints () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('doubler_points'); @@ -216,7 +216,7 @@ function getDoublerPoints () { // "Getter" for doubler_min function getDoublerMin () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('doubler_min'); @@ -228,7 +228,7 @@ function getDoublerMin () { // "Getter" for doubler_max function getDoublerMax () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('doubler_max'); @@ -240,7 +240,7 @@ function getDoublerMax () { // "Getter" for doubler_counter function getDoublerCounter () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('doubler_counter'); @@ -252,7 +252,7 @@ function getDoublerCounter () { // "Getter" for doubler_charge function getDoublerCharge () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('doubler_charge'); diff --git a/inc/libs/forced_functions.php b/inc/libs/forced_functions.php index 6d22963d26..b7ee9a8d81 100644 --- a/inc/libs/forced_functions.php +++ b/inc/libs/forced_functions.php @@ -212,7 +212,7 @@ FROM ORDER BY `forced_ads_id` ASC', __FUNCTION__, __LINE__); - // Do we have at least one entry? + // Is there at least one entry? if (!SQL_HASZERONUMS($result)) { // Get all elements while ($content = SQL_FETCHARRAY($result)) { @@ -252,7 +252,7 @@ FROM ORDER BY `forced_costs_id` ASC", __FUNCTION__, __LINE__); - // Do we have at least one entry? + // Is there at least one entry? if (!SQL_HASZERONUMS($result)) { // Get all elements while ($content = SQL_FETCHARRAY($result)) { @@ -300,7 +300,7 @@ ORDER BY $status ), __FUNCTION__, __LINE__); - // Do we have at least one entry? + // Is there at least one entry? if (!SQL_HASZERONUMS($result)) { // Get all elements while ($content = SQL_FETCHARRAY($result)) { diff --git a/inc/libs/jackpot_functions.php b/inc/libs/jackpot_functions.php index 20be2a86b6..68f76b9c37 100644 --- a/inc/libs/jackpot_functions.php +++ b/inc/libs/jackpot_functions.php @@ -49,7 +49,7 @@ function getJackpotPoints () { // Read them $result = SQL_QUERY("SELECT `points` FROM `{?_MYSQL_PREFIX?}_jackpot` WHERE `ok`='ok' LIMIT 1", __FUNCTION__, __LINE__); - // Do we have an entry? + // Is there an entry? if (SQL_HASZERONUMS($result)) { // No, so create line SQL_QUERY("INSERT INTO `{?_MYSQL_PREFIX?}_jackpot` (`ok`,`points`) VALUES ('ok','0.00000')", __FUNCTION__, __LINE__); diff --git a/inc/libs/mediadata_functions.php b/inc/libs/mediadata_functions.php index 7139fbdf77..8f9d220305 100644 --- a/inc/libs/mediadata_functions.php +++ b/inc/libs/mediadata_functions.php @@ -46,7 +46,7 @@ function updateMediadataEntry ($keys_array, $mode, $value) { // Default is nothing added/updated $added = false; - // Do we have entries? + // Are there entries? if (is_array($keys_array) && ($value > 0)) { // Is an array so we can run it through foreach ($keys_array as $key) { @@ -107,7 +107,7 @@ function getMediadataEntry ($key) { $result = SQL_QUERY_ESC("SELECT `media_value` FROM `{?_MYSQL_PREFIX?}_mediadata` WHERE `media_key`='%s' LIMIT 1", array($key), __FUNCTION__, __LINE__); - // Do we have one? + // Is there one? if (SQL_NUMROWS($result) == 1) { // Load data list($value) = SQL_FETCHROW($result); diff --git a/inc/libs/network_functions.php b/inc/libs/network_functions.php index c6c5981b83..f89979e68d 100644 --- a/inc/libs/network_functions.php +++ b/inc/libs/network_functions.php @@ -82,7 +82,7 @@ function detectNetworkProcessForm () { // Handle a (maybe) sent form here function doNetworkHandleForm () { - // Do we have a form sent? + // Is there a form sent? if (countRequestPost() > 0) { // Detect sent POST form detectNetworkProcessForm(); @@ -242,7 +242,7 @@ WHERE LIMIT 1", array(bigintval($networkId)), __FUNCTION__, __LINE__); - // Do we have an entry? + // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Then get it $GLOBALS['network_data'][$networkId] = SQL_FETCHARRAY($result); @@ -305,7 +305,7 @@ WHERE LIMIT 1", array(bigintval($networkId)), __FUNCTION__, __LINE__); - // Do we have an entry? + // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Then get it $GLOBALS['network_data'][$networkId] = SQL_FETCHARRAY($result); @@ -351,7 +351,7 @@ WHERE LIMIT 1', array(bigintval($networkId)), __FUNCTION__, __LINE__); - // Do we have an entry? + // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Then get it $GLOBALS['network_type_data'][$networkId] = SQL_FETCHARRAY($result); @@ -390,7 +390,7 @@ WHERE LIMIT 1', array(bigintval($networkId)), __FUNCTION__, __LINE__); - // Do we have an entry? + // Is there an entry? if (SQL_NUMROWS($result) == 1) { // Then get it $networkRequestData = SQL_FETCHARRAY($result); @@ -471,7 +471,7 @@ WHERE ORDER BY `network_short_name` ASC", __FUNCTION__, __LINE__); - // Do we have entries? + // Are there entries? if (!SQL_HASZERONUMS($result)) { // List all entries $rows = array(); @@ -516,7 +516,7 @@ ORDER BY bigintval($networkId) ), __FUNCTION__, __LINE__); - // Do we have entries? + // Are there entries? if (!SQL_HASZERONUMS($result)) { // List all entries $rows = array(); @@ -564,7 +564,7 @@ ORDER BY d.`network_short_name` ASC, t.`network_type_handler` ASC", __FUNCTION__, __LINE__); - // Do we have entries? + // Are there entries? if (!SQL_HASZERONUMS($result)) { // List all entries $rows = array(); @@ -763,7 +763,7 @@ function generateNetworkTranslationOptions ($default = '') { // Generates an option list of request types function generateNetworkRequestTypeOptions ($default = '') { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$default])) { // Generate the list $GLOBALS[__FUNCTION__][$default] = generateOptions( @@ -786,7 +786,7 @@ function generateNetworkRequestTypeOptions ($default = '') { // Generates an option list of network_api_active function generateNetworkApiActiveOptions ($default = '') { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$default])) { // Generate the list $GLOBALS[__FUNCTION__][$default] = generateYesNoOptions($default); @@ -873,7 +873,7 @@ function translateNetworkVcheckParameterKey ($param) { // Translates API index function translateNetworkApiIndex ($index) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS['network_array_index'])) { // Get an array of all API array indexes $GLOBALS['network_array_index'] = array(); @@ -892,7 +892,7 @@ ON ORDER BY `sort` ASC', __FUNCTION__, __LINE__); - // Do we have entries? + // Are there entries? if (!SQL_HASZERONUMS($result)) { // Get all entries while ($row = SQL_FETCHARRAY($result)) { @@ -920,7 +920,7 @@ ORDER BY // Translates network API configuration status (see function isNetworkApiConfigured()) by given id function translateNetworkApiConfiguredStatusById ($networkId) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$networkId])) { // By default it is not configured $GLOBALS[__FUNCTION__][$networkId] = '{--ADMIN_NETWORK_API_NOT_CONFIGURED--}'; @@ -938,7 +938,7 @@ function translateNetworkApiConfiguredStatusById ($networkId) { // Checks if the given network is configured by looking its API configuration entry up function isNetworkApiConfigured ($networkId) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$networkId])) { // Check for an entry in network_api_config $GLOBALS[__FUNCTION__][$networkId] = (countSumTotalData( @@ -956,7 +956,7 @@ function isNetworkApiConfigured ($networkId) { // Checks whether the given network type handler is configured function isNetworkTypeHandlerConfigured ($networkId, $networkTypeId) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$networkId][$networkTypeId])) { // Determine it $GLOBALS[__FUNCTION__][$networkId][$networkTypeId] = (countSumTotalData( @@ -1013,7 +1013,7 @@ function doAdminNetworkProcessAddNetwork () { // Displays selected networks for editing function doAdminNetworkProcessHandleNetworks () { - // Do we have selections? + // Is there selections? if (ifPostContainsSelections()) { // Something has been selected, so start displaying one by one $OUT = ''; @@ -1023,7 +1023,7 @@ function doAdminNetworkProcessHandleNetworks () { // Load this network's data $networkData = getNetworkDataById($networkId); - // Do we have found the network? + // 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); @@ -1047,7 +1047,7 @@ function doAdminNetworkProcessHandleNetworks () { // Handle network type form function doAdminNetworkProcessHandleNetworkTypes () { - // Do we have selections? + // Is there selections? if (ifPostContainsSelections()) { // Load network data $networkData = getNetworkDataById(getRequestElement('network_id')); @@ -1060,7 +1060,7 @@ function doAdminNetworkProcessHandleNetworkTypes () { // Load this network's data $networkTypeData = getNetworkTypeDataById($networkId); - // Do we have found the network? + // Is there found the network? if (count($networkTypeData) > 0) { if (isFormSent('edit')) { // Add row template for deleting @@ -1099,7 +1099,7 @@ function doAdminNetworkProcessHandleNetworkTypes () { // Handle network request parameter form function doAdminNetworkProcessHandleRequestParams () { - // Do we have selections? + // Is there selections? if (ifPostContainsSelections()) { // Init cache array $GLOBALS['network_request_params_disabled'] = array(); @@ -1115,7 +1115,7 @@ function doAdminNetworkProcessHandleRequestParams () { // Load this network's data $networkRequestData = getNetworkRequestParamsDataById($networkId); - // Do we have found the network? + // Is there found the network? if (count($networkRequestData) > 0) { if (isFormSent('edit')) { // Add row template for deleting @@ -1157,7 +1157,7 @@ function doAdminNetworkProcessHandleRequestParams () { // Changes given networks function doAdminNetworkProcessChangeNetworks () { - // Do we have selections? + // Is there selections? if (ifPostContainsSelections()) { // By default nothing is updated $updated = 0; @@ -1176,7 +1176,7 @@ function doAdminNetworkProcessChangeNetworks () { continue; } // END - if - // Do we have this enty? + // Is there this enty? if (!isset($entry[$networkId])) { // Not found, needs fixing reportBug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.'); @@ -1191,7 +1191,7 @@ function doAdminNetworkProcessChangeNetworks () { } // END - if } // END - foreach - // Do we have updates? + // Is there updates? if ($updated > 0) { // Updates done displayMessage('{%message,ADMIN_NETWORK_UPDATED=' . $updated . '%}'); @@ -1204,7 +1204,7 @@ function doAdminNetworkProcessChangeNetworks () { // Removes given networks function doAdminNetworkProcessRemoveNetworks () { - // Do we have selections? + // Is there selections? if (ifPostContainsSelections()) { // By default nothing is removed $removed = 0; @@ -1218,7 +1218,7 @@ function doAdminNetworkProcessRemoveNetworks () { } // END - if } // END - foreach - // Do we have removes? + // Is there removes? if ($removed > 0) { // Removals done displayMessage('{%message,ADMIN_NETWORK_REMOVED=' . $removed . '%}'); @@ -1267,7 +1267,7 @@ function doAdminNetworkProcessAddNetworkType () { // Changes given network type handlers function doAdminNetworkProcessChangeHandlerTypes () { - // Do we have selections? + // Is there selections? if (ifPostContainsSelections()) { // By default nothing is updated $updated = 0; @@ -1286,7 +1286,7 @@ function doAdminNetworkProcessChangeHandlerTypes () { continue; } // END - if - // Do we have this enty? + // Is there this enty? if (!isset($entry[$networkId])) { // Not found, needs fixing reportBug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.'); @@ -1307,7 +1307,7 @@ function doAdminNetworkProcessChangeHandlerTypes () { } // END - if } // END - foreach - // Do we have updates? + // Is there updates? if ($updated > 0) { // Updates done displayMessage('{%message,ADMIN_NETWORK_TYPE_HANDLER_UPDATED=' . $updated . '%}'); @@ -1320,7 +1320,7 @@ function doAdminNetworkProcessChangeHandlerTypes () { // Changes given network request parameters function doAdminNetworkProcessChangeRequestParams () { - // Do we have selections? + // Is there selections? if (ifPostContainsSelections()) { // By default nothing is updated $updated = 0; @@ -1339,7 +1339,7 @@ function doAdminNetworkProcessChangeRequestParams () { continue; } // END - if - // Do we have this enty? + // Is there this enty? if (!isset($entry[$networkId])) { // Not found, needs fixing reportBug(__FUNCTION__, __LINE__, 'No entry in key=' . $key . ', id=' . $networkId . ' found.'); @@ -1360,7 +1360,7 @@ function doAdminNetworkProcessChangeRequestParams () { } // END - if } // END - foreach - // Do we have updates? + // Is there updates? if ($updated > 0) { // Updates done displayMessage('{%message,ADMIN_NETWORK_REQUEST_PARAMETER_UPDATED=' . $updated . '%}'); @@ -1373,7 +1373,7 @@ function doAdminNetworkProcessChangeRequestParams () { // Removes given network type handlers function doAdminNetworkProcessRemoveNetworkTypes () { - // Do we have selections? + // Is there selections? if (ifPostContainsSelections()) { // By default nothing is removed $removed = 0; @@ -1387,7 +1387,7 @@ function doAdminNetworkProcessRemoveNetworkTypes () { } // END - if } // END - foreach - // Do we have removes? + // Is there removes? if ($removed > 0) { // Removals done displayMessage('{%message,ADMIN_NETWORK_TYPE_HANDLER_REMOVED=' . $removed . '%}'); @@ -1400,7 +1400,7 @@ function doAdminNetworkProcessRemoveNetworkTypes () { // Removes given network request parameters function doAdminNetworkProcessRemoveNetworkRequestParams () { - // Do we have selections? + // Is there selections? if (ifPostContainsSelections()) { // By default nothing is removed $removed = 0; @@ -1414,7 +1414,7 @@ function doAdminNetworkProcessRemoveNetworkRequestParams () { } // END - if } // END - foreach - // Do we have removes? + // Is there removes? if ($removed > 0) { // Removals done displayMessage('{%message,ADMIN_NETWORK_REQUEST_PARAMETER_REMOVED=' . $removed . '%}'); @@ -1614,7 +1614,7 @@ function doAdminNetworkProcessAddHandlerTypesConfig ($displayMessage = true) { $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__); - // Do we have entries? + // Are there entries? if (SQL_HASZERONUMS($result)) { // No, then abort here displayMessage('{--ADMIN_CONFIG_NETWORK_HANDLER_SET_ALL_404--}'); @@ -1705,7 +1705,7 @@ function doAdminNetworkProcessEditHandlerTypesConfig ($displayMessage = true) { $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__); - // Do we have entries? + // Are there entries? if (SQL_HASZERONUMS($result)) { // No, then abort here displayMessage('{--ADMIN_CONFIG_NETWORK_HANDLER_SET_ALL_404--}'); diff --git a/inc/libs/optimize_functions.php b/inc/libs/optimize_functions.php index ee3e22c941..e3e1f82972 100644 --- a/inc/libs/optimize_functions.php +++ b/inc/libs/optimize_functions.php @@ -57,7 +57,7 @@ function repairOptimizeDatabase () { $ret['total_tabs'] = SQL_NUMROWS($result); $ret['tables'] = array(); - // Do we have entries? + // Are there entries? if (!SQL_HASZERONUMS($result)) { // Fetch all rows while ($row = SQL_FETCHARRAY($result)) { diff --git a/inc/libs/order_functions.php b/inc/libs/order_functions.php index 5aa1383fe8..696b9e01d5 100644 --- a/inc/libs/order_functions.php +++ b/inc/libs/order_functions.php @@ -72,7 +72,7 @@ function addOrderSelectionOptions ($default) { // Getter for 'order_multi_page' config entry function getOrderMultiPage () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('order_multi_page'); @@ -84,7 +84,7 @@ function getOrderMultiPage () { // Determines whether 'order_multi_page' is set to 'Y' function isOrderMultiPageEnabled () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = (getOrderMultiPage() == 'Y'); diff --git a/inc/libs/payout_functions.php b/inc/libs/payout_functions.php index 82c4048dea..c9b05aadd6 100644 --- a/inc/libs/payout_functions.php +++ b/inc/libs/payout_functions.php @@ -96,7 +96,7 @@ function translatePayoutStatus ($status) { // "Getter" for payoutable user points function getPayoutPoints ($userid) { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__][$userid])) { // Determine it $GLOBALS[__FUNCTION__][$userid] = countSumTotalData($userid, 'user_points', 'points') - getUserUsedPoints($userid); diff --git a/inc/libs/profile_functions.php b/inc/libs/profile_functions.php index 7a3664c68e..2af462437b 100644 --- a/inc/libs/profile_functions.php +++ b/inc/libs/profile_functions.php @@ -46,7 +46,7 @@ if (!defined('__SECURITY')) { // Getter for profile_update function getProfileUpdate () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('profile_update'); @@ -58,7 +58,7 @@ function getProfileUpdate () { // Getter for resend_profile_update function getResendProfileUpdate () { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = getConfig('resend_profile_update'); @@ -70,7 +70,7 @@ function getResendProfileUpdate () { // Determines whether sending profile update notification is enabled function isSendProfileUpdateEnabled() { - // Do we have cache? + // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it $GLOBALS[__FUNCTION__] = (getConfig('send_prof_update') == 'Y'); diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index d885505291..3974a2df09 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -91,7 +91,7 @@ WHERE LIMIT 1", array(bigintval($content['id']), bigintval($content['userid'])), __FUNCTION__, __LINE__); - // Do we have an entry? + // Is there an entry? if (SQL_HASZERONUMS($result_ref)) { // Add userid and his ref count to table $result_ref = SQL_QUERY_ESC("SELECT @@ -907,7 +907,7 @@ function addReferralRallyeTemplateSelection ($name = 'template', $default = '') } } // END - foreach - // Do we have found templates which we can link with the new rallye? + // Is there found templates which we can link with the new rallye? if (!empty($ral[0])) { // Generate selection box for all found templates $OUT = '