X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fwrapper-functions.php;h=32ab18e167a96d05d2579c18defc13ba5049175d;hb=ec3907de5b6c1ca85da82232707c85d22e197c11;hp=a41534abc911d656040b2523d6f9ec9c7f9676fe;hpb=fb41c3ccea45514b948ee7c482a25670e345be9d;p=mailer.git diff --git a/inc/wrapper-functions.php b/inc/wrapper-functions.php index a41534abc9..32ab18e167 100644 --- a/inc/wrapper-functions.php +++ b/inc/wrapper-functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -88,8 +88,7 @@ function writeToFile ($FQFN, $content, $aquireLock = FALSE) { } } else { // Write it with fopen - $fp = fopen($FQFN, 'w') - or reportBug(__FUNCTION__, __LINE__, 'Cannot write to file ' . basename($FQFN) . '!'); + $fp = fopen($FQFN, 'w') or reportBug(__FUNCTION__, __LINE__, 'Cannot write to file ' . basename($FQFN) . '!'); // Aquire a lock? if ($aquireLock === TRUE) { @@ -1667,7 +1666,7 @@ function ifInternalStatsEnabled () { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Then determine it, do not add isExtensionInstalledAndNewer() here as it breaks very first SQL query - $GLOBALS[__FUNCTION__] = (getInternalStats() == 'Y'); + $GLOBALS[__FUNCTION__] = ((isConfigEntrySet('internal_stats')) && (getInternalStats() == 'Y')); } // END - if // Return cached value @@ -3335,7 +3334,7 @@ function getUsersTotalLockedReferrals ($userid, $level = NULL) { } // END - if // Check for all referrals - $result = SQL_QUERY_ESC("SELECT + $result = sqlQueryEscaped("SELECT COUNT(`d`.`userid`) AS `cnt` FROM `{?_MYSQL_PREFIX?}_user_data` AS `d` @@ -3355,10 +3354,10 @@ LIMIT 1", ), __FUNCTION__, __LINE__); // Load count - list($GLOBALS[__FUNCTION__][$userid][$level]) = SQL_FETCHROW($result); + list($GLOBALS[__FUNCTION__][$userid][$level]) = sqlFetchRow($result); // Free result - SQL_FREERESULT($result); + sqlFreeResult($result); } // END - if // Return it @@ -3379,7 +3378,7 @@ function convertDollarDataToGetElement ($data) { } // Wrapper function for SQL layer to speed-up things -function SQL_DEBUG_ENABLED () { +function isSqlDebugEnabled () { // Is there cache? if (!isset($GLOBALS[__FUNCTION__])) { // Determine it