Further rewrites due to deprecated functions in 5.3.1
authorRoland Häder <roland@mxchange.org>
Tue, 2 Mar 2010 15:59:25 +0000 (15:59 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 2 Mar 2010 15:59:25 +0000 (15:59 +0000)
15 files changed:
DOCS/de/THANK_YOU.txt
inc/classes/rdf.class.php
inc/functions.php
inc/language/nickname_de.php
inc/libs/html_mail_functions.php
inc/libs/newsletter_functions.php
inc/libs/rewrite_functions.php
inc/libs/security_functions.php
inc/modules/admin/what-config_rewrite.php
inc/modules/admin/what-updates.php
inc/modules/member/what-nickname.php
inc/phpmailer/class.phpmailer.php
inc/pool/pool-bonus.php
inc/pool/pool-user.php
inc/wrapper-functions.php

index 5e17dc516e9b03d5e42104f8f9a806433d8f3d9f..a214dc6e394f704c78183cb16ddb827ac8f0e545 100644 (file)
@@ -31,7 +31,7 @@ Personen:
   (http://www.onlinewerbebombe.de)
 - Der User profi-concept aus meinem Forum hat mir sehr viele gute Patches zur
   Verfuegung gestellt (http://www.stelzi.net)
   (http://www.onlinewerbebombe.de)
 - Der User profi-concept aus meinem Forum hat mir sehr viele gute Patches zur
   Verfuegung gestellt (http://www.stelzi.net)
-- Irgentjemand, den ich noch vergessen habe...
+- Irgent jemand, den ich noch vergessen habe...
 
 Websites / Programmierer / etc.:
 - SF.net: Hosten meine Projektdateien (nur Archive)
 
 Websites / Programmierer / etc.:
 - SF.net: Hosten meine Projektdateien (nur Archive)
index 8233aba8cc9b01a2402b36c4eb6b4fa321af1e7b..d71ca447ddf44edfcb840da6425970e7136f5ff4 100644 (file)
@@ -693,7 +693,7 @@ class fase4_rdf {
                $this->_item['link'] = trim($this->_item['link']);
                if ((!empty($this->_display_opt['refid'])) && (!empty($this->_item['link'])))
                {
                $this->_item['link'] = trim($this->_item['link']);
                if ((!empty($this->_display_opt['refid'])) && (!empty($this->_item['link'])))
                {
-                       if (!ereg('refid=', $this->_item['link'])) $this->_item['link'] .= '?refid=' . $this->_display_opt['refid'];
+                       if (!isInString('refid=', $this->_item['link'])) $this->_item['link'] .= '?refid=' . $this->_display_opt['refid'];
                }
                switch ($name) {
                        case 'item':
                }
                switch ($name) {
                        case 'item':
index 9eedda3e4329d93a189c476efdcf34d40564bfb9..278c570375f636a7c09022d03a7fcadb2c1d0c32 100644 (file)
@@ -539,7 +539,7 @@ function sendEmail ($toEmail, $subject, $message, $isHtml = 'N', $mailHeader = '
        eval("\$subject = decodeEntities(\"".compileRawCode(escapeQuotes($subject))."\");");
 
        // Set from header
        eval("\$subject = decodeEntities(\"".compileRawCode(escapeQuotes($subject))."\");");
 
        // Set from header
-       if ((!eregi('@', $toEmail)) && ($toEmail > 0)) {
+       if ((!isInStringIgnoreCase('@', $toEmail)) && ($toEmail > 0)) {
                // Value detected, is the message extension installed?
                // @TODO Extension 'msg' does not exist
                if (isExtensionActive('msg')) {
                // Value detected, is the message extension installed?
                // @TODO Extension 'msg' does not exist
                if (isExtensionActive('msg')) {
@@ -1462,38 +1462,38 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                $OUT .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"timebox_table dashed\">\n";
                $OUT .= "<tr>\n";
 
                $OUT .= "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"timebox_table dashed\">\n";
                $OUT .= "<tr>\n";
 
-               if (ereg('Y', $display) || (empty($display))) {
+               if (isInString('Y', $display) || (empty($display))) {
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_YEARS--}</strong></td>\n";
                }
 
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_YEARS--}</strong></td>\n";
                }
 
-               if (ereg('M', $display) || (empty($display))) {
+               if (isInString('M', $display) || (empty($display))) {
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_MONTHS--}</strong></td>\n";
                }
 
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_MONTHS--}</strong></td>\n";
                }
 
-               if (ereg('W', $display) || (empty($display))) {
+               if (isInString('W', $display) || (empty($display))) {
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_WEEKS--}</strong></td>\n";
                }
 
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_WEEKS--}</strong></td>\n";
                }
 
-               if (ereg('D', $display) || (empty($display))) {
+               if (isInString('D', $display) || (empty($display))) {
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_DAYS--}</strong></td>\n";
                }
 
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_DAYS--}</strong></td>\n";
                }
 
-               if (ereg('h', $display) || (empty($display))) {
+               if (isInString('h', $display) || (empty($display))) {
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_HOURS--}</strong></td>\n";
                }
 
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_HOURS--}</strong></td>\n";
                }
 
-               if (ereg('m', $display) || (empty($display))) {
+               if (isInString('m', $display) || (empty($display))) {
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_MINUTES--}</strong></td>\n";
                }
 
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_MINUTES--}</strong></td>\n";
                }
 
-               if (ereg('s', $display) || (empty($display))) {
+               if (isInString('s', $display) || (empty($display))) {
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_SECONDS--}</strong></td>\n";
                }
 
                $OUT .= "</tr>\n";
                $OUT .= "<tr>\n";
 
                        $OUT .= "  <td align=\"center\" class=\"timebox_column bottom\"><div class=\"tiny\">{--_SECONDS--}</strong></td>\n";
                }
 
                $OUT .= "</tr>\n";
                $OUT .= "<tr>\n";
 
-               if (ereg('Y', $display) || (empty($display))) {
+               if (isInString('Y', $display) || (empty($display))) {
                        // Generate year selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_ye\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 10; $idx++) {
                        // Generate year selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_ye\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 10; $idx++) {
@@ -1506,7 +1506,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        $OUT .= '<input type="hidden" name="' . $prefix . '_ye" value="0" />';
                }
 
                        $OUT .= '<input type="hidden" name="' . $prefix . '_ye" value="0" />';
                }
 
-               if (ereg('M', $display) || (empty($display))) {
+               if (isInString('M', $display) || (empty($display))) {
                        // Generate month selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_mo\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 11; $idx++)
                        // Generate month selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_mo\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 11; $idx++)
@@ -1520,7 +1520,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        $OUT .= '<input type="hidden" name="' . $prefix . '_mo" value="0" />';
                }
 
                        $OUT .= '<input type="hidden" name="' . $prefix . '_mo" value="0" />';
                }
 
-               if (ereg('W', $display) || (empty($display))) {
+               if (isInString('W', $display) || (empty($display))) {
                        // Generate week selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_we\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 4; $idx++) {
                        // Generate week selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_we\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 4; $idx++) {
@@ -1533,7 +1533,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        $OUT .= '<input type="hidden" name="' . $prefix . '_we" value="0" />';
                }
 
                        $OUT .= '<input type="hidden" name="' . $prefix . '_we" value="0" />';
                }
 
-               if (ereg('D', $display) || (empty($display))) {
+               if (isInString('D', $display) || (empty($display))) {
                        // Generate day selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_da\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 31; $idx++) {
                        // Generate day selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_da\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 31; $idx++) {
@@ -1546,7 +1546,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        $OUT .= '<input type="hidden" name="' . $prefix . '_da" value="0" />';
                }
 
                        $OUT .= '<input type="hidden" name="' . $prefix . '_da" value="0" />';
                }
 
-               if (ereg('h', $display) || (empty($display))) {
+               if (isInString('h', $display) || (empty($display))) {
                        // Generate hour selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_ho\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 23; $idx++)    {
                        // Generate hour selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_ho\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 23; $idx++)    {
@@ -1559,7 +1559,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        $OUT .= '<input type="hidden" name="' . $prefix . '_ho" value="0" />';
                }
 
                        $OUT .= '<input type="hidden" name="' . $prefix . '_ho" value="0" />';
                }
 
-               if (ereg('m', $display) || (empty($display))) {
+               if (isInString('m', $display) || (empty($display))) {
                        // Generate minute selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_mi\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 59; $idx++) {
                        // Generate minute selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_mi\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 59; $idx++) {
@@ -1572,7 +1572,7 @@ function createTimeSelections ($timestamp, $prefix = '', $display = '', $align =
                        $OUT .= '<input type="hidden" name="' . $prefix . '_mi" value="0" />';
                }
 
                        $OUT .= '<input type="hidden" name="' . $prefix . '_mi" value="0" />';
                }
 
-               if (ereg('s', $display) || (empty($display))) {
+               if (isInString('s', $display) || (empty($display))) {
                        // Generate second selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_se\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 59; $idx++) {
                        // Generate second selection
                        $OUT .= "  <td align=\"center\"><select class=\"mini_select\" name=\"" . $prefix . "_se\" size=\"1\">\n";
                        for ($idx = '0'; $idx <= 59; $idx++) {
@@ -1716,7 +1716,7 @@ function extractHostnameFromUrl (&$script) {
 
        // Extract host name
        $host = str_replace('http://', '', $url);
 
        // Extract host name
        $host = str_replace('http://', '', $url);
-       if (ereg('/', $host)) $host = substr($host, 0, strpos($host, '/'));
+       if (isInString('/', $host)) $host = substr($host, 0, strpos($host, '/'));
 
        // Generate relative URL
        //* DEBUG: */ print("SCRIPT=" . $script.'<br />');
 
        // Generate relative URL
        //* DEBUG: */ print("SCRIPT=" . $script.'<br />');
@@ -1968,7 +1968,7 @@ function sendRawRequest ($host, $request) {
        } // END - if
 
        // Was the request successfull?
        } // END - if
 
        // Was the request successfull?
-       if ((!eregi('200 OK', $response[0])) || (empty($response[0]))) {
+       if ((!isInStringIgnoreCase('200 OK', $response[0])) || (empty($response[0]))) {
                // Not found / access forbidden
                $response = array('', '', '');
        } // END - if
                // Not found / access forbidden
                $response = array('', '', '');
        } // END - if
@@ -1977,7 +1977,7 @@ function sendRawRequest ($host, $request) {
        return $response;
 }
 
        return $response;
 }
 
-// Taken from www.php.net eregi() user comments
+// Taken from www.php.net isInStringIgnoreCase() user comments
 function isEmailValid ($email) {
        // Check first part of email address
        $first = '[-a-z0-9!#$%&\'*+/=?^_<{|}~]+(\.[-a-zA-Z0-9!#$%&\'*+/=?^_<{|}~]+)*';
 function isEmailValid ($email) {
        // Check first part of email address
        $first = '[-a-z0-9!#$%&\'*+/=?^_<{|}~]+(\.[-a-zA-Z0-9!#$%&\'*+/=?^_<{|}~]+)*';
@@ -1992,7 +1992,7 @@ function isEmailValid ($email) {
        return preg_match($regex, $email);
 }
 
        return preg_match($regex, $email);
 }
 
-// Function taken from user comments on www.php.net / function eregi()
+// Function taken from user comments on www.php.net / function isInStringIgnoreCase()
 function isUrlValid ($URL, $compile=true) {
        // Trim URL a little
        $URL = trim(urldecode($URL));
 function isUrlValid ($URL, $compile=true) {
        // Trim URL a little
        $URL = trim(urldecode($URL));
@@ -2633,7 +2633,7 @@ function compileUriCode ($code, $simple = true) {
        return $code;
 }
 
        return $code;
 }
 
-// Function taken from user comments on www.php.net / function eregi()
+// Function taken from user comments on www.php.net / function isInStringIgnoreCase()
 function isUrlValidSimple ($url) {
        // Prepare URL
        $url = secureString(str_replace("\\", '', compileRawCode(urldecode($url))));
 function isUrlValidSimple ($url) {
        // Prepare URL
        $url = secureString(str_replace("\\", '', compileRawCode(urldecode($url))));
index e727d054a339ed00e38af6ba6e00094420b48359..7d1ecf1ace8500afb48b49b9fbecede5a61caa4e 100644 (file)
@@ -58,7 +58,7 @@ addMessages(array(
        'PLEASE_CLICK_NICKNAME_FORM' => "Hier k&ouml;nnen Sie sich nun einen einrichten...",
        'NICKNAME_ADMIN_CONFIG_HEADER' => "Einstellungen am Nicknamen",
        'ADMIN_NICKNAME_MIN_LENGTH' => "Minimale L&auml;nge",
        'PLEASE_CLICK_NICKNAME_FORM' => "Hier k&ouml;nnen Sie sich nun einen einrichten...",
        'NICKNAME_ADMIN_CONFIG_HEADER' => "Einstellungen am Nicknamen",
        'ADMIN_NICKNAME_MIN_LENGTH' => "Minimale L&auml;nge",
-       'ADMIN_NICKNAME_PATTERN' => "Pattern f&uuml;r ereg()-Befehl",
+       'ADMIN_NICKNAME_PATTERN' => "Pattern f&uuml;r isInString()-Befehl",
        'ADMIN_NICKNAME_LANG_CHARS' => "Zeichenfolge f&uuml;r Sprachdatei",
 ));
 
        'ADMIN_NICKNAME_LANG_CHARS' => "Zeichenfolge f&uuml;r Sprachdatei",
 ));
 
index a3c176691d83517535fe8fcd521cb4f4a559770b..8630b681283b234c2360fbad7e3ad5608b00d92c 100644 (file)
@@ -56,7 +56,7 @@ function addValidHtmlTags() {
 //
 function checkHtmlTags ($html) {
        $test = stripslashes($html);
 //
 function checkHtmlTags ($html) {
        $test = stripslashes($html);
-       while (ereg('<', $test) && ereg('>', $test)) {
+       while (isInString('<', $test) && isInString('>', $test)) {
                $check = strtolower(substr($test, strpos($test, '<') + 1, strpos($test, '>') - strpos($test, '<') - 1));
                $check = str_replace('/', '', $check);
                if (!in_array($check, $GLOBALS['html_tags'])) {
                $check = strtolower(substr($test, strpos($test, '<') + 1, strpos($test, '>') - strpos($test, '<') - 1));
                $check = str_replace('/', '', $check);
                if (!in_array($check, $GLOBALS['html_tags'])) {
@@ -74,12 +74,12 @@ function insertUrlsIntoHtml ($text) {
        $test = $text;
 
        // First replace URLs...
        $test = $text;
 
        // First replace URLs...
-       while (ereg('http://', $test)) {
+       while (isInString('http://', $test)) {
                $check = substr($test, strpos($test, 'http://')); $check2 = $check;
 
                // See ext-html.php if you want to add more URL ends...
                foreach ($GLOBALS['url_ends'] as $end) {
                $check = substr($test, strpos($test, 'http://')); $check2 = $check;
 
                // See ext-html.php if you want to add more URL ends...
                foreach ($GLOBALS['url_ends'] as $end) {
-                       if (ereg($end, $check)) $check = substr($check, 0, strpos($check, $end));
+                       if (isInString($end, $check)) $check = substr($check, 0, strpos($check, $end));
                } // END - foreach
 
                // Now replace the URL against anchor container and pray...
                } // END - foreach
 
                // Now replace the URL against anchor container and pray...
@@ -97,7 +97,7 @@ function insertUrlsIntoHtml ($text) {
 
        // ... what will the email address be out the @... ;-)
        $PARTS = array();
 
        // ... what will the email address be out the @... ;-)
        $PARTS = array();
-       while (ereg('@', $test)) {
+       while (isInString('@', $test)) {
                $pos = strpos($test, '@');
                $test2 = substr($test, 0, $pos);
 
                $pos = strpos($test, '@');
                $test2 = substr($test, 0, $pos);
 
index fe1d990e5b603368b70ecc2aaa5c31bc043213af..8ecfe7373de5b24cc79bbf5ec5c23f05326b0b56 100644 (file)
@@ -47,12 +47,12 @@ function insertNewsletterUrls ($text) {
        $test = $text;
 
        // First replace URLs...
        $test = $text;
 
        // First replace URLs...
-       while (ereg('http://', $test)) {
+       while (isInString('http://', $test)) {
                $check = substr($test, strpos($test, 'http://')); $check2 = $check;
 
                // See ext-html.php if you want to add more URL ends...
                foreach ($GLOBALS['url_ends'] as $end) {
                $check = substr($test, strpos($test, 'http://')); $check2 = $check;
 
                // See ext-html.php if you want to add more URL ends...
                foreach ($GLOBALS['url_ends'] as $end) {
-                       if (ereg($end, $check)) $check = substr($check, 0, strpos($check, $end));
+                       if (isInString($end, $check)) $check = substr($check, 0, strpos($check, $end));
                } // END - foreach
 
                // Now replace the URL against anchor container and pray...
                } // END - foreach
 
                // Now replace the URL against anchor container and pray...
@@ -70,7 +70,7 @@ function insertNewsletterUrls ($text) {
 
        // ... what will the email address be out the @... ;-)
        $PARTS = array();
 
        // ... what will the email address be out the @... ;-)
        $PARTS = array();
-       while (ereg('@', $test)) {
+       while (isInString('@', $test)) {
                $pos = strpos($test, '@');
                $test2 = substr($test, 0, $pos);
 
                $pos = strpos($test, '@');
                $test2 = substr($test, 0, $pos);
 
index 68a1ea633d3c4fe0f9aa5440d02d6d14f77e8291..6a23cf91bfdce1e71335fda64b22300c2e9540e0 100644 (file)
@@ -45,7 +45,7 @@ if (!defined('__SECURITY')) {
 // Rewrite links in HTML for better SEO (ugly part of mx!)
 function rewriteLinksInCode ($HTML) {
        // Skip rewriting for configured modules
 // Rewrite links in HTML for better SEO (ugly part of mx!)
 function rewriteLinksInCode ($HTML) {
        // Skip rewriting for configured modules
-       if (eregi(getModule(), getConfig('rewrite_skip')) !== false) return $HTML;
+       if (isInStringIgnoreCase(getModule(), getConfig('rewrite_skip')) !== false) return $HTML;
 
        // Generate target URL
        $target = '{?URL?}/cms/';
 
        // Generate target URL
        $target = '{?URL?}/cms/';
@@ -61,7 +61,7 @@ function rewriteLinksInCode ($HTML) {
        } // END - foreach
 
        // Do we have an URL linked to mxchange.org?
        } // END - foreach
 
        // Do we have an URL linked to mxchange.org?
-       if (eregi(getConfig('SERVER_URL'), $output)) {
+       if (isInStringIgnoreCase(getConfig('SERVER_URL'), $output)) {
                // Convert URLs from my server
                $output = str_replace('{?URL?}/modules.php?module=', getConfig('SERVER_URL') . '/cms/', $output);
 
                // Convert URLs from my server
                $output = str_replace('{?URL?}/modules.php?module=', getConfig('SERVER_URL') . '/cms/', $output);
 
index 7309965b5b7b80cd4675122411d3b927afa36333..193ddb9fb4cd5c12083a718de2a14742a6496443 100644 (file)
@@ -89,7 +89,7 @@ function securePhpSelf () {
        $phpSelfFile      = basename($_SERVER['PHP_SELF']);
 
        // Check for a .php inside the $phpSelfDirectory...
        $phpSelfFile      = basename($_SERVER['PHP_SELF']);
 
        // Check for a .php inside the $phpSelfDirectory...
-       while (ereg('.php', $phpSelfDirectory)) {
+       while (strpos($phpSelfDirectory, '.php') !== false) {
                // Correct the dirname
                $phpSelfDirectory = substr($phpSelfDirectory, 0, (strpos($phpSelfDirectory, '.php') + 4));
                // Rewrite filename...
                // Correct the dirname
                $phpSelfDirectory = substr($phpSelfDirectory, 0, (strpos($phpSelfDirectory, '.php') + 4));
                // Rewrite filename...
index e8c95004de0301955258892cf4efe1edb7f14a01..f5218da01094fd1320f8b5c07e072101ff5e2a85 100644 (file)
@@ -71,7 +71,7 @@ if (isFormSent()) {
                if (empty($content['title'])) $content['title'] = '---';
 
                // Already registered module?
                if (empty($content['title'])) $content['title'] = '---';
 
                // Already registered module?
-               if (ereg($content['module'], getConfig('rewrite_skip'))) {
+               if (isInString($content['module'], getConfig('rewrite_skip'))) {
                        // Found
                        $y = ' checked="checked"';
                        $n = '';
                        // Found
                        $y = ' checked="checked"';
                        $n = '';
index 461eabe931306487f48f07fa5c3f40c7ad5073c6..580c57bcbeee821feb9e483abf17bfda90e229d3 100644 (file)
@@ -56,7 +56,7 @@ if (empty($response[0]) && empty($response[1]) && empty($response[2]) && empty($
        $response = array('', '', '');
 } else {
        // Analyse header for response code
        $response = array('', '', '');
 } else {
        // Analyse header for response code
-       if (eregi('200 OK', $response[0])) {
+       if (isInStringIgnoreCase('200 OK', $response[0])) {
                // Found, kill header
                $pos = '0';
                foreach($response as $k => $v) {
                // Found, kill header
                $pos = '0';
                foreach($response as $k => $v) {
index 7680b89d3e55593cdaa9a69396b721a1d509e590..bd40a66b78226519a2e7ca046fc8763ca36c9b02 100644 (file)
@@ -59,7 +59,7 @@ if (isFormSent()) {
        if (isPostRequestParameterSet('nickname')) {
                // Check if nickname is valid
                $PATTERN = '[' . getConfig('nickname_pattern') . ']{' . getConfig('nickname_len') . ',}';
        if (isPostRequestParameterSet('nickname')) {
                // Check if nickname is valid
                $PATTERN = '[' . getConfig('nickname_pattern') . ']{' . getConfig('nickname_len') . ',}';
-               if (ereg($PATTERN, postRequestParameter('nickname'), $array)) {
+               if (isInString($PATTERN, postRequestParameter('nickname'), $array)) {
                        // Entered nickname is valid?
                        $isValid = ($array[0] == postRequestParameter('nickname'));
                } // END - if
                        // Entered nickname is valid?
                        $isValid = ($array[0] == postRequestParameter('nickname'));
                } // END - if
index 6939fc2c8a3320ec239cabec75936aa0b6491c46..6fa18175b13f798bb2579e625ad07b668610fa76 100644 (file)
@@ -589,7 +589,7 @@ class PHPMailer {
     /* Retry while there is no connection */
     while($index < count($hosts) && $connection == false) {
       $hostinfo = array();
     /* Retry while there is no connection */
     while($index < count($hosts) && $connection == false) {
       $hostinfo = array();
-      if(eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) {
+      if(isInStringIgnoreCase('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) {
         $host = $hostinfo[1];
         $port = $hostinfo[2];
       } else {
         $host = $hostinfo[1];
         $port = $hostinfo[2];
       } else {
index d5084bee6bce167108befe7d69978e16001945ca..0787499781074d5f8224850a9426b5185c07a7ff 100644 (file)
@@ -72,7 +72,7 @@ if ($GLOBALS['pool_cnt'] < getConfig('max_send')) {
                                array(bigintval($DATA['id'])), __FILE__, __LINE__);
 
                        // "Explode" all receivers into an array
                                array(bigintval($DATA['id'])), __FILE__, __LINE__);
 
                        // "Explode" all receivers into an array
-                       if (ereg(';', $DATA['receivers'])) {
+                       if (isInString(';', $DATA['receivers'])) {
                                // There's more than one receiver in the list...
                                $receiverS = explode(';', $DATA['receivers']);
                        } elseif (!empty($DATA['points'])) {
                                // There's more than one receiver in the list...
                                $receiverS = explode(';', $DATA['receivers']);
                        } elseif (!empty($DATA['points'])) {
index d3e009cb1f77260a07748144d08f96a8cde62442..1abf8a079befa926fe1ef1d5814885b319fe5a38 100644 (file)
@@ -77,7 +77,7 @@ if (SQL_NUMROWS($result_main) > 0) {
                // Entry updated?
                if (SQL_AFFECTEDROWS() == 1) {
                        // "Explode" all receivers into an array
                // Entry updated?
                if (SQL_AFFECTEDROWS() == 1) {
                        // "Explode" all receivers into an array
-                       if (ereg(';', $DATA['receivers'])) {
+                       if (isInString(';', $DATA['receivers'])) {
                                // There's more than one receiver in the list...
                                $receiverS = explode(';', $DATA['receivers']);
                        } elseif (!empty($DATA['receivers'])) {
                                // There's more than one receiver in the list...
                                $receiverS = explode(';', $DATA['receivers']);
                        } elseif (!empty($DATA['receivers'])) {
index 665cb5ed50a7f3915492eaa3f9ee3408521c26d9..43b1b306c4959d7982beb780ddac64ca98fc3cc9 100644 (file)
@@ -838,5 +838,16 @@ function getFetchedUserData ($keyColumn, $userId, $valueColumn) {
        return $data;
 }
 
        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]
 ?>
 // [EOF]
 ?>