X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Ffunctions.php;h=1c5ee8fd3193186614180b1f5d8c9f0e5378334d;hb=a5aee3c21c5f9abd13286f26e6ee379539b02f69;hp=a452aab3571b95665f8c62be10e3d3dc062dd30d;hpb=6989412ec2be23ffb4febbba8924db25ce1ac113;p=mailer.git diff --git a/inc/functions.php b/inc/functions.php index a452aab357..1c5ee8fd31 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -92,7 +92,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = ' } // END - if // Set from header - if ((!isInStringIgnoreCase('@', str_replace('{AT}', '@', $toEmail))) && ($toEmail > 0)) { + if ((!isInString('@', $toEmail)) && ($toEmail > 0)) { // Does the user exist? if ((isExtensionActive('user')) && (fetchUserData($toEmail))) { // Get the email @@ -1358,7 +1358,7 @@ function changeDataInFile ($FQFN, $comment, $prefix, $suffix, $inserted, $seek=0 // Read from source file $line = fgets ($fp, 1024); - if (strpos($line, $search) > -1) { + if (isInString($search, $line)) { $next = '0'; $found = true; } // END - if @@ -2062,7 +2062,7 @@ 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 - if ((strpos($url, session_name()) !== false) || (isRawOutputMode())) { + if ((isInStringIgnoreCase(session_name(), $url)) || (isRawOutputMode())) { // Raw output mode detected or session_name() found in URL return $url; } // END - if @@ -2072,7 +2072,7 @@ function encodeUrl ($url, $outputMode = '0') { // Invalid session // Determine right seperator $seperator = '&'; - if (strpos($url, '?') === false) { + if (!isInString('?', $url)) { // No question mark $seperator = '?'; } elseif ((!isHtmlOutputMode()) || ($outputMode != '0')) { @@ -2099,7 +2099,7 @@ function encodeUrl ($url, $outputMode = '0') { // Simple check for spider function isSpider () { // Get the UA and trim it down - $userAgent = trim(strtolower(detectUserAgent(true))); + $userAgent = trim(detectUserAgent(true)); // It should not be empty, if so it is better a spider/bot if (empty($userAgent)) { @@ -2108,7 +2108,7 @@ function isSpider () { } // END - if // Is it a spider? - return ((strpos($userAgent, 'spider') !== false) || (strpos($userAgent, 'slurp') !== false) || (strpos($userAgent, 'bot') !== false) || (strpos($userAgent, 'archiver') !== false)); + return ((isInStringIgnoreCase('spider', $userAgent)) || (isInStringIgnoreCase('slurp', $userAgent)) || (isInStringIgnoreCase('bot', $userAgent)) || (isInStringIgnoreCase('archiver', $userAgent))); } // Function to search for the last modified file