Further rewrites due to deprecated functions in 5.3.1
[mailer.git] / inc / wrapper-functions.php
index 665cb5ed50a7f3915492eaa3f9ee3408521c26d9..43b1b306c4959d7982beb780ddac64ca98fc3cc9 100644 (file)
@@ -838,5 +838,16 @@ function getFetchedUserData ($keyColumn, $userId, $valueColumn) {
        return $data;
 }
 
+// Wrapper for strpos() to ease porting from deprecated ereg() function
+function isInString ($needle, $haystack) {
+       return (strpos($haystack, $needle) !== false);
+}
+
+// Wrapper for strpos() to ease porting from deprecated eregi() function
+// This function is case-insensitive
+function isInStringIgnoreCase ($needle, $haystack) {
+       return (isInString(strtolower($haystack), strtolower($needle)));
+}
+
 // [EOF]
 ?>