]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of anoth...
[mailer.git] / inc / functions.php
index 780919b4f6a143f38c9f7e5017d08ca896768e48..9305df0bc288329bd251a47fd9ab4eb558cb2f64 100644 (file)
@@ -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);