]> git.mxchange.org Git - mailer.git/blobdiff - inc/wrapper-functions.php
Exclude directories now
[mailer.git] / inc / wrapper-functions.php
index 31c5e3eea50803a77b2a133e083bba972510f90c..0969cf0bc5579c6d4b6197fe561d0d80bb54ba78 100644 (file)
@@ -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) {
@@ -200,7 +199,7 @@ function isDirectory ($FQFN) {
                $baseName = basename($FQFN);
 
                // Check it
-               $GLOBALS[__FUNCTION__][$FQFN] = ((is_dir($FQFN)) && ($baseName != '.') && ($baseName != '..') && ($baseName != '.svn'));
+               $GLOBALS[__FUNCTION__][$FQFN] = ((is_dir($FQFN)) && (!in_array($baseName, array('.', '..', '.svn'))));
        } // END - if
 
        // Return the result
@@ -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