diff -Naur xtcommerce.orig/account_history_info.php xtcommerce/account_history_info.php --- xtcommerce.orig/account_history_info.php 2006-08-06 15:46:53.000000000 +0200 +++ xtcommerce/account_history_info.php 2010-08-11 14:26:13.000000000 +0200 @@ -86,7 +86,7 @@ $smarty->assign('BILLING_ADDRESS_EDIT', xtc_href_link(FILENAME_CHECKOUT_PAYMENT_ADDRESS, '', 'SSL')); $smarty->assign('BUTTON_PRINT', ''); -$from_history = eregi("page=", xtc_get_all_get_params()); // referer from account_history yes/no +$from_history = preg_match("/page=/i", xtc_get_all_get_params()); // referer from account_history yes/no $back_to = $from_history ? FILENAME_ACCOUNT_HISTORY : FILENAME_ACCOUNT; // if from account_history => return to account_history $smarty->assign('BUTTON_BACK','' . xtc_image_button('button_back.gif', IMAGE_BUTTON_BACK) . ''); @@ -99,4 +99,4 @@ if (!defined(RM)) { $smarty->load_filter('output', 'note'); } $smarty->display(CURRENT_TEMPLATE.'/index.html'); include ('includes/application_bottom.php'); -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/admin/backup.php xtcommerce/admin/backup.php --- xtcommerce.orig/admin/backup.php 2005-07-14 13:41:38.000000000 +0200 +++ xtcommerce/admin/backup.php 2010-08-10 17:56:23.000000000 +0200 @@ -51,7 +51,7 @@ if (isset($fields['Extra'])) $schema .= ' ' . $fields['Extra']; $schema .= ',' . "\n"; } - $schema = ereg_replace(",\n$", '', $schema); + $schema = preg_replace("/,\n$/", '', $schema); // Add the keys $index = array(); @@ -87,13 +87,13 @@ $schema_insert .= 'NULL, '; } elseif ($rows[$i] != '') { $row = addslashes($rows[$i]); - $row = ereg_replace("\n#", "\n".'\#', $row); + $row = preg_replace("/\n#/", "\n".'\#', $row); $schema_insert .= '\'' . $row . '\', '; } else { $schema_insert .= '\'\', '; } } - $schema_insert = ereg_replace(', $', '', $schema_insert) . ');' . "\n"; + $schema_insert = preg_replace('/, $/', '', $schema_insert) . ');' . "\n"; $schema .= $schema_insert; } $schema .= "\n"; @@ -237,7 +237,7 @@ if ($next == '') { // get the last insert query $next = 'insert'; } - if ( (eregi('create', $next)) || (eregi('insert', $next)) || (eregi('drop t', $next)) ) { + if ( (preg_match('/create/i', $next)) || (preg_match('/insert/i', $next)) || (preg_match('/drop t/i', $next)) ) { $next = ''; $sql_array[] = substr($restore_query, 0, $i); $restore_query = ltrim(substr($restore_query, $i+1)); @@ -487,4 +487,4 @@
- \ No newline at end of file + diff -Naur xtcommerce.orig/admin/configuration.php xtcommerce/admin/configuration.php --- xtcommerce.orig/admin/configuration.php 2005-07-28 11:59:44.000000000 +0200 +++ xtcommerce/admin/configuration.php 2010-08-10 17:57:43.000000000 +0200 @@ -139,7 +139,7 @@ } if (xtc_not_null($configuration['use_function'])) { $use_function = $configuration['use_function']; - if (ereg('->', $use_function)) { + if (preg_match('/->/', $use_function)) { $class_method = explode('->', $use_function); if (!is_object(${$class_method[0]})) { include(DIR_WS_CLASSES . $class_method[0] . '.php'); @@ -203,4 +203,4 @@
- \ No newline at end of file + diff -Naur xtcommerce.orig/admin/content_manager.php xtcommerce/admin/content_manager.php --- xtcommerce.orig/admin/content_manager.php 2006-03-15 15:06:02.000000000 +0100 +++ xtcommerce/admin/content_manager.php 2010-08-11 13:56:11.000000000 +0200 @@ -1024,19 +1024,19 @@ - \ No newline at end of file + diff -Naur xtcommerce.orig/admin/content_preview.php xtcommerce/admin/content_preview.php --- xtcommerce.orig/admin/content_preview.php 2005-10-12 20:04:44.000000000 +0200 +++ xtcommerce/admin/content_preview.php 2010-08-11 15:40:00.000000000 +0200 @@ -51,7 +51,7 @@ if (strpos($content_data['content_file'],'.txt')) echo '
';
 if ($_GET['pID']=='media') {
 	// display image
-	if (eregi('.gif',$content_data['content_file']) or eregi('.jpg',$content_data['content_file']) or  eregi('.png',$content_data['content_file']) or  eregi('.tif',$content_data['content_file']) or  eregi('.bmp',$content_data['content_file'])) {	
+	if (preg_match('/\.gif/i',$content_data['content_file']) or preg_match('/\.jpg/i',$content_data['content_file']) or  preg_match('/\.png/i',$content_data['content_file']) or  preg_match('/\.tif/i',$content_data['content_file']) or  preg_match('/\.bmp/i',$content_data['content_file'])) {	
 	echo xtc_image(DIR_WS_CATALOG.'media/products/'.$content_data['content_file']);
 	} else {
 	include(DIR_FS_CATALOG.'media/products/'.$content_data['content_file']);	
@@ -68,4 +68,4 @@
           
         
 
-
\ No newline at end of file
+
diff -Naur xtcommerce.orig/admin/coupon_admin.php xtcommerce/admin/coupon_admin.php
--- xtcommerce.orig/admin/coupon_admin.php	2005-07-23 20:36:08.000000000 +0200
+++ xtcommerce/admin/coupon_admin.php	2010-08-11 13:54:03.000000000 +0200
@@ -728,15 +728,15 @@
       
 
         
@@ -934,4 +934,4 @@
 
 
 
-
\ No newline at end of file
+
diff -Naur xtcommerce.orig/admin/csv_backend.php xtcommerce/admin/csv_backend.php
--- xtcommerce.orig/admin/csv_backend.php	2005-07-14 22:22:32.000000000 +0200
+++ xtcommerce/admin/csv_backend.php	2010-08-11 13:57:12.000000000 +0200
@@ -143,7 +143,7 @@
     }
     if (xtc_not_null($configuration['use_function'])) {
       $use_function = $configuration['use_function'];
-      if (ereg('->', $use_function)) {
+      if (preg_match('/->/', $use_function)) {
         $class_method = explode('->', $use_function);
         if (!is_object(${$class_method[0]})) {
           include(DIR_WS_CLASSES . $class_method[0] . '.php');
@@ -334,4 +334,4 @@
 
 
 
-
\ No newline at end of file
+
diff -Naur xtcommerce.orig/admin/econda.php xtcommerce/admin/econda.php
--- xtcommerce.orig/admin/econda.php	2006-08-05 16:49:41.000000000 +0200
+++ xtcommerce/admin/econda.php	2010-08-11 13:57:25.000000000 +0200
@@ -89,7 +89,7 @@
   while ($configuration = xtc_db_fetch_array($configuration_query)) {
     if (xtc_not_null($configuration['use_function'])) {
       $use_function = $configuration['use_function'];
-      if (ereg('->', $use_function)) {
+      if (preg_match('/->/', $use_function)) {
         $class_method = explode('->', $use_function);
         if (!is_object(${$class_method[0]})) {
           include(DIR_WS_CLASSES . $class_method[0] . '.php');
@@ -259,4 +259,4 @@
 
 
 
-
\ No newline at end of file
+
diff -Naur xtcommerce.orig/admin/includes/application_top.php xtcommerce/admin/includes/application_top.php
--- xtcommerce.orig/admin/includes/application_top.php	2006-08-20 23:56:19.000000000 +0200
+++ xtcommerce/admin/includes/application_top.php	2010-08-11 13:52:41.000000000 +0200
@@ -396,7 +396,7 @@
   // include the language translations
   require(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/'.$_SESSION['language'] . '.php');
   require(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/buttons.php');
-  $current_page = split('\?', basename($_SERVER['PHP_SELF'])); $current_page = $current_page[0]; // for BadBlue(Win32) webserver compatibility
+  $current_page = explode('?', basename($_SERVER['PHP_SELF'])); $current_page = $current_page[0]; // for BadBlue(Win32) webserver compatibility
   if (file_exists(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/'.$current_page)) {
     include(DIR_FS_LANGUAGES . $_SESSION['language'] . '/admin/'.  $current_page);
   }
@@ -497,4 +497,4 @@
   require(DIR_FS_CATALOG.DIR_WS_CLASSES . 'Smarty_2.6.14/Smarty.class.php');
 
   
-?>
\ No newline at end of file
+?>
diff -Naur xtcommerce.orig/admin/includes/classes/language.php xtcommerce/admin/includes/classes/language.php
--- xtcommerce.orig/admin/includes/classes/language.php	2005-05-14 18:45:22.000000000 +0200
+++ xtcommerce/admin/includes/classes/language.php	2010-08-10 18:07:58.000000000 +0200
@@ -91,7 +91,7 @@
       for ($i=0, $n=sizeof($this->browser_languages); $i<$n; $i++) {
         reset($this->languages);
         while (list($key, $value) = each($this->languages)) {
-          if (eregi('^(' . $value[0] . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {
+          if (preg_match('/^(' . $value[0] . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) {
             $this->language = $this->catalog_languages[$key];
             break 2;
           }
@@ -99,4 +99,4 @@
       }
     }
   }
-?>
\ No newline at end of file
+?>
diff -Naur xtcommerce.orig/admin/includes/classes/phplot.php xtcommerce/admin/includes/classes/phplot.php
--- xtcommerce.orig/admin/includes/classes/phplot.php	2005-05-14 18:45:22.000000000 +0200
+++ xtcommerce/admin/includes/classes/phplot.php	2010-08-10 18:09:58.000000000 +0200
@@ -678,8 +678,8 @@
 			if ($which_valign == 'top') { 
 				$which_ypos = $which_ypos - ImageFontHeight($which_font);
 			}
-			$which_text = ereg_replace("\r","",$which_text);
-			$str = split("\n",$which_text); //multiple lines submitted by Remi Ricard
+      $which_text = preg_replace("/\r/","",$which_text);
+      $str = explode("\n",$which_text); //multiple lines submitted by Remi Ricard
 			$height = ImageFontHeight($which_font);
 			$width = ImageFontWidth($which_font);
 			if ($which_angle == 90) {  //Vertical Code Submitted by Marlin Viss
@@ -783,7 +783,7 @@
 	function SetPlotType($which_pt) {
 		$accepted = "bars,lines,linepoints,area,points,pie,thinbarline";
 		$asked = trim($which_pt);
-		if (eregi($asked, $accepted)) {
+    if (preg_match('/' . $asked .'/i', $accepted)) {
 			$this->plot_type = $which_pt;
 			return true;
 		} else {
@@ -940,7 +940,7 @@
 		// It thus depends on the current character size, set by SetCharacterHeight().
 		/////////////////////////////////////////////////////////////////
 
-		$str = split("\n",$this->title_txt); 
+    $str = explode("\n",$this->title_txt); 
 		$nbLines = count($str); 
 
 		if ($this->use_ttf == 1) {
@@ -2634,4 +2634,4 @@
 		}
 	} //function DrawGraph
   }
-?>
\ No newline at end of file
+?>
diff -Naur xtcommerce.orig/admin/includes/classes/sessions.php xtcommerce/admin/includes/classes/sessions.php
--- xtcommerce.orig/admin/includes/classes/sessions.php	2005-05-14 18:45:22.000000000 +0200
+++ xtcommerce/admin/includes/classes/sessions.php	2010-08-10 18:13:06.000000000 +0200
@@ -387,7 +387,7 @@
     // '=' to allow URLs of the form
     // http://yoursite/=/script.php 
     if (empty($session->id)) {
-      eregi($session->name . '=([^/]+)', $GLOBALS['REQUEST_URI'], $regs);
+      preg_match('/' . $session->name . '=([^/]+)/i', $GLOBALS['REQUEST_URI'], $regs);
       $regs[1] = trim($regs[1]);
       if (!empty($regs[1])) {
         $session->id = $regs[1];
@@ -516,4 +516,4 @@
   }
 
   register_shutdown_function('session_close');
-?>
\ No newline at end of file
+?>
diff -Naur xtcommerce.orig/admin/includes/functions/compatibility.php xtcommerce/admin/includes/functions/compatibility.php
--- xtcommerce.orig/admin/includes/functions/compatibility.php	2005-05-14 18:45:22.000000000 +0200
+++ xtcommerce/admin/includes/functions/compatibility.php	2010-08-10 18:21:48.000000000 +0200
@@ -44,9 +44,14 @@
     do_magic_quotes_gpc($_COOKIE);
   }
 
+  // set default timezone if none exists (PHP 5.3 throws an E_WARNING)
+  if ((strlen(ini_get('date.timezone')) < 1) && function_exists('date_default_timezone_set')) {
+    date_default_timezone_set(@date_default_timezone_get());
+  }
+
   if (!function_exists('is_numeric')) {
     function is_numeric($param) {
-      return ereg("^[0-9]{1,50}.?[0-9]{0,50}$", $param);
+      return preg_match("/^[0-9]{1,50}.?[0-9]{0,50}$/", $param);
     }
   }
 
@@ -77,7 +82,7 @@
       if(xtc_not_null($host) && xtc_not_null($type)) {
         @exec("nslookup -type=$type $host", $output);
         while(list($k, $line) = each($output)) {
-          if(eregi("^$host", $line)) {
+          if(preg_match("/^$host/i", $line)) {
             return true;
           }
         }
@@ -85,4 +90,4 @@
       return false;
     }
   }
-?>
\ No newline at end of file
+?>
diff -Naur xtcommerce.orig/admin/includes/functions/general.php xtcommerce/admin/includes/functions/general.php
--- xtcommerce.orig/admin/includes/functions/general.php	2006-04-15 15:39:30.000000000 +0200
+++ xtcommerce/admin/includes/functions/general.php	2010-08-11 14:03:32.000000000 +0200
@@ -226,7 +226,7 @@
 	if (@ date('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year) {
 		return date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, $year));
 	} else {
-		return ereg_replace('2037'.'$', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037)));
+		return preg_replace('/2037$/', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037)));
 	}
 
 }
@@ -1079,9 +1079,9 @@
 					while ($cache_file = readdir($dir)) {
 						$cached_file = $cache_blocks[$i]['file'];
 						$languages = xtc_get_languages();
-						for ($j = 0, $k = sizeof($languages); $j < $k; $j ++) {
-							$cached_file_unlink = ereg_replace('-language', '-'.$languages[$j]['directory'], $cached_file);
-							if (ereg('^'.$cached_file_unlink, $cache_file)) {
+            for ($j = 0, $k = sizeof($languages); $j < $k; $j ++) {
+              $cached_file_unlink = preg_replace('/-language/', '-' . $languages[$j]['directory'],  $cached_file);
+              if (preg_match('/^' . $cached_file_unlink . '/', $cache_file)) {
 								@ unlink(DIR_FS_CACHE.$cache_file);
 							}
 						}
@@ -1092,7 +1092,7 @@
 				$cached_file = $cache_blocks[$i]['file'];
 				$languages = xtc_get_languages();
 				for ($i = 0, $n = sizeof($languages); $i < $n; $i ++) {
-					$cached_file = ereg_replace('-language', '-'.$languages[$i]['directory'], $cached_file);
+          $cached_file = preg_replace('/-language/', '-' . $languages[$i]['directory'], $cached_file);
 					@ unlink(DIR_FS_CACHE.$cached_file);
 				}
 			}
@@ -1398,7 +1398,7 @@
 // nl2br() prior PHP 4.2.0 did not convert linefeeds on all OSs (it only converted \n)
 function xtc_convert_linefeeds($from, $to, $string) {
 	if ((PHP_VERSION < "4.0.5") && is_array($from)) {
-		return ereg_replace('('.implode('|', $from).')', $to, $string);
+    return preg_replace('/(' . implode('|', $from) . ')/', $to, $string);
 	} else {
 		return str_replace($from, $to, $string);
 	}
@@ -1525,8 +1525,8 @@
 
 function xtc_CheckExt($filename, $ext) {
 	$passed = FALSE;
-	$testExt = "\.".$ext."$";
-	if (eregi($testExt, $filename)) {
+	$testExt = "/\.".$ext."$/i";
+	if (preg_match($testExt, $filename)) {
 		$passed = TRUE;
 	}
 	return $passed;
@@ -1679,4 +1679,4 @@
 
 
 //--------------------------------------------------------------------------------------Ende 
-?>
\ No newline at end of file
+?>
diff -Naur xtcommerce.orig/admin/includes/functions/html_graphs.php xtcommerce/admin/includes/functions/html_graphs.php
--- xtcommerce.orig/admin/includes/functions/html_graphs.php	2005-05-14 18:45:22.000000000 +0200
+++ xtcommerce/admin/includes/functions/html_graphs.php	2010-08-10 18:22:36.000000000 +0200
@@ -165,7 +165,7 @@
       $horizontal_graph_string .= '>';
 
       // decide if the value in bar is a color code or image.
-      if (ereg('^#', $bars[$i])) { 
+      if (preg_match('/^#/', $bars[$i])) { 
         $horizontal_graph_string .= '' . "\n" .
                                     '  ' . "\n" .
                                     '    ' . "\n" .
@@ -256,7 +256,7 @@
                                          '        ';
       } else {
         $double_horizontal_graph_string .= ' background="' . $dbars[$i] . '">';
@@ -265,7 +265,7 @@
       $double_horizontal_graph_string .= '';
 
       // decide if the value in bar is a color code or image.
-      if (ereg('^#', $bars[$i])) { 
+      if (preg_match('/^#/', $bars[$i])) { 
         $double_horizontal_graph_string .= '
 
' . "\n" . ' ' . "\n" . ' ' . "\n" . @@ -566,4 +566,4 @@ return html_graph($names, $values, $bars, $graph_vals, $dvalues, $dbars); } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/admin/includes/functions/validations.php xtcommerce/admin/includes/functions/validations.php --- xtcommerce.orig/admin/includes/functions/validations.php 2005-05-14 18:45:22.000000000 +0200 +++ xtcommerce/admin/includes/functions/validations.php 2010-08-11 13:40:42.000000000 +0200 @@ -49,22 +49,22 @@ function xtc_validate_email($email) { $valid_address = true; - $mail_pat = '^(.+)@(.+)$'; + $mail_pat = '/^(.+)@(.+)$/i'; $valid_chars = "[^] \(\)<>@,;:\.\\\"\[]"; $atom = "$valid_chars+"; $quoted_user='(\"[^\"]*\")'; $word = "($atom|$quoted_user)"; - $user_pat = "^$word(\.$word)*$"; - $ip_domain_pat='^\[([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\]$'; - $domain_pat = "^$atom(\.$atom)*$"; + $user_pat = "/^$word(\.$word)*$/i"; + $ip_domain_pat='/^\[([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\]$/i'; + $domain_pat = "/^$atom(\.$atom)*$/i"; - if (eregi($mail_pat, $email, $components)) { + if (preg_match($mail_pat, $email, $components)) { $user = $components[1]; $domain = $components[2]; // validate user - if (eregi($user_pat, $user)) { + if (preg_match($user_pat, $user)) { // validate domain - if (eregi($ip_domain_pat, $domain, $ip_components)) { + if (preg_match($ip_domain_pat, $domain, $ip_components)) { // this is an IP address for ($i=1;$i<=4;$i++) { if ($ip_components[$i] > 255) { @@ -74,7 +74,7 @@ } } else { // Domain is a name, not an IP - if (eregi($domain_pat, $domain)) { + if (preg_match($domain_pat, $domain)) { /* domain name seems valid, but now make sure that it ends in a valid TLD or ccTLD and that there's a hostname preceding the domain or country. */ $domain_components = explode(".", $domain); @@ -84,7 +84,7 @@ } else { $top_level_domain = strtolower($domain_components[sizeof($domain_components)-1]); // Allow all 2-letter TLDs (ccTLDs) - if (eregi('^[a-z][a-z]$', $top_level_domain) != 1) { + if (preg_match('/^[a-z][a-z]$/i', $top_level_domain) != 1) { $tld_pattern = ''; // Get authorized TLDs from text file $tlds = file(DIR_WS_INCLUDES . 'tld.txt'); @@ -93,13 +93,13 @@ $words = explode('#', $line); $tld = trim($words[0]); // TLDs should be 3 letters or more - if (eregi('^[a-z]{3,}$', $tld) == 1) { + if (preg_match('/^[a-z]{3,}$/i', $tld) == 1) { $tld_pattern .= '^' . $tld . '$|'; } } // Remove last '|' $tld_pattern = substr($tld_pattern, 0, -1); - if (eregi("$tld_pattern", $top_level_domain) == 0) { + if (preg_match("/$tld_pattern/i", $top_level_domain) == 0) { $valid_address = false; } } @@ -121,4 +121,4 @@ } return $valid_address; } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/admin/includes/modules/carp/carp.php xtcommerce/admin/includes/modules/carp/carp.php --- xtcommerce.orig/admin/includes/modules/carp/carp.php 2006-07-26 23:36:18.000000000 +0200 +++ xtcommerce/admin/includes/modules/carp/carp.php 2010-08-11 14:02:50.000000000 +0200 @@ -179,8 +179,8 @@ function CarpOutput($t) { global $carpconf,$carpoutput; - if (is_array($t)) { for ($i=0,$j=count($t);$i<$j;$i++) $t[$i]=ereg_replace("'","'",$t[$i]); } - else $t=ereg_replace("'","'",$t); + if (is_array($t)) { for ($i=0,$j=count($t);$i<$j;$i++) $t[$i]=preg_replace("/'/","'",$t[$i]); } + else $t=preg_replace("/'/","'",$t); switch ($carpconf['outputformat']) { case 1: if (!is_array($t)) $t=explode("\n",$t); @@ -370,4 +370,4 @@ if (file_exists(CarpDirName()."/carpconf.php")) require_once CarpDirName()."/carpconf.php"; else CarpConfReset(); -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/admin/includes/modules/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php xtcommerce/admin/includes/modules/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php --- xtcommerce.orig/admin/includes/modules/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php 2005-10-07 17:40:50.000000000 +0200 +++ xtcommerce/admin/includes/modules/fckeditor/editor/filemanager/browser/default/connectors/php/connector.php 2010-08-11 14:00:32.000000000 +0200 @@ -31,7 +31,7 @@ else $GLOBALS["UserFilesPath"] = '/UserFiles/' ; -if ( ! ereg( '/$', $GLOBALS["UserFilesPath"] ) ) +if ( ! preg_match( '/\/$/', $GLOBALS["UserFilesPath"] ) ) $GLOBALS["UserFilesPath"] .= '/' ; // Map the "UserFiles" path to a local directory. @@ -55,7 +55,7 @@ return ; // Check the current folder syntax (must begin and start with a slash). - if ( ! ereg( '/$', $sCurrentFolder ) ) $sCurrentFolder .= '/' ; + if ( ! preg_match( '/\/$/', $sCurrentFolder ) ) $sCurrentFolder .= '/' ; if ( strpos( $sCurrentFolder, '/' ) !== 0 ) $sCurrentFolder = '/' . $sCurrentFolder ; // Check for invalid folder paths (..) diff -Naur xtcommerce.orig/admin/listcategories.php xtcommerce/admin/listcategories.php --- xtcommerce.orig/admin/listcategories.php 2005-10-18 17:49:16.000000000 +0200 +++ xtcommerce/admin/listcategories.php 2010-08-11 13:54:17.000000000 +0200 @@ -54,7 +54,7 @@ $coupon_get=xtc_db_query("select restrict_to_categories from " . TABLE_COUPONS . " where coupon_id='".$_GET['cid']."'"); $get_result=xtc_db_fetch_array($coupon_get); echo ""; - $cat_ids = split("[,]", $get_result['restrict_to_categories']); + $cat_ids = explode(",", $get_result['restrict_to_categories']); for ($i = 0; $i < count($cat_ids); $i++) { $result = xtc_db_query("SELECT * FROM ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd WHERE c.categories_id = cd.categories_id and cd.language_id = '" . $_SESSION['languages_id'] . "' and c.categories_id='" . $cat_ids[$i] . "'"); if ($row = xtc_db_fetch_array($result)) { @@ -71,4 +71,4 @@
 
Category IDCategory Name
- \ No newline at end of file + diff -Naur xtcommerce.orig/admin/listproducts.php xtcommerce/admin/listproducts.php --- xtcommerce.orig/admin/listproducts.php 2005-10-18 16:18:20.000000000 +0200 +++ xtcommerce/admin/listproducts.php 2010-08-11 13:54:12.000000000 +0200 @@ -55,7 +55,7 @@ $get_result=xtc_db_fetch_array($coupon_get); echo "Product IDProduct NameProduct Size"; - $pr_ids = split("[,]", $get_result['restrict_to_products']); + $pr_ids = explode(",", $get_result['restrict_to_products']); for ($i = 0; $i < count($pr_ids); $i++) { $result = xtc_db_query("SELECT * FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_id = pd.products_id and pd.language_id = '" . $_SESSION['languages_id'] . "'and p.products_id = '" . $pr_ids[$i] . "'"); if ($row = xtc_db_fetch_array($result)) { @@ -73,4 +73,4 @@ - \ No newline at end of file + diff -Naur xtcommerce.orig/admin/module_export.php xtcommerce/admin/module_export.php --- xtcommerce.orig/admin/module_export.php 2005-08-25 14:37:14.000000000 +0200 +++ xtcommerce/admin/module_export.php 2010-08-11 13:57:37.000000000 +0200 @@ -240,7 +240,7 @@ $keys .= '' . $value['title'] . '
'; if ($value['use_function']) { $use_function = $value['use_function']; - if (ereg('->', $use_function)) { + if (preg_match('/->/', $use_function)) { $class_method = explode('->', $use_function); if (!is_object(${$class_method[0]})) { include(DIR_WS_CLASSES . $class_method[0] . '.php'); @@ -295,4 +295,4 @@
- \ No newline at end of file + diff -Naur xtcommerce.orig/admin/modules.php xtcommerce/admin/modules.php --- xtcommerce.orig/admin/modules.php 2006-12-02 13:03:53.000000000 +0100 +++ xtcommerce/admin/modules.php 2010-08-10 17:58:03.000000000 +0200 @@ -253,7 +253,7 @@ $keys .= '' . $value['title'] . '
'; if ($value['use_function']) { $use_function = $value['use_function']; - if (ereg('->', $use_function)) { + if (preg_match('/->/', $use_function)) { $class_method = explode('->', $use_function); if (!is_object(${$class_method[0]})) { include(DIR_WS_CLASSES . $class_method[0] . '.php'); @@ -308,4 +308,4 @@
- \ No newline at end of file + diff -Naur xtcommerce.orig/admin/orders_edit_other.php xtcommerce/admin/orders_edit_other.php --- xtcommerce.orig/admin/orders_edit_other.php 2006-05-07 17:56:42.000000000 +0200 +++ xtcommerce/admin/orders_edit_other.php 2010-08-11 13:51:22.000000000 +0200 @@ -123,7 +123,7 @@ info['language'] . '/modules/payment/' . $payments[$i]); @@ -176,7 +176,7 @@ info['language'] . '/modules/shipping/' . $shippings[$i])) { @@ -190,7 +190,7 @@ } } - $order_shipping = split('_', $order->info['shipping_class']); + $order_shipping = explode('_', $order->info['shipping_class']); $order_shipping = $order_shipping[0]; if (is_file(DIR_FS_LANGUAGES . $order->info['language'] . '/modules/shipping/' . $order_shipping .'.php')) { require(DIR_FS_LANGUAGES . $order->info['language'] . '/modules/shipping/' . $order_shipping .'.php'); @@ -241,7 +241,7 @@ info['language'] . '/modules/order_total/' . $totals[$i]); @@ -288,4 +288,4 @@ ?> - \ No newline at end of file + diff -Naur xtcommerce.orig/admin/orders_edit.php xtcommerce/admin/orders_edit.php --- xtcommerce.orig/admin/orders_edit.php 2006-06-30 20:23:27.000000000 +0200 +++ xtcommerce/admin/orders_edit.php 2010-08-11 13:51:51.000000000 +0200 @@ -526,7 +526,7 @@ if ($module_name != 'shipping') { $module_tax_class = constant(MODULE_ORDER_TOTAL_.strtoupper($module_name)._TAX_CLASS); } else { - $module_tmp_name = split('_', $order->info['shipping_class']); + $module_tmp_name = explode('_', $order->info['shipping_class']); $module_tmp_name = $module_tmp_name[0]; if ($module_tmp_name != 'selfpickup') { $module_tax_class = constant(MODULE_SHIPPING_.strtoupper($module_tmp_name)._TAX_CLASS); diff -Naur xtcommerce.orig/admin/server_info.php xtcommerce/admin/server_info.php --- xtcommerce.orig/admin/server_info.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/admin/server_info.php 2010-08-11 16:00:50.000000000 +0200 @@ -103,9 +103,9 @@ ob_end_clean(); $phpinfo = str_replace('border: 1px', '', $phpinfo); - ereg("({1})", $phpinfo, $regs); + preg_match('/'; - ereg("({1})(.*)({1})", $phpinfo, $regs); + preg_match('/(.*)<\/body>/is', $phpinfo, $regs); echo $regs[2]; } else { phpinfo(); @@ -125,4 +125,4 @@
- \ No newline at end of file + diff -Naur xtcommerce.orig/admin/sofortueberweisung_install.php xtcommerce/admin/sofortueberweisung_install.php --- xtcommerce.orig/admin/sofortueberweisung_install.php 2007-07-16 11:42:15.000000000 +0200 +++ xtcommerce/admin/sofortueberweisung_install.php 2010-08-11 13:59:51.000000000 +0200 @@ -48,11 +48,11 @@ $char = chr(xtc_rand(0,255)); } if ($type == 'mixed') { - if (eregi('^[a-z0-9]$', $char)) $rand_value .= $char; + if (preg_match('/^[a-z0-9]$/i', $char)) $rand_value .= $char; } elseif ($type == 'chars') { - if (eregi('^[a-z]$', $char)) $rand_value .= $char; + if (preg_match('/^[a-z]$/i', $char)) $rand_value .= $char; } elseif ($type == 'digits') { - if (ereg('^[0-9]$', $char)) $rand_value .= $char; + if (preg_match('/^[0-9]$/i', $char)) $rand_value .= $char; } } @@ -498,4 +498,4 @@ - \ No newline at end of file + diff -Naur xtcommerce.orig/admin/stats_sales_report.php xtcommerce/admin/stats_sales_report.php --- xtcommerce.orig/admin/stats_sales_report.php 2005-10-18 14:30:40.000000000 +0200 +++ xtcommerce/admin/stats_sales_report.php 2010-08-11 13:51:38.000000000 +0200 @@ -315,7 +315,7 @@ \ No newline at end of file +?> diff -Naur xtcommerce.orig/admin/whos_online.php xtcommerce/admin/whos_online.php --- xtcommerce.orig/admin/whos_online.php 2005-08-07 09:47:08.000000000 +0200 +++ xtcommerce/admin/whos_online.php 2010-08-11 15:58:48.000000000 +0200 @@ -85,7 +85,7 @@ -   +   - \ No newline at end of file + diff -Naur xtcommerce.orig/gv_send.php xtcommerce/gv_send.php --- xtcommerce.orig/gv_send.php 2005-07-15 17:21:44.000000000 +0200 +++ xtcommerce/gv_send.php 2010-08-11 14:27:15.000000000 +0200 @@ -58,7 +58,7 @@ $gv_result = xtc_db_fetch_array($gv_query); $customer_amount = $gv_result['amount']; $gv_amount = trim(str_replace(",", ".", $_POST['amount'])); - if (ereg('[^0-9/.]', $gv_amount)) { + if (preg_match('/[^0-9/.]/', $gv_amount)) { $error = true; $error_amount = ERROR_ENTRY_AMOUNT_CHECK; } @@ -157,4 +157,4 @@ $smarty->load_filter('output', 'note'); $smarty->display(CURRENT_TEMPLATE.'/index.html'); include ('includes/application_bottom.php'); -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/inc/xtc_count_modules.inc.php xtcommerce/inc/xtc_count_modules.inc.php --- xtcommerce.orig/inc/xtc_count_modules.inc.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/inc/xtc_count_modules.inc.php 2010-08-11 15:17:32.000000000 +0200 @@ -20,7 +20,7 @@ if (empty($modules)) return $count; - $modules_array = split(';', $modules); + $modules_array = explode(';', $modules); for ($i=0, $n=sizeof($modules_array); $i<$n; $i++) { $class = substr($modules_array[$i], 0, strrpos($modules_array[$i], '.')); @@ -34,4 +34,4 @@ return $count; } - ?> \ No newline at end of file + ?> diff -Naur xtcommerce.orig/inc/xtc_create_random_value.inc.php xtcommerce/inc/xtc_create_random_value.inc.php --- xtcommerce.orig/inc/xtc_create_random_value.inc.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/inc/xtc_create_random_value.inc.php 2010-08-11 15:20:27.000000000 +0200 @@ -27,11 +27,11 @@ $char = chr(xtc_rand(0,255)); } if ($type == 'mixed') { - if (eregi('^[a-z0-9]$', $char)) $rand_value .= $char; + if (preg_match('/^[a-z0-9]$/i', $char)) $rand_value .= $char; } elseif ($type == 'chars') { - if (eregi('^[a-z]$', $char)) $rand_value .= $char; + if (preg_match('/^[a-z]$/i', $char)) $rand_value .= $char; } elseif ($type == 'digits') { - if (ereg('^[0-9]$', $char)) $rand_value .= $char; + if (preg_match('/^[0-9]$/', $char)) $rand_value .= $char; } } diff -Naur xtcommerce.orig/inc/xtc_date_short.inc.php xtcommerce/inc/xtc_date_short.inc.php --- xtcommerce.orig/inc/xtc_date_short.inc.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/inc/xtc_date_short.inc.php 2010-08-11 15:19:20.000000000 +0200 @@ -31,7 +31,7 @@ if (@date('Y', mktime($hour, $minute, $second, $month, $day, $year)) == $year) { return date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, $year)); } else { - return ereg_replace('2037' . '$', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037))); + return preg_replace('/2037$/', $year, date(DATE_FORMAT, mktime($hour, $minute, $second, $month, $day, 2037))); } } - ?> \ No newline at end of file + ?> diff -Naur xtcommerce.orig/inc/xtc_db_install.inc.php xtcommerce/inc/xtc_db_install.inc.php --- xtcommerce.orig/inc/xtc_db_install.inc.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/inc/xtc_db_install.inc.php 2010-08-11 14:26:56.000000000 +0200 @@ -71,7 +71,7 @@ if ($next == '') { // get the last insert query $next = 'insert'; } - if ( (eregi('create', $next)) || (eregi('insert', $next)) || (eregi('drop t', $next)) ) { + if ( (preg_match('/create/i', $next)) || (preg_match('/insert/i', $next)) || (preg_match('/drop t/i', $next)) ) { $next = ''; $sql_array[] = substr($restore_query, 0, $i); $restore_query = ltrim(substr($restore_query, $i+1)); @@ -90,4 +90,4 @@ return false; } } - ?> \ No newline at end of file + ?> diff -Naur xtcommerce.orig/inc/xtc_delete_file.inc.php xtcommerce/inc/xtc_delete_file.inc.php --- xtcommerce.orig/inc/xtc_delete_file.inc.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/inc/xtc_delete_file.inc.php 2010-08-11 15:19:43.000000000 +0200 @@ -19,7 +19,7 @@ $delete= @unlink($file); clearstatcache(); if (@file_exists($file)) { - $filesys=eregi_replace("/","\\",$file); + $filesys=preg_replace("/\//","\\",$file); $delete = @system("del $filesys"); clearstatcache(); if (@file_exists($file)) { @@ -36,4 +36,4 @@ return true; } // end function } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/inc/xtc_parse_search_string.inc.php xtcommerce/inc/xtc_parse_search_string.inc.php --- xtcommerce.orig/inc/xtc_parse_search_string.inc.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/inc/xtc_parse_search_string.inc.php 2010-08-11 15:50:45.000000000 +0200 @@ -19,7 +19,7 @@ $search_str = trim(strtolower($search_str)); // Break up $search_str on whitespace; quoted string will be reconstructed later - $pieces = split('[[:space:]]+', $search_str); + $pieces = preg_split('/[[:space:]]+/', $search_str); $objects = array(); $tmpstring = ''; $flag = ''; @@ -60,7 +60,7 @@ */ // Add this word to the $tmpstring, starting the $tmpstring - $tmpstring = trim(ereg_replace('"', ' ', $pieces[$k])); + $tmpstring = trim(str_replace('"', ' ', $pieces[$k])); // Check for one possible exception to the rule. That there is a single quoted word. if (substr($pieces[$k], -1 ) == '"') { @@ -110,7 +110,7 @@ $piece onto the tail of the string, push the $tmpstring onto the $haves, kill the $tmpstring, turn the $flag "off", and return. */ - $tmpstring .= ' ' . trim(ereg_replace('"', ' ', $pieces[$k])); + $tmpstring .= ' ' . trim(str_replace('"', ' ', $pieces[$k])); // Push the $tmpstring onto the array of stuff to search for $objects[] = trim($tmpstring); @@ -164,4 +164,4 @@ } } - ?> \ No newline at end of file + ?> diff -Naur xtcommerce.orig/inc/xtc_redirect.inc.php xtcommerce/inc/xtc_redirect.inc.php --- xtcommerce.orig/inc/xtc_redirect.inc.php 2005-09-29 21:01:50.000000000 +0200 +++ xtcommerce/inc/xtc_redirect.inc.php 2010-08-11 14:28:09.000000000 +0200 @@ -26,9 +26,9 @@ } } - header('Location: ' . eregi_replace("[\r\n]+(.*)$", "", $url)); + header('Location: ' . preg_replace("/[\r\n]+(.*)$/i", "", $url)); xtc_exit(); } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/inc/xtc_remove_non_numeric.inc.php xtcommerce/inc/xtc_remove_non_numeric.inc.php --- xtcommerce.orig/inc/xtc_remove_non_numeric.inc.php 2005-03-12 21:34:16.000000000 +0100 +++ xtcommerce/inc/xtc_remove_non_numeric.inc.php 2010-08-11 14:27:45.000000000 +0200 @@ -17,7 +17,7 @@ function xtc_remove_non_numeric($var) { - $var=ereg_replace('[^0-9]','',$var); + $var=preg_replace('/[^0-9]/','',$var); return $var; } - ?> \ No newline at end of file + ?> diff -Naur xtcommerce.orig/inc/xtc_Security.inc.php xtcommerce/inc/xtc_Security.inc.php --- xtcommerce.orig/inc/xtc_Security.inc.php 2005-07-14 19:55:10.000000000 +0200 +++ xtcommerce/inc/xtc_Security.inc.php 2010-08-11 15:16:58.000000000 +0200 @@ -53,19 +53,19 @@ //echo '
'; foreach ($_GET as $secvalue) { if (!is_array($secvalue)) { - if ((eregi("<[^>]*script.*\"?[^>]*>", $secvalue)) || - (eregi(".*[[:space:]](or|and)[[:space:]].*(=|like).*", $secvalue)) || - (eregi("<[^>]*object.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*iframe.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*applet.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*meta.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*style.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*form.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*window.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*alert.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*img.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*document.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*cookie.*\"?[^>]*>", $secvalue))) { + if ((preg_match("/<[^>]*script.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/.*[[:space:]](or|and)[[:space:]].*(=|like).*/i", $secvalue)) || + (preg_match("/<[^>]*object.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*iframe.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*applet.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*meta.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*style.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*form.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*window.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*alert.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*img.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*document.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*cookie.*\"?[^>]*>/i", $secvalue))) { xtcMailHackAttempt(__FILE__,__LINE__,'xt:C Security Alert','Intrusion detection.'); xtc_redirect(FILENAME_DEFAULT); } @@ -77,15 +77,15 @@ if ( count($_POST) > 0) { foreach ($_POST as $secvalue) { if (!is_array($secvalue)) { - if ((eregi("<[^>]*script.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*object.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*iframe.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*applet.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*window.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*alert.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*document.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*cookie.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*meta.*\"?[^>]*>", $secvalue)) + if ((preg_match("/<[^>]*script.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*object.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*iframe.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*applet.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*window.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*alert.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*document.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*cookie.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*meta.*\"?[^>]*>/i", $secvalue)) ) { xtcMailHackAttempt(__FILE__,__LINE__,'xt:C Security Alert','Intrusion detection.'); @@ -99,19 +99,19 @@ if ( count($_COOKIE) > 0) { foreach ($_COOKIE as $secvalue) { if (!is_array($secvalue)) { - if ((eregi("<[^>]*script.*\"?[^>]*>", $secvalue)) || - (eregi(".*[[:space:]](or|and)[[:space:]].*(=|like).*", $secvalue)) || - (eregi("<[^>]*object.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*iframe.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*applet.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*meta.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*style.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*form.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*window.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*alert.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*document.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*cookie.*\"?[^>]*>", $secvalue)) || - (eregi("<[^>]*img.*\"?[^>]*>", $secvalue)) + if ((preg_match("/<[^>]*script.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/.*[[:space:]](or|and)[[:space:]].*(=|like).*/i", $secvalue)) || + (preg_match("/<[^>]*object.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*iframe.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*applet.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*meta.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*style.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*form.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*window.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*alert.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*document.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*cookie.*\"?[^>]*>/i", $secvalue)) || + (preg_match("/<[^>]*img.*\"?[^>]*>/i", $secvalue)) ) { xtcMailHackAttempt(__FILE__,__LINE__,'xt:C Security Alert','Intrusion detection.'); @@ -259,4 +259,4 @@ } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/inc/xtc_validate_email.inc.php xtcommerce/inc/xtc_validate_email.inc.php --- xtcommerce.orig/inc/xtc_validate_email.inc.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/inc/xtc_validate_email.inc.php 2010-08-11 15:41:59.000000000 +0200 @@ -49,22 +49,22 @@ function xtc_validate_email($email) { $valid_address = true; - $mail_pat = '^(.+)@(.+)$'; + $mail_pat = '/^(.+)@(.+)$/i'; $valid_chars = "[^] \(\)<>@,;:\.\\\"\[]"; $atom = "$valid_chars+"; $quoted_user='(\"[^\"]*\")'; $word = "($atom|$quoted_user)"; - $user_pat = "^$word(\.$word)*$"; - $ip_domain_pat='^\[([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\]$'; - $domain_pat = "^$atom(\.$atom)*$"; + $user_pat = "/^$word(\.$word)*$/i"; + $ip_domain_pat='/^\[([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\]$/i'; + $domain_pat = "/^$atom(\.$atom)*$/i"; - if (eregi($mail_pat, $email, $components)) { + if (preg_match($mail_pat, $email, $components)) { $user = $components[1]; $domain = $components[2]; // validate user - if (eregi($user_pat, $user)) { + if (preg_match($user_pat, $user)) { // validate domain - if (eregi($ip_domain_pat, $domain, $ip_components)) { + if (preg_match($ip_domain_pat, $domain, $ip_components)) { // this is an IP address for ($i=1;$i<=4;$i++) { if ($ip_components[$i] > 255) { @@ -74,7 +74,7 @@ } } else { // Domain is a name, not an IP - if (eregi($domain_pat, $domain)) { + if (preg_match($domain_pat, $domain)) { /* domain name seems valid, but now make sure that it ends in a valid TLD or ccTLD and that there's a hostname preceding the domain or country. */ $domain_components = explode(".", $domain); @@ -84,7 +84,7 @@ } else { $top_level_domain = strtolower($domain_components[sizeof($domain_components)-1]); // Allow all 2-letter TLDs (ccTLDs) - if (eregi('^[a-z][a-z]$', $top_level_domain) != 1) { + if (preg_match('/^[a-z][a-z]$/i', $top_level_domain) != 1) { $tld_pattern = ''; // Get authorized TLDs from text file $tlds = file(DIR_FS_INC.'tld.txt'); @@ -93,13 +93,13 @@ $words = explode('#', $line); $tld = trim($words[0]); // TLDs should be 3 letters or more - if (eregi('^[a-z]{3,}$', $tld) == 1) { + if (preg_match('/^[a-z]{3,}$/i', $tld) == 1) { $tld_pattern .= '^' . $tld . '$|'; } } // Remove last '|' $tld_pattern = substr($tld_pattern, 0, -1); - if (eregi("$tld_pattern", $top_level_domain) == 0) { + if (preg_match("/$tld_pattern/i", $top_level_domain) == 0) { $valid_address = false; } } @@ -122,4 +122,4 @@ return $valid_address; } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/inc/xtc_word_count.inc.php xtcommerce/inc/xtc_word_count.inc.php --- xtcommerce.orig/inc/xtc_word_count.inc.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/inc/xtc_word_count.inc.php 2010-08-11 14:27:27.000000000 +0200 @@ -17,8 +17,8 @@ // Get the number of times a word/character is present in a string function xtc_word_count($string, $needle) { - $temp_array = split($needle, $string); + $temp_array = explode($needle, $string); return sizeof($temp_array); } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/classes/afterbuy.php xtcommerce/includes/classes/afterbuy.php --- xtcommerce.orig/includes/classes/afterbuy.php 2005-10-07 12:41:04.000000000 +0200 +++ xtcommerce/includes/classes/afterbuy.php 2010-08-11 15:31:45.000000000 +0200 @@ -68,9 +68,9 @@ $customer['firma'] = $oData['billing_company']; $customer['vorname'] = $oData['billing_firstname']; $customer['nachname'] = $oData['billing_lastname']; - $customer['strasse'] = ereg_replace(" ", "%20", $oData['billing_street_address']); + $customer['strasse'] = preg_replace("/ /", "%20", $oData['billing_street_address']); $customer['plz'] = $oData['billing_postcode']; - $customer['ort'] = ereg_replace(" ", "%20", $oData['billing_city']); + $customer['ort'] = preg_replace("/ /", "%20", $oData['billing_city']); $customer['tel'] = $oData['billing_telephone']; $customer['fax'] = ""; $customer['mail'] = $oData['customers_email_address']; @@ -92,9 +92,9 @@ $customer['d_firma'] = $oData['delivery_company']; $customer['d_vorname'] = $oData['delivery_firstname']; $customer['d_nachname'] = $oData['delivery_lastname']; - $customer['d_strasse'] = ereg_replace(" ", "%20", $oData['delivery_street_address']); + $customer['d_strasse'] = preg_replace("/ /", "%20", $oData['delivery_street_address']); $customer['d_plz'] = $oData['delivery_postcode']; - $customer['d_ort'] = ereg_replace(" ", "%20", $oData['delivery_city']); + $customer['d_ort'] = preg_replace("/ /", "%20", $oData['delivery_city']); $customer['d_land'] = $oData['delivery_country_iso_code_2']; // get products related to order @@ -138,12 +138,12 @@ if ($artnr == '') $artnr = $pDATA['products_id']; $DATAstring .= "Artikelnr_".$nr."=".$artnr."&"; - $DATAstring .= "Artikelname_".$nr."=".ereg_replace("&", "%38", ereg_replace("\"", "", ereg_replace(" ", "%20", $pDATA['products_name'])))."&"; + $DATAstring .= "Artikelname_".$nr."=".preg_replace("/&/", "%38", preg_replace("/\"/", "", preg_replace("/ /", "%20", $pDATA['products_name'])))."&"; if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 1) $pDATA['products_price']+=$pDATA['products_tax']; if ($_SESSION['customers_status']['customers_status_show_price_tax'] == 0 && $_SESSION['customers_status']['customers_status_add_tax_ot'] == 0) $pDATA['products_tax']=0; - $price = ereg_replace("\.", ",", $pDATA['products_price']); - $tax = ereg_replace("\.", ",", $pDATA['products_tax']); + $price = preg_replace("/\./", ",", $pDATA['products_price']); + $tax = preg_replace("/\./", ",", $pDATA['products_tax']); $DATAstring .= "ArtikelEPreis_".$nr."=".$price."&"; $DATAstring .= "ArtikelMwst_".$nr."=".$tax."&"; @@ -218,7 +218,7 @@ $nr ++; $DATAstring .= "Artikelnr_".$nr."=99999999&"; $DATAstring .= "Artikelname_".$nr."=Nachname&"; - $cod_fee = ereg_replace("\.", ",", $cod_fee); + $cod_fee = preg_replace("/\./", ",", $cod_fee); $DATAstring .= "ArtikelEPreis_".$nr."=".$cod_fee."&"; $DATAstring .= "ArtikelMwst_".$nr."=".$tax."&"; $DATAstring .= "ArtikelMenge_".$nr."=1&"; @@ -230,7 +230,7 @@ $nr ++; $DATAstring .= "Artikelnr_".$nr."=99999998&"; $DATAstring .= "Artikelname_".$nr."=Rabatt&"; - $discount = ereg_replace("\.", ",", $discount); + $discount = preg_replace("/\./", ",", $discount); $DATAstring .= "ArtikelEPreis_".$nr."=".$discount."&"; $DATAstring .= "ArtikelMwst_".$nr."=".$tax."&"; $DATAstring .= "ArtikelMenge_".$nr."=1&"; @@ -241,7 +241,7 @@ $nr ++; $DATAstring .= "Artikelnr_".$nr."=99999997&"; $DATAstring .= "Artikelname_".$nr."=Gutschein&"; - $gv = ereg_replace("\.", ",", ($gv * (-1))); + $gv = preg_replace("/\./", ",", ($gv * (-1))); $DATAstring .= "ArtikelEPreis_".$nr."=".$gv."&"; $DATAstring .= "ArtikelMwst_".$nr."=0&"; $DATAstring .= "ArtikelMenge_".$nr."=1&"; @@ -252,7 +252,7 @@ $nr ++; $DATAstring .= "Artikelnr_".$nr."=99999996&"; $DATAstring .= "Artikelname_".$nr."=Kupon&"; - $coupon = ereg_replace("\.", ",", ($coupon * (-1))); + $coupon = preg_replace("/\./", ",", ($coupon * (-1))); $DATAstring .= "ArtikelEPreis_".$nr."=".$coupon."&"; $DATAstring .= "ArtikelMwst_".$nr."=0&"; $DATAstring .= "ArtikelMenge_".$nr."=1&"; @@ -261,7 +261,7 @@ $DATAstring .= "PosAnz=".$p_count."&"; - $vK = ereg_replace("\.", ",", $shipping); + $vK = preg_replace("/\./", ",", $shipping); if ($oData['payment_method'] == 'cod') $oData['payment_method'] = 'Nachnahme'; @@ -295,7 +295,7 @@ curl_setopt($ch, CURLOPT_POSTFIELDS, $DATAstring); $result = curl_exec($ch); - if (ereg("1", $result)) { + if (preg_match("/1<\/success>/", $result)) { // result ok, mark order // extract ID from result $cdr = explode('', $result); @@ -332,4 +332,4 @@ } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/classes/banktransfer_validation.php xtcommerce/includes/classes/banktransfer_validation.php --- xtcommerce.orig/includes/classes/banktransfer_validation.php 2006-05-10 20:04:32.000000000 +0200 +++ xtcommerce/includes/classes/banktransfer_validation.php 2010-08-11 15:14:22.000000000 +0200 @@ -2085,8 +2085,8 @@ /* -------- Dies ist die wichtigste function ---------- */ function CheckAccount($banktransfer_number, $banktransfer_blz) { - $KontoNR = ereg_replace('[^0-9]', '', $banktransfer_number); - $BLZ = ereg_replace('[^0-9]', '', $banktransfer_blz); + $KontoNR = preg_replace('/[^0-9]/', '', $banktransfer_number); + $BLZ = preg_replace('/[^0-9]/', '', $banktransfer_blz); $Result = 0; if ($BLZ == '' || strlen($BLZ) < 8) { @@ -2133,4 +2133,4 @@ return $Result; } /* End of CheckAccount */ } /* End Class AccountCheck */ -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/classes/cc_validation.php xtcommerce/includes/classes/cc_validation.php --- xtcommerce.orig/includes/classes/cc_validation.php 2005-07-17 17:25:32.000000000 +0200 +++ xtcommerce/includes/classes/cc_validation.php 2010-08-11 14:09:06.000000000 +0200 @@ -20,39 +20,39 @@ var $cc_type, $cc_number, $cc_expiry_month, $cc_expiry_year; function validate($number, $expiry_m, $expiry_y) { - $this->cc_number = ereg_replace('[^0-9]', '', $number); + $this->cc_number = preg_replace('/[^0-9]/', '', $number); - if (ereg('^4[0-9]{12}([0-9]{3})?$', $this->cc_number)) { + if (preg_match('/^4[0-9]{12}([0-9]{3})?$/', $this->cc_number)) { $this->cc_type = 'Visa'; if (strtolower(MODULE_PAYMENT_CC_ACCEPT_VISA) != 'true') return -8; } - elseif (ereg('^5[1-5][0-9]{14}$', $this->cc_number)) { + elseif (preg_match('/^5[1-5][0-9]{14}$/', $this->cc_number)) { $this->cc_type = 'Master Card'; if (strtolower(MODULE_PAYMENT_CC_ACCEPT_MASTERCARD) != 'true') return -8; } - elseif (ereg('^3[47][0-9]{13}$', $this->cc_number)) { + elseif (preg_match('/^3[47][0-9]{13}$/', $this->cc_number)) { $this->cc_type = 'American Express'; if (strtolower(MODULE_PAYMENT_CC_ACCEPT_AMERICANEXPRESS) != 'true') return -8; } - elseif (ereg('^3(0[0-5]|[68][0-9])[0-9]{11}$', $this->cc_number)) { + elseif (preg_match('/^3(0[0-5]|[68][0-9])[0-9]{11}$/', $this->cc_number)) { $this->cc_type = 'Diners Club'; if (strtolower(MODULE_PAYMENT_CC_ACCEPT_DINERSCLUB) != 'true') return -8; } - elseif (ereg('^6011[0-9]{12}$', $this->cc_number)) { + elseif (preg_match('/^6011[0-9]{12}$/', $this->cc_number)) { $this->cc_type = 'Discover'; if (strtolower(MODULE_PAYMENT_CC_ACCEPT_DISCOVERNOVUS) != 'true') return -8; } - elseif (ereg('^(3[0-9]{4}|2131|1800)[0-9]{11}$', $this->cc_number)) { + elseif (preg_match('/^(3[0-9]{4}|2131|1800)[0-9]{11}$/', $this->cc_number)) { $this->cc_type = 'JCB'; if (strtolower(MODULE_PAYMENT_CC_ACCEPT_JCB) != 'true') return -8; } - elseif (ereg('^5610[0-9]{12}$', $this->cc_number)) { + elseif (preg_match('/^5610[0-9]{12}$/', $this->cc_number)) { $this->cc_type = 'Australian BankCard'; if (strtolower(MODULE_PAYMENT_CC_ACCEPT_OZBANKCARD) != 'true') return -8; @@ -109,4 +109,4 @@ return ($numSum % 10 == 0); } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/classes/class.inputfilter.php xtcommerce/includes/classes/class.inputfilter.php --- xtcommerce.orig/includes/classes/class.inputfilter.php 2007-05-25 12:21:32.000000000 +0200 +++ xtcommerce/includes/classes/class.inputfilter.php 2010-08-11 14:50:16.000000000 +0200 @@ -228,7 +228,7 @@ $attrSubSet = explode('=', trim($attrSet[$i])); list ($attrSubSet[0]) = explode(' ', $attrSubSet[0]); // removes all "non-regular" attr names AND also attr blacklisted - if ((!eregi("^[a-z]*$", $attrSubSet[0])) || (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist)) || (substr($attrSubSet[0], 0, 2) == 'on')))) + if ((!preg_match("/^[a-z]*$/i", $attrSubSet[0])) || (($this->xssAuto) && ((in_array(strtolower($attrSubSet[0]), $this->attrBlacklist)) || (substr($attrSubSet[0], 0, 2) == 'on')))) continue; // xss attr value filtering if ($attrSubSet[1]) { @@ -348,4 +348,4 @@ return $string; } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/classes/http_client.php xtcommerce/includes/classes/http_client.php --- xtcommerce.orig/includes/classes/http_client.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/includes/classes/http_client.php 2010-08-11 14:09:32.000000000 +0200 @@ -390,7 +390,7 @@ $str = fgets($this->socket, 1024); $finished = ($str == $lastLine); if (!$finished) { - list($hdr, $value) = split(': ', $str, 2); + list($hdr, $value) = explode(': ', $str, 2); // nasty workaround broken multiple same headers (eg. Set-Cookie headers) @FIXME if (isset($headers[$hdr])) { $headers[$hdr] .= '; ' . trim($value); @@ -460,4 +460,4 @@ return $requesturi; } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/classes/language.php xtcommerce/includes/classes/language.php --- xtcommerce.orig/includes/classes/language.php 2005-05-27 19:27:02.000000000 +0200 +++ xtcommerce/includes/classes/language.php 2010-08-11 14:10:26.000000000 +0200 @@ -93,7 +93,7 @@ for ($i=0, $n=sizeof($this->browser_languages); $i<$n; $i++) { reset($this->languages); while (list($key, $value) = each($this->languages)) { - if (eregi('^(' . $value[0] . ')(;q=[0-9]\\.[0-9])?$', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { + if (preg_match('/^(' . $value[0] . ')(;q=[0-9]\\.[0-9])?$/i', $this->browser_languages[$i]) && isset($this->catalog_languages[$key])) { $this->language = $this->catalog_languages[$key]; break 2; } @@ -101,4 +101,4 @@ } } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/classes/sessions.php xtcommerce/includes/classes/sessions.php --- xtcommerce.orig/includes/classes/sessions.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/includes/classes/sessions.php 2010-08-11 14:23:27.000000000 +0200 @@ -386,7 +386,7 @@ // '=' to allow URLs of the form // http://yoursite/=/script.php if (empty($session->id)) { - eregi($session->name . '=([^/]+)', $GLOBALS['REQUEST_URI'], $regs); + preg_match('/' . $session->name . '=([^/]+)/i', $GLOBALS['REQUEST_URI'], $regs); $regs[1] = trim($regs[1]); if (!empty($regs[1])) { $session->id = $regs[1]; @@ -516,4 +516,4 @@ } register_shutdown_function('session_close'); -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/classes/shopping_cart.php xtcommerce/includes/classes/shopping_cart.php --- xtcommerce.orig/includes/classes/shopping_cart.php 2006-08-20 21:39:44.000000000 +0200 +++ xtcommerce/includes/classes/shopping_cart.php 2010-08-11 15:32:07.000000000 +0200 @@ -461,7 +461,7 @@ $no_count = false; $gv_query = xtc_db_query("select products_model from ".TABLE_PRODUCTS." where products_id = '".$products_id."'"); $gv_result = xtc_db_fetch_array($gv_query); - if (ereg('^GIFT', $gv_result['products_model'])) { + if (preg_match('/^GIFT/', $gv_result['products_model'])) { $no_count = true; } if (NO_COUNT_ZERO_WEIGHT == 1) { @@ -480,4 +480,4 @@ // ------------------------ ICW CREDIT CLASS Gift Voucher Addittion-------------------------------End //GV Code End } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/classes/Smarty_2.6.14/plugins/function.fetch.php xtcommerce/includes/classes/Smarty_2.6.14/plugins/function.fetch.php --- xtcommerce.orig/includes/classes/Smarty_2.6.14/plugins/function.fetch.php 2005-10-11 18:22:56.000000000 +0200 +++ xtcommerce/includes/classes/Smarty_2.6.14/plugins/function.fetch.php 2010-08-11 15:28:37.000000000 +0200 @@ -181,12 +181,12 @@ $content .= fgets($fp,4096); } fclose($fp); - $csplit = split("\r\n\r\n",$content,2); + $csplit = explode("\r\n\r\n",$content,2); $content = $csplit[1]; if(!empty($params['assign_headers'])) { - $smarty->assign($params['assign_headers'],split("\r\n",$csplit[0])); + $smarty->assign($params['assign_headers'],explode("\r\n",$csplit[0])); } } } else { diff -Naur xtcommerce.orig/includes/econda/econda.php xtcommerce/includes/econda/econda.php --- xtcommerce.orig/includes/econda/econda.php 2006-08-02 21:47:21.000000000 +0200 +++ xtcommerce/includes/econda/econda.php 2010-08-11 15:29:09.000000000 +0200 @@ -87,7 +87,7 @@ } // $current_page = basename($PHP_SELF); -// $current_page = split('\?', basename($_SERVER['PHP_SELF'])); $current_page = $current_page[0]; // for BadBlue(Win32) webserver compatibility +// $current_page = explode('?', basename($_SERVER['PHP_SELF'])); $current_page = $current_page[0]; // for BadBlue(Win32) webserver compatibility $current_page = join('',preg_grep("/.+\.php$/", preg_split("/\?|\//", $_SERVER['PHP_SELF']))); switch ($current_page) { case FILENAME_PRODUCT_INFO: diff -Naur xtcommerce.orig/includes/functions/compatibility.php xtcommerce/includes/functions/compatibility.php --- xtcommerce.orig/includes/functions/compatibility.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/includes/functions/compatibility.php 2010-08-11 15:20:54.000000000 +0200 @@ -115,7 +115,7 @@ if (!function_exists('is_numeric')) { function is_numeric($param) { - return ereg('^[0-9]{1,50}.?[0-9]{0,50}$', $param); + return preg_match('/^[0-9]{1,50}.?[0-9]{0,50}$/', $param); } } @@ -165,7 +165,7 @@ if(xtc_not_null($host) && xtc_not_null($type)) { @exec("nslookup -type=$type $host", $output); while(list($k, $line) = each($output)) { - if(eregi("^$host", $line)) { + if(preg_match("/^$host/i", $line)) { return true; } } @@ -173,4 +173,4 @@ return false; } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/functions/sessions.php xtcommerce/includes/functions/sessions.php --- xtcommerce.orig/includes/functions/sessions.php 2005-08-28 23:10:52.000000000 +0200 +++ xtcommerce/includes/functions/sessions.php 2010-08-11 15:57:51.000000000 +0200 @@ -80,16 +80,22 @@ global $session_started; if ($session_started == true) { - return session_register($variable); + if (isset($GLOBALS[$variable])) + $_SESSION[$variable] =& $GLOBALS[$variable]; + else + $_SESSION[$variable] = null; } } function xtc_session_is_registered($variable) { - return session_is_registered($variable); + return array_key_exists($variable, $_SESSION); } function xtc_session_unregister($variable) { - return session_unregister($variable); + if (!xtc_session_is_registered($variable)) + return false; + unset($_SESSION[$variable]); + return true; } function xtc_session_id($sessid = '') { @@ -144,4 +150,4 @@ unset($session_backup); } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/iclear/nusoap.php xtcommerce/includes/iclear/nusoap.php --- xtcommerce.orig/includes/iclear/nusoap.php 2006-07-27 19:07:12.000000000 +0200 +++ xtcommerce/includes/iclear/nusoap.php 2010-08-11 15:59:29.000000000 +0200 @@ -503,7 +503,7 @@ case (is_array($val) || $type): // detect if struct or array $valueType = $this->isArraySimpleOrStruct($val); - if($valueType=='arraySimple' || ereg('^ArrayOf',$type)){ + if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){ $i = 0; if(is_array($val) && count($val)> 0){ foreach($val as $v){ @@ -698,7 +698,7 @@ */ function expandQname($qname){ // get element prefix - if(strpos($qname,':') && !ereg('^http://',$qname)){ + if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){ // get unqualified name $name = substr(strstr($qname,':'),1); // get ns prefix @@ -826,7 +826,7 @@ function timestamp_to_iso8601($timestamp,$utc=true){ $datestr = date('Y-m-d\TH:i:sO',$timestamp); if($utc){ - $eregStr = + $regStr = '([0-9]{4})-'. // centuries & years CCYY- '([0-9]{2})-'. // months MM- '([0-9]{2})'. // days DD @@ -836,7 +836,7 @@ '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's - if(ereg($eregStr,$datestr,$regs)){ + if(preg_match('/'.$regStr.'/',$datestr,$regs)){ return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]); } return false; @@ -852,7 +852,7 @@ * @access public */ function iso8601_to_timestamp($datestr){ - $eregStr = + $regStr = '([0-9]{4})-'. // centuries & years CCYY- '([0-9]{2})-'. // months MM- '([0-9]{2})'. // days DD @@ -861,7 +861,7 @@ '([0-9]{2}):'. // minutes mm: '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's - if(ereg($eregStr,$datestr,$regs)){ + if(preg_match('/'.$regStr.'/',$datestr,$regs)){ // not utc if($regs[8] != 'Z'){ $op = substr($regs[8],0,1); @@ -1171,7 +1171,7 @@ if(count($attrs) > 0){ foreach($attrs as $k => $v){ // if ns declarations, add to class level array of valid namespaces - if(ereg("^xmlns",$k)){ + if(preg_match("/^xmlns/",$k)){ //$this->xdebug("$k: $v"); //$this->xdebug('ns_prefix: '.$this->getPrefix($k)); if($ns_prefix = substr(strrchr($k,':'),1)){ @@ -1281,7 +1281,7 @@ // minOccurs="0" maxOccurs="unbounded" /> // // - if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { @@ -1300,7 +1300,7 @@ // minOccurs="0" maxOccurs="unbounded" /> // // - if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { @@ -1698,7 +1698,7 @@ } elseif(isset($this->attributes[$type])){ $this->xdebug("in getTypeDef, found attribute $type"); return $this->attributes[$type]; - } elseif (ereg('_ContainedType$', $type)) { + } elseif (preg_match('/_ContainedType$/', $type)) { $this->xdebug("in getTypeDef, have an untyped element $type"); $typeDef['typeClass'] = 'simpleType'; $typeDef['phpType'] = 'scalar'; @@ -2041,7 +2041,7 @@ function soap_transport_http($url){ parent::nusoap_base(); $this->setURL($url); - ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); $this->outgoing_headers['User-Agent'] = $this->title.'/'.$this->version.' ('.$rev[1].')'; $this->debug('set User-Agent: ' . $this->outgoing_headers['User-Agent']); } @@ -2580,7 +2580,7 @@ } } // remove 100 header - if(isset($lb) && ereg('^HTTP/1.1 100',$data)){ + if(isset($lb) && preg_match('/^HTTP\/1\.1 100/',$data)){ unset($lb); $data = ''; }// @@ -2733,7 +2733,7 @@ curl_close($this->ch); // remove 100 header(s) - while (ereg('^HTTP/1.1 100',$data)) { + while (preg_match('/^HTTP\/1\.1 100/',$data)) { if ($pos = strpos($data,"\r\n\r\n")) { $data = ltrim(substr($data,$pos)); } elseif($pos = strpos($data,"\n\n") ) { @@ -2924,7 +2924,7 @@ */ function parseCookie($cookie_str) { $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; - $data = split(';', $cookie_str); + $data = explode(';', $cookie_str); $value_str = $data[0]; $cookie_param = 'domain='; @@ -3267,7 +3267,7 @@ } $this->debug("In service, query string=$qs"); - if (ereg('wsdl', $qs) ){ + if (preg_match('/wsdl/', $qs) ){ $this->debug("In service, this is a request for WSDL"); if($this->externalWSDLURL){ if (strpos($this->externalWSDLURL,"://")!==false) { // assume URL @@ -3338,7 +3338,7 @@ // get the character encoding of the incoming request if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){ $enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1)); - if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -3367,7 +3367,7 @@ $enc = substr(strstr($v, '='), 1); $enc = str_replace('"', '', $enc); $enc = str_replace('\\', '', $enc); - if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) { + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) { $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -3401,7 +3401,7 @@ $enc = substr(strstr($v, '='), 1); $enc = str_replace('"', '', $enc); $enc = str_replace('\\', '', $enc); - if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) { + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) { $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -3730,7 +3730,7 @@ $payload .= $this->getDebugAsXMLComment(); } $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; - ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; // Let the Web server decide about this //$this->outgoing_headers[] = "Connection: Close\r\n"; @@ -3818,7 +3818,7 @@ if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); - if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -4336,7 +4336,7 @@ $this->currentSchema->schemaStartElement($parser, $name, $attrs); $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); - } elseif (ereg('schema$', $name)) { + } elseif (preg_match('/schema$/', $name)) { $this->debug('Parsing WSDL schema'); // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")"); $this->status = 'schema'; @@ -4355,7 +4355,7 @@ if (count($attrs) > 0) { // register namespace declarations foreach($attrs as $k => $v) { - if (ereg("^xmlns", $k)) { + if (preg_match("/^xmlns/", $k)) { if ($ns_prefix = substr(strrchr($k, ':'), 1)) { $this->namespaces[$ns_prefix] = $v; } else { @@ -4380,7 +4380,7 @@ $attrs = array(); } // get element prefix, namespace and name - if (ereg(':', $name)) { + if (preg_match('/:/', $name)) { // get ns prefix $prefix = substr($name, 0, strpos($name, ':')); // get ns @@ -4545,7 +4545,7 @@ */ function end_element($parser, $name){ // unset schema status - if (/*ereg('types$', $name) ||*/ ereg('schema$', $name)) { + if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) { $this->status = ""; $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); @@ -5995,7 +5995,7 @@ $key_localpart = $this->getLocalPart($key); // if ns declarations, add to class level array of valid namespaces if($key_prefix == 'xmlns'){ - if(ereg('^http://www.w3.org/[0-9]{4}/XMLSchema$',$value)){ + if(preg_match('/^http:\/\/www\.w3\.org\/[0-9]{4}\/XMLSchema$/',$value)){ $this->XMLSchemaVersion = $value; $this->namespaces['xsd'] = $this->XMLSchemaVersion; $this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance'; @@ -6023,7 +6023,7 @@ } } elseif($key_localpart == 'arrayType'){ $this->message[$pos]['type'] = 'array'; - /* do arrayType ereg here + /* do arrayType regex here [1] arrayTypeValue ::= atype asize [2] atype ::= QName rank* [3] rank ::= '[' (',')* ']' @@ -6031,8 +6031,8 @@ [5] length ::= nextDimension* Digit+ [6] nextDimension ::= Digit+ ',' */ - $expr = '([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]'; - if(ereg($expr,$value,$regs)){ + $expr = '/([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]/'; + if(preg_match($expr,$value,$regs)){ $this->message[$pos]['typePrefix'] = $regs[1]; $this->message[$pos]['arrayTypePrefix'] = $regs[1]; if (isset($this->namespaces[$regs[1]])) { @@ -6510,7 +6510,7 @@ // instantiate wsdl object and parse wsdl file $this->debug('instantiating wsdl class with doc: '.$endpoint); - $this->wsdl =& new wsdl($this->wsdlFile,$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout); + $this->wsdl = new wsdl($this->wsdlFile,$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout); } $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); @@ -6758,7 +6758,7 @@ // detect transport switch(true){ // http(s) - case ereg('^http',$this->endpoint): + case preg_match('/^http/',$this->endpoint): $this->debug('transporting via HTTP'); if($this->persistentConnection == true && is_object($this->persistentConnection)){ $http =& $this->persistentConnection; @@ -6780,10 +6780,10 @@ $http->setEncoding($this->http_encoding); } $this->debug('sending message, length='.strlen($msg)); - if(ereg('^http:',$this->endpoint)){ + if(preg_match('/^http:/',$this->endpoint)){ //if(strpos($this->endpoint,'http:')){ $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies); - } elseif(ereg('^https',$this->endpoint)){ + } elseif(preg_match('/^https/',$this->endpoint)){ //} elseif(strpos($this->endpoint,'https:')){ //if(phpversion() == '4.3.0-dev'){ //$response = $http->send($msg,$timeout,$response_timeout); @@ -6841,7 +6841,7 @@ if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); - if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; diff -Naur xtcommerce.orig/includes/modules/default.php xtcommerce/includes/modules/default.php --- xtcommerce.orig/includes/modules/default.php 2008-02-24 14:02:27.000000000 +0100 +++ xtcommerce/includes/modules/default.php 2010-08-11 15:40:27.000000000 +0200 @@ -57,7 +57,7 @@ $category = xtc_db_fetch_array($category_query, true); - if (isset ($cPath) && ereg('_', $cPath)) { + if (isset ($cPath) && preg_match('/_/', $cPath)) { // check to see if there are deeper categories within the current category $category_links = array_reverse($cPath_array); for ($i = 0, $n = sizeof($category_links); $i < $n; $i ++) { @@ -417,4 +417,4 @@ $smarty->assign('main_content', $main_content); } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/modules/order_total/ot_cod_fee.php xtcommerce/includes/modules/order_total/ot_cod_fee.php --- xtcommerce.orig/includes/modules/order_total/ot_cod_fee.php 2005-07-10 18:11:38.000000000 +0200 +++ xtcommerce/includes/modules/order_total/ot_cod_fee.php 2010-08-11 15:23:49.000000000 +0200 @@ -55,34 +55,34 @@ //check if payment method is cod. If yes, check if cod is possible. if ($_SESSION['payment'] == 'cod') { //process installed shipping modules - if ($_SESSION['shipping']['id'] == 'flat_flat') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_FLAT); - if ($_SESSION['shipping']['id'] == 'item_item') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_ITEM); - if ($_SESSION['shipping']['id'] == 'table_table') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_TABLE); - if ($_SESSION['shipping']['id'] == 'zones_zones') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_ZONES); - if ($_SESSION['shipping']['id'] == 'ap_ap') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_AP); - if ($_SESSION['shipping']['id'] == 'dp_dp') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DP); + if ($_SESSION['shipping']['id'] == 'flat_flat') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_FLAT); + if ($_SESSION['shipping']['id'] == 'item_item') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_ITEM); + if ($_SESSION['shipping']['id'] == 'table_table') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_TABLE); + if ($_SESSION['shipping']['id'] == 'zones_zones') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_ZONES); + if ($_SESSION['shipping']['id'] == 'ap_ap') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_AP); + if ($_SESSION['shipping']['id'] == 'dp_dp') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DP); // module chp - if ($_SESSION['shipping']['id'] == 'chp_ECO') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_CHP); - if ($_SESSION['shipping']['id'] == 'chp_PRI') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_CHP); - if ($_SESSION['shipping']['id'] == 'chp_URG') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_CHP); + if ($_SESSION['shipping']['id'] == 'chp_ECO') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_CHP); + if ($_SESSION['shipping']['id'] == 'chp_PRI') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_CHP); + if ($_SESSION['shipping']['id'] == 'chp_URG') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_CHP); // module chronopost - if ($_SESSION['shipping']['id'] == 'chronopost_chronopost') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_CHRONOPOST); + if ($_SESSION['shipping']['id'] == 'chronopost_chronopost') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_CHRONOPOST); // module DHL - if ($_SESSION['shipping']['id'] == 'dhl_ECX') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DHL); - if ($_SESSION['shipping']['id'] == 'dhl_DOX') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DHL); - if ($_SESSION['shipping']['id'] == 'dhl_SDX') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DHL); - if ($_SESSION['shipping']['id'] == 'dhl_MDX') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DHL); - if ($_SESSION['shipping']['id'] == 'dhl_WPX') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DHL); + if ($_SESSION['shipping']['id'] == 'dhl_ECX') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DHL); + if ($_SESSION['shipping']['id'] == 'dhl_DOX') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DHL); + if ($_SESSION['shipping']['id'] == 'dhl_SDX') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DHL); + if ($_SESSION['shipping']['id'] == 'dhl_MDX') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DHL); + if ($_SESSION['shipping']['id'] == 'dhl_WPX') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DHL); // UPS - if ($_SESSION['shipping']['id'] == 'ups_ups') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_UPS); - if ($_SESSION['shipping']['id'] == 'upse_upse') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_UPSE); + if ($_SESSION['shipping']['id'] == 'ups_ups') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_UPS); + if ($_SESSION['shipping']['id'] == 'upse_upse') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_UPSE); // Free Shipping - if ($_SESSION['shipping']['id'] == 'free_free') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_FREE); - if ($_SESSION['shipping']['id'] == 'freeamount_freeamount') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_FREEAMOUNT_FREE); + if ($_SESSION['shipping']['id'] == 'free_free') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_FREE); + if ($_SESSION['shipping']['id'] == 'freeamount_freeamount') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_FREEAMOUNT_FREE); for ($i = 0; $i < count($cod_zones); $i++) { @@ -189,4 +189,4 @@ xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/modules/order_total/ot_coupon.php xtcommerce/includes/modules/order_total/ot_coupon.php --- xtcommerce.orig/includes/modules/order_total/ot_coupon.php 2006-06-03 16:41:52.000000000 +0200 +++ xtcommerce/includes/modules/order_total/ot_coupon.php 2010-08-11 15:37:55.000000000 +0200 @@ -174,7 +174,7 @@ for ($i = 0; $i < sizeof($order->products); $i ++) { if ($get_result['restrict_to_products']) { - $pr_ids = split("[,]", $get_result['restrict_to_products']); + $pr_ids = explode(",", $get_result['restrict_to_products']); for ($ii = 0; $p < count($pr_ids); $ii ++) { if ($pr_ids[$ii] == xtc_get_prid($order->products[$i]['id'])) { if ($get_result['coupon_type'] == 'P') { @@ -190,10 +190,10 @@ } } } else { - $cat_ids = split("[,]", $get_result['restrict_to_categories']); + $cat_ids = explode(",", $get_result['restrict_to_categories']); for ($i = 0; $i < sizeof($order->products); $i ++) { $my_path = xtc_get_product_path(xtc_get_prid($order->products[$i]['id'])); - $sub_cat_ids = split("[_]", $my_path); + $sub_cat_ids = explode("_", $my_path); for ($iii = 0; $iii < count($sub_cat_ids); $iii ++) { for ($ii = 0; $ii < count($cat_ids); $ii ++) { if ($sub_cat_ids[$iii] == $cat_ids[$ii]) { @@ -262,7 +262,7 @@ if ($get_result['restrict_to_products']) { - $pr_ids = split("[,]", $get_result['restrict_to_products']); + $pr_ids = explode(",", $get_result['restrict_to_products']); for ($p = 0; $p < sizeof($pr_ids); $p ++) { if ($pr_ids[$p] == $t_prid) $valid_product = true; @@ -271,9 +271,9 @@ if ($get_result['restrict_to_categories']) { // v5.13a Tanaka 2005-4-30: New code, this correctly identifies valid products in subcategories - $cat_ids = split("[,]", $get_result['restrict_to_categories']); + $cat_ids = explode(",", $get_result['restrict_to_categories']); $my_path = xtc_get_product_path($t_prid); - $sub_cat_ids = split("[_]", $my_path); + $sub_cat_ids = explode("_", $my_path); for ($iii = 0; $iii < count($sub_cat_ids); $iii++) { for ($ii = 0; $ii < count($cat_ids); $ii++) { if ($sub_cat_ids[$iii] == $cat_ids[$ii]) { @@ -401,7 +401,7 @@ $t_prid = xtc_get_prid($products[$i]['id']); $gv_query = xtc_db_query("select products_price, products_tax_class_id, products_model from ".TABLE_PRODUCTS." where products_id = '".$t_prid."'"); $gv_result = xtc_db_fetch_array($gv_query); - if (ereg('^GIFT', addslashes($gv_result['products_model']))) { + if (preg_match('/^GIFT/', addslashes($gv_result['products_model']))) { $qty = $_SESSION['cart']->get_quantity($t_prid); $products_tax = $xtPrice->TAX[$gv_result['products_tax_class_id']]; if ($this->include_tax == 'false') { @@ -426,7 +426,7 @@ $get_result = xtc_db_fetch_array($coupon_get); $in_cat = true; if ($get_result['restrict_to_categories']) { - $cat_ids = split("[,]", $get_result['restrict_to_categories']); + $cat_ids = explode(",", $get_result['restrict_to_categories']); $in_cat = false; for ($i = 0; $i < count($cat_ids); $i ++) { if (is_array($this->contents)) { @@ -444,7 +444,7 @@ $in_cart = true; if ($get_result['restrict_to_products']) { - $pr_ids = split("[,]", $get_result['restrict_to_products']); + $pr_ids = explode(",", $get_result['restrict_to_products']); $in_cart = false; $products_array = $_SESSION['cart']->get_products(); diff -Naur xtcommerce.orig/includes/modules/order_total/ot_gv.php xtcommerce/includes/modules/order_total/ot_gv.php --- xtcommerce.orig/includes/modules/order_total/ot_gv.php 2005-08-26 17:16:32.000000000 +0200 +++ xtcommerce/includes/modules/order_total/ot_gv.php 2010-08-11 15:37:23.000000000 +0200 @@ -132,7 +132,7 @@ function update_credit_account($i) { global $order, $insert_id, $REMOTE_ADDR; - if (ereg('^GIFT', addslashes($order->products[$i]['model']))) { + if (preg_match('/^GIFT/', addslashes($order->products[$i]['model']))) { $gv_order_amount = ($order->products[$i]['final_price']); if ($this->credit_tax == 'true') $gv_order_amount = $gv_order_amount * (100 + $order->products[$i]['tax']) / 100; @@ -340,4 +340,4 @@ xtc_db_query("delete from ".TABLE_CONFIGURATION." where configuration_key in ('".implode("', '", $this->keys())."')"); } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/modules/order_total/ot_ps_fee.php xtcommerce/includes/modules/order_total/ot_ps_fee.php --- xtcommerce.orig/includes/modules/order_total/ot_ps_fee.php 2005-07-10 18:11:38.000000000 +0200 +++ xtcommerce/includes/modules/order_total/ot_ps_fee.php 2010-08-11 15:36:35.000000000 +0200 @@ -61,12 +61,12 @@ if ($age > '0') { //process installed shipping modules - if ($_SESSION['shipping']['id'] == 'flat_flat') $ps_zones = split("[:,]", MODULE_ORDER_TOTAL_PS_FEE_FLAT); - if ($_SESSION['shipping']['id'] == 'item_item') $ps_zones = split("[:,]", MODULE_ORDER_TOTAL_PS_FEE_ITEM); - if ($_SESSION['shipping']['id'] == 'table_table') $ps_zones = split("[:,]", MODULE_ORDER_TOTAL_PS_FEE_TABLE); - if ($_SESSION['shipping']['id'] == 'zones_zones') $ps_zones = split("[:,]", MODULE_ORDER_TOTAL_PS_FEE_ZONES); - if ($_SESSION['shipping']['id'] == 'ap_ap') $ps_zones = split("[:,]", MODULE_ORDER_TOTAL_PS_FEE_AP); - if ($_SESSION['shipping']['id'] == 'dp_dp') $ps_zones = split("[:,]", MODULE_ORDER_TOTAL_PS_FEE_DP); + if ($_SESSION['shipping']['id'] == 'flat_flat') $ps_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_PS_FEE_FLAT); + if ($_SESSION['shipping']['id'] == 'item_item') $ps_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_PS_FEE_ITEM); + if ($_SESSION['shipping']['id'] == 'table_table') $ps_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_PS_FEE_TABLE); + if ($_SESSION['shipping']['id'] == 'zones_zones') $ps_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_PS_FEE_ZONES); + if ($_SESSION['shipping']['id'] == 'ap_ap') $ps_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_PS_FEE_AP); + if ($_SESSION['shipping']['id'] == 'dp_dp') $ps_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_PS_FEE_DP); for ($i = 0; $i < count($ps_zones); $i++) { if ($ps_zones[$i] == $order->billing['country']['iso_code_2']) { @@ -161,4 +161,4 @@ xtc_db_query("delete from " . TABLE_CONFIGURATION . " where configuration_key in ('" . implode("', '", $this->keys()) . "')"); } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/modules/payment/cod.php xtcommerce/includes/modules/payment/cod.php --- xtcommerce.orig/includes/modules/payment/cod.php 2005-07-10 20:58:52.000000000 +0200 +++ xtcommerce/includes/modules/payment/cod.php 2010-08-11 15:23:15.000000000 +0200 @@ -78,34 +78,34 @@ $cod_country = false; //process installed shipping modules - if ($_SESSION['shipping']['id'] == 'flat_flat') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_FLAT); - if ($_SESSION['shipping']['id'] == 'item_item') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_ITEM); - if ($_SESSION['shipping']['id'] == 'table_table') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_TABLE); - if ($_SESSION['shipping']['id'] == 'zones_zones') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_ZONES); - if ($_SESSION['shipping']['id'] == 'ap_ap') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_AP); - if ($_SESSION['shipping']['id'] == 'dp_dp') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DP); + if ($_SESSION['shipping']['id'] == 'flat_flat') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_FLAT); + if ($_SESSION['shipping']['id'] == 'item_item') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_ITEM); + if ($_SESSION['shipping']['id'] == 'table_table') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_TABLE); + if ($_SESSION['shipping']['id'] == 'zones_zones') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_ZONES); + if ($_SESSION['shipping']['id'] == 'ap_ap') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_AP); + if ($_SESSION['shipping']['id'] == 'dp_dp') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DP); - if ($_SESSION['shipping']['id'] == 'chp_ECO') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_CHP); - if ($_SESSION['shipping']['id'] == 'chp_PRI') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_CHP); - if ($_SESSION['shipping']['id'] == 'chp_URG') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_CHP); + if ($_SESSION['shipping']['id'] == 'chp_ECO') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_CHP); + if ($_SESSION['shipping']['id'] == 'chp_PRI') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_CHP); + if ($_SESSION['shipping']['id'] == 'chp_URG') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_CHP); - if ($_SESSION['shipping']['id'] == 'chronopost_chronopost') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_CHRONOPOST); + if ($_SESSION['shipping']['id'] == 'chronopost_chronopost') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_CHRONOPOST); - if ($_SESSION['shipping']['id'] == 'dhl_ECX') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DHL); - if ($_SESSION['shipping']['id'] == 'dhl_DOX') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DHL); - if ($_SESSION['shipping']['id'] == 'dhl_SDX') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DHL); - if ($_SESSION['shipping']['id'] == 'dhl_MDX') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DHL); - if ($_SESSION['shipping']['id'] == 'dhl_WPX') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_DHL); + if ($_SESSION['shipping']['id'] == 'dhl_ECX') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DHL); + if ($_SESSION['shipping']['id'] == 'dhl_DOX') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DHL); + if ($_SESSION['shipping']['id'] == 'dhl_SDX') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DHL); + if ($_SESSION['shipping']['id'] == 'dhl_MDX') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DHL); + if ($_SESSION['shipping']['id'] == 'dhl_WPX') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_DHL); - if ($_SESSION['shipping']['id'] == 'ups_ups') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_UPS); - if ($_SESSION['shipping']['id'] == 'upse_upse') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_UPSE); + if ($_SESSION['shipping']['id'] == 'ups_ups') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_UPS); + if ($_SESSION['shipping']['id'] == 'upse_upse') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_UPSE); - if ($_SESSION['shipping']['id'] == 'free_free') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_COD_FEE_FREE); - if ($_SESSION['shipping']['id'] == 'freeamount_freeamount') $cod_zones = split("[:,]", MODULE_ORDER_TOTAL_FREEAMOUNT_FREE); + if ($_SESSION['shipping']['id'] == 'free_free') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_COD_FEE_FREE); + if ($_SESSION['shipping']['id'] == 'freeamount_freeamount') $cod_zones = preg_split("/[:,]/", MODULE_ORDER_TOTAL_FREEAMOUNT_FREE); for ($i = 0; $i < count($cod_zones); $i++) { @@ -202,4 +202,4 @@ return array ('MODULE_PAYMENT_COD_STATUS', 'MODULE_PAYMENT_COD_ALLOWED', 'MODULE_PAYMENT_COD_ZONE', 'MODULE_PAYMENT_COD_ORDER_STATUS_ID', 'MODULE_PAYMENT_COD_SORT_ORDER'); } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/modules/products_media.php xtcommerce/includes/modules/products_media.php --- xtcommerce.orig/includes/modules/products_media.php 2005-09-29 18:11:20.000000000 +0200 +++ xtcommerce/includes/modules/products_media.php 2010-08-11 15:39:28.000000000 +0200 @@ -71,7 +71,7 @@ $filename .= '
'; $button = ''; if ($content_data['content_link'] == '') { - if (eregi('.html', $content_data['content_file']) or eregi('.htm', $content_data['content_file']) or eregi('.txt', $content_data['content_file']) or eregi('.bmp', $content_data['content_file']) or eregi('.jpg', $content_data['content_file']) or eregi('.gif', $content_data['content_file']) or eregi('.png', $content_data['content_file']) or eregi('.tif', $content_data['content_file'])) { + if (preg_match('/\.html/i', $content_data['content_file']) or preg_match('/\.htm/i', $content_data['content_file']) or preg_match('/\.txt/i', $content_data['content_file']) or preg_match('/\.bmp/i', $content_data['content_file']) or preg_match('/\.jpg/i', $content_data['content_file']) or preg_match('/\.gif/i', $content_data['content_file']) or preg_match('/\.png/i', $content_data['content_file']) or preg_match('/\.tif/i', $content_data['content_file'])) { $button = ''.xtc_image_button('button_view.gif', TEXT_VIEW).''; @@ -93,4 +93,4 @@ $info_smarty->assign('MODULE_products_media', $module); } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/modules/shipping/ap.php xtcommerce/includes/modules/shipping/ap.php --- xtcommerce.orig/includes/modules/shipping/ap.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/includes/modules/shipping/ap.php 2010-08-11 15:33:39.000000000 +0200 @@ -75,7 +75,7 @@ for ($i=1; $i<=$this->num_ap; $i++) { $countries_table = constant('MODULE_SHIPPING_AP_COUNTRIES_' . $i); - $country_zones = split("[,]", $countries_table); + $country_zones = explode(",", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; @@ -88,7 +88,7 @@ $shipping = -1; $ap_cost = constant('MODULE_SHIPPING_AP_COST_' . $i); - $ap_table = split("[:,]" , $ap_cost); + $ap_table = preg_split("/[:,]/" , $ap_cost); for ($i=0; $inum_chp; $j++) { $countries_table = constant('MODULE_SHIPPING_CHP_COUNTRIES_' . $j); - $country_zones = split("[,]", $countries_table); + $country_zones = explode(",", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $j; break; @@ -98,7 +98,7 @@ $methods = array(); if ($chp_cost_eco != '') { - $chp_table_eco = split("[:,]" , $chp_cost_eco); + $chp_table_eco = preg_split("/[:,]/" , $chp_cost_eco); for ($i=0; $inum_chronopost; $i ++) { $countries_table = constant('MODULE_SHIPPING_CHRONOPOST_COUNTRIES_' . $i); - $country = split("[,]", $countries_table); + $country = explode(",", $countries_table); if ( in_array($dest_country, $country ) ) { $dest_zone = $i; break; @@ -90,7 +90,7 @@ return $this->quotes; } - $table = split("[:,]" , constant('MODULE_SHIPPING_CHRONOPOST_COST_' . $dest_zone)); + $table = preg_split("/[:,]/" , constant('MODULE_SHIPPING_CHRONOPOST_COST_' . $dest_zone)); $cost = -1; for ($i = 0, $n = sizeof($table); $i < $n; $i+=2) { if ($shipping_weight <= $table[$i]) { diff -Naur xtcommerce.orig/includes/modules/shipping/dhl.php xtcommerce/includes/modules/shipping/dhl.php --- xtcommerce.orig/includes/modules/shipping/dhl.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/includes/modules/shipping/dhl.php 2010-08-11 15:34:17.000000000 +0200 @@ -83,7 +83,7 @@ for ($j=1; $j<=$this->num_dhl; $j++) { $countries_table = constant('MODULE_SHIPPING_DHL_COUNTRIES_' . $j); - $country_zones = split("[,]", $countries_table); + $country_zones = explode(",", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $j; break; @@ -104,7 +104,7 @@ $n == 0; if ($dhl_cost_ecx != '') { - $dhl_table_ecx = split("[:,]" , $dhl_cost_ecx); + $dhl_table_ecx = preg_split("/[:,]/" , $dhl_cost_ecx); if ( ($shipping_weight > 10) and ($shipping_weight <= 20) ) { $shipping_ecx = number_format((($shipping_weight - 10)* 2 + 0.5), 0) * constant('MODULE_SHIPPING_DHL_STEP_ECX_20_' .$j) + $dhl_table_ecx[count ($dhl_table_ecx)-1]; } elseif ( ($shipping_weight > 20) and ($shipping_weight <= 30) ) { @@ -137,7 +137,7 @@ } if ($dhl_cost_dox != '') { - $dhl_table_dox = split("[:,]" , $dhl_cost_dox); + $dhl_table_dox = preg_split("/[:,]/" , $dhl_cost_dox); if ( ($shipping_weight > 10) and ($shipping_weight <= 20) ) { $shipping_dox = number_format((($shipping_weight - 10)* 2 + 0.5), 0) * constant('MODULE_SHIPPING_DHL_STEP_DOX_20_' .$j) + $dhl_table_dox[count ($dhl_table_dox)-1]; } elseif ( ($shipping_weight > 20) and ($shipping_weight <= 30) ) { @@ -170,7 +170,7 @@ } if ($dhl_cost_wpx != '') { - $dhl_table_wpx = split("[:,]" , $dhl_cost_wpx); + $dhl_table_wpx = preg_split("/[:,]/" , $dhl_cost_wpx); if ( ($shipping_weight > 10) and ($shipping_weight <= 20) ) { $shipping_wpx = number_format((($shipping_weight - 10)* 2 + 0.5), 0) * constant('MODULE_SHIPPING_DHL_STEP_WPX_20_' .$j) + $dhl_table_wpx[count ($dhl_table_wpx)-1]; } elseif ( ($shipping_weight > 20) and ($shipping_weight <= 30) ) { @@ -203,7 +203,7 @@ } if ($dhl_cost_mdx != '') { - $dhl_table_mdx = split("[:,]" , $dhl_cost_mdx); + $dhl_table_mdx = preg_split("/[:,]/" , $dhl_cost_mdx); if ( ($shipping_weight > 10) and ($shipping_weight <= 20) ) { $shipping_mdx = number_format((($shipping_weight - 10)* 2 + 0.5), 0) * constant('MODULE_SHIPPING_DHL_STEP_MDX_20_' .$j) + $dhl_table_mdx[count ($dhl_table_mdx)-1]; } elseif ( ($shipping_weight > 20) and ($shipping_weight <= 30) ) { @@ -236,7 +236,7 @@ } if ($dhl_cost_sdx != '') { - $dhl_table_sdx = split("[:,]" , $dhl_cost_sdx); + $dhl_table_sdx = preg_split("/[:,]/" , $dhl_cost_sdx); if ( ($shipping_weight > 10) and ($shipping_weight <= 20) ) { $shipping_sdx = number_format((($shipping_weight - 10)* 2 + 0.5), 0) * constant('MODULE_SHIPPING_DHL_STEP_SDX_20_' .$j) + $dhl_table_sdx[count ($dhl_table_sdx)-1]; } elseif ( ($shipping_weight > 20) and ($shipping_weight <= 30) ) { diff -Naur xtcommerce.orig/includes/modules/shipping/dp.php xtcommerce/includes/modules/shipping/dp.php --- xtcommerce.orig/includes/modules/shipping/dp.php 2005-04-29 04:40:58.000000000 +0200 +++ xtcommerce/includes/modules/shipping/dp.php 2010-08-11 15:33:03.000000000 +0200 @@ -74,7 +74,7 @@ for ($i=1; $i<=$this->num_dp; $i++) { $countries_table = constant('MODULE_SHIPPING_DP_COUNTRIES_' . $i); - $country_zones = split("[,]", $countries_table); + $country_zones = explode(",", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; @@ -87,7 +87,7 @@ $shipping = -1; $dp_cost = constant('MODULE_SHIPPING_DP_COST_' . $i); - $dp_table = split("[:,]" , $dp_cost); + $dp_table = preg_split("/[:,]/" , $dp_cost); for ($i=0; $inum_fedexeu; $j++) { $countries_table = constant('MODULE_SHIPPING_FEDEXEU_COUNTRIES_' . $j); - $country_zones = split("[,]", $countries_table); + $country_zones = explode(",", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $j; break; @@ -94,7 +94,7 @@ $methods = array(); if ($fedexeu_cost_pak != '') { - $fedexeu_table_pak = split("[:,]" , $fedexeu_cost_pak); + $fedexeu_table_pak = preg_split("/[:,]/" , $fedexeu_cost_pak); for ($i=0; $i 10) and ($shipping_weight <= 20) ) { $shipping_box = number_format((($shipping_weight - 10)* 2 + 0.5), 0) * constant('MODULE_SHIPPING_FEDEXEU_STEP_BOX_20_' .$j) + $fedexeu_table_box[count ($fedexeu_table_box)-1]; } elseif ( ($shipping_weight > 20) and ($shipping_weight <= 40) ) { diff -Naur xtcommerce.orig/includes/modules/shipping/table.php xtcommerce/includes/modules/shipping/table.php --- xtcommerce.orig/includes/modules/shipping/table.php 2005-07-10 18:11:38.000000000 +0200 +++ xtcommerce/includes/modules/shipping/table.php 2010-08-11 14:24:04.000000000 +0200 @@ -61,7 +61,7 @@ $order_total = $shipping_weight; } - $table_cost = split("[:,]" , MODULE_SHIPPING_TABLE_COST); + $table_cost = preg_split("/[:,]/" , MODULE_SHIPPING_TABLE_COST); $size = sizeof($table_cost); for ($i=0, $n=$size; $i<$n; $i+=2) { if ($order_total <= $table_cost[$i]) { diff -Naur xtcommerce.orig/includes/modules/shipping/upse.php xtcommerce/includes/modules/shipping/upse.php --- xtcommerce.orig/includes/modules/shipping/upse.php 2005-05-09 23:57:00.000000000 +0200 +++ xtcommerce/includes/modules/shipping/upse.php 2010-08-11 15:35:50.000000000 +0200 @@ -75,7 +75,7 @@ for ($i=1; $i<=$this->num_upse; $i++) { $countries_table = constant('MODULE_SHIPPING_UPSE_COUNTRIES_' . $i); - $country_zones = split("[,]", $countries_table); + $country_zones = explode(",", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; @@ -88,7 +88,7 @@ $shipping = -1; $upse_cost = constant('MODULE_SHIPPING_UPSE_COST_' . $i); - $upse_table = split("[:,]" , $upse_cost); + $upse_table = preg_split("/[:,]/" , $upse_cost); for ($i=0; $inum_ups; $i++) { $countries_table = constant('MODULE_SHIPPING_UPS_COUNTRIES_' . $i); - $country_zones = split("[,]", $countries_table); + $country_zones = explode(",", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; @@ -97,7 +97,7 @@ $lowship = true; $shipping = -1; $ups_cost = constant('MODULE_SHIPPING_UPS_COST_' . $i); - $ups_table = split("[:,]" , $ups_cost); + $ups_table = preg_split("/[:,]/" , $ups_cost); for ($i=0; $inum_zones; $i++) { $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i); - $country_zones = split("[,]", $countries_table); + $country_zones = explode(",", $countries_table); if (in_array($dest_country, $country_zones)) { $dest_zone = $i; break; @@ -151,7 +151,7 @@ $shipping = -1; $zones_cost = constant('MODULE_SHIPPING_ZONES_COST_' . $dest_zone); - $zones_table = split("[:,]" , $zones_cost); + $zones_table = preg_split("/[:,]/" , $zones_cost); $size = sizeof($zones_table); for ($i=0; $i<$size; $i+=2) { if ($shipping_weight <= $zones_table[$i]) { diff -Naur xtcommerce.orig/includes/nusoap/lib/class.nusoap_base.php xtcommerce/includes/nusoap/lib/class.nusoap_base.php --- xtcommerce.orig/includes/nusoap/lib/class.nusoap_base.php 2006-06-13 03:12:03.000000000 +0200 +++ xtcommerce/includes/nusoap/lib/class.nusoap_base.php 2010-08-11 15:49:31.000000000 +0200 @@ -503,7 +503,7 @@ case (is_array($val) || $type): // detect if struct or array $valueType = $this->isArraySimpleOrStruct($val); - if($valueType=='arraySimple' || ereg('^ArrayOf',$type)){ + if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){ $i = 0; if(is_array($val) && count($val)> 0){ foreach($val as $v){ @@ -698,7 +698,7 @@ */ function expandQname($qname){ // get element prefix - if(strpos($qname,':') && !ereg('^http://',$qname)){ + if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){ // get unqualified name $name = substr(strstr($qname,':'),1); // get ns prefix @@ -826,7 +826,7 @@ function timestamp_to_iso8601($timestamp,$utc=true){ $datestr = date('Y-m-d\TH:i:sO',$timestamp); if($utc){ - $eregStr = + $regStr = '([0-9]{4})-'. // centuries & years CCYY- '([0-9]{2})-'. // months MM- '([0-9]{2})'. // days DD @@ -836,7 +836,7 @@ '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's - if(ereg($eregStr,$datestr,$regs)){ + if(preg_match('/'.$regStr.'/',$datestr,$regs)){ return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]); } return false; @@ -852,7 +852,7 @@ * @access public */ function iso8601_to_timestamp($datestr){ - $eregStr = + $regStr = '([0-9]{4})-'. // centuries & years CCYY- '([0-9]{2})-'. // months MM- '([0-9]{2})'. // days DD @@ -861,7 +861,7 @@ '([0-9]{2}):'. // minutes mm: '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's - if(ereg($eregStr,$datestr,$regs)){ + if(preg_match('/'.$regStr.'/',$datestr,$regs)){ // not utc if($regs[8] != 'Z'){ $op = substr($regs[8],0,1); @@ -902,4 +902,4 @@ } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/nusoap/lib/class.soapclientw.php xtcommerce/includes/nusoap/lib/class.soapclientw.php --- xtcommerce.orig/includes/nusoap/lib/class.soapclientw.php 2006-06-13 03:12:03.000000000 +0200 +++ xtcommerce/includes/nusoap/lib/class.soapclientw.php 2010-08-11 16:00:03.000000000 +0200 @@ -111,7 +111,7 @@ // instantiate wsdl object and parse wsdl file $this->debug('instantiating wsdl class with doc: '.$endpoint); - $this->wsdl =& new wsdl($this->wsdlFile,$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout); + $this->wsdl = new wsdl($this->wsdlFile,$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout); } $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); @@ -359,7 +359,7 @@ // detect transport switch(true){ // http(s) - case ereg('^http',$this->endpoint): + case preg_match('/^http/',$this->endpoint): $this->debug('transporting via HTTP'); if($this->persistentConnection == true && is_object($this->persistentConnection)){ $http =& $this->persistentConnection; @@ -381,10 +381,10 @@ $http->setEncoding($this->http_encoding); } $this->debug('sending message, length='.strlen($msg)); - if(ereg('^http:',$this->endpoint)){ + if(preg_match('/^http:/',$this->endpoint)){ //if(strpos($this->endpoint,'http:')){ $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies); - } elseif(ereg('^https',$this->endpoint)){ + } elseif(preg_match('/^https/',$this->endpoint)){ //} elseif(strpos($this->endpoint,'https:')){ //if(phpversion() == '4.3.0-dev'){ //$response = $http->send($msg,$timeout,$response_timeout); @@ -442,7 +442,7 @@ if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); - if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; diff -Naur xtcommerce.orig/includes/nusoap/lib/class.soap_parser.php xtcommerce/includes/nusoap/lib/class.soap_parser.php --- xtcommerce.orig/includes/nusoap/lib/class.soap_parser.php 2005-08-04 12:53:46.000000000 +0200 +++ xtcommerce/includes/nusoap/lib/class.soap_parser.php 2010-08-11 15:47:17.000000000 +0200 @@ -205,7 +205,7 @@ $key_localpart = $this->getLocalPart($key); // if ns declarations, add to class level array of valid namespaces if($key_prefix == 'xmlns'){ - if(ereg('^http://www.w3.org/[0-9]{4}/XMLSchema$',$value)){ + if(preg_match('/^http:\/\/www\.w3\.org\/[0-9]{4}\/XMLSchema$/',$value)){ $this->XMLSchemaVersion = $value; $this->namespaces['xsd'] = $this->XMLSchemaVersion; $this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance'; @@ -229,7 +229,7 @@ // should do something here with the namespace of specified type? } elseif($key_localpart == 'arrayType'){ $this->message[$pos]['type'] = 'array'; - /* do arrayType ereg here + /* do arrayType regex here [1] arrayTypeValue ::= atype asize [2] atype ::= QName rank* [3] rank ::= '[' (',')* ']' @@ -237,8 +237,8 @@ [5] length ::= nextDimension* Digit+ [6] nextDimension ::= Digit+ ',' */ - $expr = '([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]'; - if(ereg($expr,$value,$regs)){ + $expr = '/([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]/'; + if(preg_match($expr,$value,$regs)){ $this->message[$pos]['typePrefix'] = $regs[1]; $this->message[$pos]['arrayTypePrefix'] = $regs[1]; if (isset($this->namespaces[$regs[1]])) { @@ -596,4 +596,4 @@ -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/nusoap/lib/class.soap_server.php xtcommerce/includes/nusoap/lib/class.soap_server.php --- xtcommerce.orig/includes/nusoap/lib/class.soap_server.php 2005-08-04 12:53:48.000000000 +0200 +++ xtcommerce/includes/nusoap/lib/class.soap_server.php 2010-08-11 15:51:30.000000000 +0200 @@ -240,7 +240,7 @@ } $this->debug("In service, query string=$qs"); - if (ereg('wsdl', $qs) ){ + if (preg_match('/wsdl/', $qs) ){ $this->debug("In service, this is a request for WSDL"); if($this->externalWSDLURL){ if (strpos($this->externalWSDLURL,"://")!==false) { // assume URL @@ -311,7 +311,7 @@ // get the character encoding of the incoming request if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){ $enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1)); - if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -340,7 +340,7 @@ $enc = substr(strstr($v, '='), 1); $enc = str_replace('"', '', $enc); $enc = str_replace('\\', '', $enc); - if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) { + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) { $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -374,7 +374,7 @@ $enc = substr(strstr($v, '='), 1); $enc = str_replace('"', '', $enc); $enc = str_replace('\\', '', $enc); - if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) { + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) { $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -703,7 +703,7 @@ $payload .= $this->getDebugAsXMLComment(); } $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; - ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; // Let the Web server decide about this //$this->outgoing_headers[] = "Connection: Close\r\n"; @@ -791,7 +791,7 @@ if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); - if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -1035,4 +1035,4 @@ -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/nusoap/lib/class.soap_transport_http.php xtcommerce/includes/nusoap/lib/class.soap_transport_http.php --- xtcommerce.orig/includes/nusoap/lib/class.soap_transport_http.php 2006-06-13 03:12:03.000000000 +0200 +++ xtcommerce/includes/nusoap/lib/class.soap_transport_http.php 2010-08-11 15:50:07.000000000 +0200 @@ -49,7 +49,7 @@ function soap_transport_http($url){ parent::nusoap_base(); $this->setURL($url); - ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); $this->outgoing_headers['User-Agent'] = $this->title.'/'.$this->version.' ('.$rev[1].')'; $this->debug('set User-Agent: ' . $this->outgoing_headers['User-Agent']); } @@ -588,7 +588,7 @@ } } // remove 100 header - if(isset($lb) && ereg('^HTTP/1.1 100',$data)){ + if(isset($lb) && preg_match('/^HTTP\/1\.1 100/',$data)){ unset($lb); $data = ''; }// @@ -741,7 +741,7 @@ curl_close($this->ch); // remove 100 header(s) - while (ereg('^HTTP/1.1 100',$data)) { + while (preg_match('/^HTTP\/1\.1 100/',$data)) { if ($pos = strpos($data,"\r\n\r\n")) { $data = ltrim(substr($data,$pos)); } elseif($pos = strpos($data,"\n\n") ) { @@ -932,7 +932,7 @@ */ function parseCookie($cookie_str) { $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; - $data = split(';', $cookie_str); + $data = explode(';', $cookie_str); $value_str = $data[0]; $cookie_param = 'domain='; @@ -1035,4 +1035,4 @@ } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/nusoap/lib/class.wsdl.php xtcommerce/includes/nusoap/lib/class.wsdl.php --- xtcommerce.orig/includes/nusoap/lib/class.wsdl.php 2005-08-04 12:53:50.000000000 +0200 +++ xtcommerce/includes/nusoap/lib/class.wsdl.php 2010-08-11 15:46:10.000000000 +0200 @@ -274,7 +274,7 @@ $this->currentSchema->schemaStartElement($parser, $name, $attrs); $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); - } elseif (ereg('schema$', $name)) { + } elseif (preg_match('/schema$/', $name)) { $this->debug('Parsing WSDL schema'); // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")"); $this->status = 'schema'; @@ -293,7 +293,7 @@ if (count($attrs) > 0) { // register namespace declarations foreach($attrs as $k => $v) { - if (ereg("^xmlns", $k)) { + if (preg_match("/^xmlns/", $k)) { if ($ns_prefix = substr(strrchr($k, ':'), 1)) { $this->namespaces[$ns_prefix] = $v; } else { @@ -318,7 +318,7 @@ $attrs = array(); } // get element prefix, namespace and name - if (ereg(':', $name)) { + if (preg_match('/:/', $name)) { // get ns prefix $prefix = substr($name, 0, strpos($name, ':')); // get ns @@ -483,7 +483,7 @@ */ function end_element($parser, $name){ // unset schema status - if (/*ereg('types$', $name) ||*/ ereg('schema$', $name)) { + if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) { $this->status = ""; $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); @@ -1724,4 +1724,4 @@ } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/nusoap/lib/class.xmlschema.php xtcommerce/includes/nusoap/lib/class.xmlschema.php --- xtcommerce.orig/includes/nusoap/lib/class.xmlschema.php 2005-08-04 12:53:52.000000000 +0200 +++ xtcommerce/includes/nusoap/lib/class.xmlschema.php 2010-08-11 15:46:47.000000000 +0200 @@ -186,7 +186,7 @@ if(count($attrs) > 0){ foreach($attrs as $k => $v){ // if ns declarations, add to class level array of valid namespaces - if(ereg("^xmlns",$k)){ + if(preg_match("/^xmlns/",$k)){ //$this->xdebug("$k: $v"); //$this->xdebug('ns_prefix: '.$this->getPrefix($k)); if($ns_prefix = substr(strrchr($k,':'),1)){ @@ -296,7 +296,7 @@ // minOccurs="0" maxOccurs="unbounded" /> // // - if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { @@ -315,7 +315,7 @@ // minOccurs="0" maxOccurs="unbounded" /> // // - if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { @@ -713,7 +713,7 @@ } elseif(isset($this->attributes[$type])){ $this->xdebug("in getTypeDef, found attribute $type"); return $this->attributes[$type]; - } elseif (ereg('_ContainedType$', $type)) { + } elseif (preg_match('/_ContainedType$/', $type)) { $this->xdebug("in getTypeDef, have an untyped element $type"); $typeDef['typeClass'] = 'simpleType'; $typeDef['phpType'] = 'scalar'; @@ -903,4 +903,4 @@ -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/includes/nusoap/lib/nusoapmime.php xtcommerce/includes/nusoap/lib/nusoapmime.php --- xtcommerce.orig/includes/nusoap/lib/nusoapmime.php 2006-06-13 03:12:03.000000000 +0200 +++ xtcommerce/includes/nusoap/lib/nusoapmime.php 2010-08-11 16:00:08.000000000 +0200 @@ -127,7 +127,7 @@ function getHTTPBody($soapmsg) { if (count($this->requestAttachments) > 0) { $params['content_type'] = 'multipart/related; type=text/xml'; - $mimeMessage =& new Mail_mimePart('', $params); + $mimeMessage = new Mail_mimePart('', $params); unset($params); $params['content_type'] = 'text/xml'; @@ -347,7 +347,7 @@ function getHTTPBody($soapmsg) { if (count($this->responseAttachments) > 0) { $params['content_type'] = 'multipart/related; type=text/xml'; - $mimeMessage =& new Mail_mimePart('', $params); + $mimeMessage = new Mail_mimePart('', $params); unset($params); $params['content_type'] = 'text/xml'; diff -Naur xtcommerce.orig/includes/nusoap/lib/nusoap.php xtcommerce/includes/nusoap/lib/nusoap.php --- xtcommerce.orig/includes/nusoap/lib/nusoap.php 2006-06-13 03:12:03.000000000 +0200 +++ xtcommerce/includes/nusoap/lib/nusoap.php 2010-08-11 15:59:52.000000000 +0200 @@ -503,7 +503,7 @@ case (is_array($val) || $type): // detect if struct or array $valueType = $this->isArraySimpleOrStruct($val); - if($valueType=='arraySimple' || ereg('^ArrayOf',$type)){ + if($valueType=='arraySimple' || preg_match('/^ArrayOf/',$type)){ $i = 0; if(is_array($val) && count($val)> 0){ foreach($val as $v){ @@ -698,7 +698,7 @@ */ function expandQname($qname){ // get element prefix - if(strpos($qname,':') && !ereg('^http://',$qname)){ + if(strpos($qname,':') && !preg_match('/^http:\/\//',$qname)){ // get unqualified name $name = substr(strstr($qname,':'),1); // get ns prefix @@ -826,7 +826,7 @@ function timestamp_to_iso8601($timestamp,$utc=true){ $datestr = date('Y-m-d\TH:i:sO',$timestamp); if($utc){ - $eregStr = + $regStr = '([0-9]{4})-'. // centuries & years CCYY- '([0-9]{2})-'. // months MM- '([0-9]{2})'. // days DD @@ -836,7 +836,7 @@ '([0-9]{2})(\.[0-9]*)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's - if(ereg($eregStr,$datestr,$regs)){ + if(preg_match('/'.$regStr.'/',$datestr,$regs)){ return sprintf('%04d-%02d-%02dT%02d:%02d:%02dZ',$regs[1],$regs[2],$regs[3],$regs[4],$regs[5],$regs[6]); } return false; @@ -852,7 +852,7 @@ * @access public */ function iso8601_to_timestamp($datestr){ - $eregStr = + $regStr = '([0-9]{4})-'. // centuries & years CCYY- '([0-9]{2})-'. // months MM- '([0-9]{2})'. // days DD @@ -861,7 +861,7 @@ '([0-9]{2}):'. // minutes mm: '([0-9]{2})(\.[0-9]+)?'. // seconds ss.ss... '(Z|[+\-][0-9]{2}:?[0-9]{2})?'; // Z to indicate UTC, -/+HH:MM:SS.SS... for local tz's - if(ereg($eregStr,$datestr,$regs)){ + if(preg_match('/'.$regStr.'/',$datestr,$regs)){ // not utc if($regs[8] != 'Z'){ $op = substr($regs[8],0,1); @@ -1171,7 +1171,7 @@ if(count($attrs) > 0){ foreach($attrs as $k => $v){ // if ns declarations, add to class level array of valid namespaces - if(ereg("^xmlns",$k)){ + if(preg_match("/^xmlns/",$k)){ //$this->xdebug("$k: $v"); //$this->xdebug('ns_prefix: '.$this->getPrefix($k)); if($ns_prefix = substr(strrchr($k,':'),1)){ @@ -1281,7 +1281,7 @@ // minOccurs="0" maxOccurs="unbounded" /> // // - if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { @@ -1300,7 +1300,7 @@ // minOccurs="0" maxOccurs="unbounded" /> // // - if(isset($attrs['base']) && ereg(':Array$',$attrs['base'])){ + if(isset($attrs['base']) && preg_match('/:Array$/',$attrs['base'])){ $this->xdebug('complexType is unusual array'); $this->complexTypes[$this->currentComplexType]['phpType'] = 'array'; } else { @@ -1698,7 +1698,7 @@ } elseif(isset($this->attributes[$type])){ $this->xdebug("in getTypeDef, found attribute $type"); return $this->attributes[$type]; - } elseif (ereg('_ContainedType$', $type)) { + } elseif (preg_match('/_ContainedType$/', $type)) { $this->xdebug("in getTypeDef, have an untyped element $type"); $typeDef['typeClass'] = 'simpleType'; $typeDef['phpType'] = 'scalar'; @@ -2041,7 +2041,7 @@ function soap_transport_http($url){ parent::nusoap_base(); $this->setURL($url); - ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); $this->outgoing_headers['User-Agent'] = $this->title.'/'.$this->version.' ('.$rev[1].')'; $this->debug('set User-Agent: ' . $this->outgoing_headers['User-Agent']); } @@ -2580,7 +2580,7 @@ } } // remove 100 header - if(isset($lb) && ereg('^HTTP/1.1 100',$data)){ + if(isset($lb) && preg_match('/^HTTP\/1\.1 100/',$data)){ unset($lb); $data = ''; }// @@ -2733,7 +2733,7 @@ curl_close($this->ch); // remove 100 header(s) - while (ereg('^HTTP/1.1 100',$data)) { + while (preg_match('/^HTTP\/1\.1 100/',$data)) { if ($pos = strpos($data,"\r\n\r\n")) { $data = ltrim(substr($data,$pos)); } elseif($pos = strpos($data,"\n\n") ) { @@ -2924,7 +2924,7 @@ */ function parseCookie($cookie_str) { $cookie_str = str_replace('; ', ';', $cookie_str) . ';'; - $data = split(';', $cookie_str); + $data = explode(';', $cookie_str); $value_str = $data[0]; $cookie_param = 'domain='; @@ -3267,7 +3267,7 @@ } $this->debug("In service, query string=$qs"); - if (ereg('wsdl', $qs) ){ + if (preg_match('/wsdl/', $qs) ){ $this->debug("In service, this is a request for WSDL"); if($this->externalWSDLURL){ if (strpos($this->externalWSDLURL,"://")!==false) { // assume URL @@ -3338,7 +3338,7 @@ // get the character encoding of the incoming request if(isset($this->headers['content-type']) && strpos($this->headers['content-type'],'=')){ $enc = str_replace('"','',substr(strstr($this->headers["content-type"],'='),1)); - if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -3367,7 +3367,7 @@ $enc = substr(strstr($v, '='), 1); $enc = str_replace('"', '', $enc); $enc = str_replace('\\', '', $enc); - if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) { + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) { $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -3401,7 +3401,7 @@ $enc = substr(strstr($v, '='), 1); $enc = str_replace('"', '', $enc); $enc = str_replace('\\', '', $enc); - if (eregi('^(ISO-8859-1|US-ASCII|UTF-8)$', $enc)) { + if (preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i', $enc)) { $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -3730,7 +3730,7 @@ $payload .= $this->getDebugAsXMLComment(); } $this->outgoing_headers[] = "Server: $this->title Server v$this->version"; - ereg('\$Revisio' . 'n: ([^ ]+)', $this->revision, $rev); + preg_match('/\$Revisio' . 'n: ([^ ]+)/', $this->revision, $rev); $this->outgoing_headers[] = "X-SOAP-Server: $this->title/$this->version (".$rev[1].")"; // Let the Web server decide about this //$this->outgoing_headers[] = "Connection: Close\r\n"; @@ -3818,7 +3818,7 @@ if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); - if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -4336,7 +4336,7 @@ $this->currentSchema->schemaStartElement($parser, $name, $attrs); $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); - } elseif (ereg('schema$', $name)) { + } elseif (preg_match('/schema$/', $name)) { $this->debug('Parsing WSDL schema'); // $this->debug("startElement for $name ($attrs[name]). status = $this->status (".$this->getLocalPart($name).")"); $this->status = 'schema'; @@ -4355,7 +4355,7 @@ if (count($attrs) > 0) { // register namespace declarations foreach($attrs as $k => $v) { - if (ereg("^xmlns", $k)) { + if (preg_match("/^xmlns/", $k)) { if ($ns_prefix = substr(strrchr($k, ':'), 1)) { $this->namespaces[$ns_prefix] = $v; } else { @@ -4380,7 +4380,7 @@ $attrs = array(); } // get element prefix, namespace and name - if (ereg(':', $name)) { + if (preg_match('/:/', $name)) { // get ns prefix $prefix = substr($name, 0, strpos($name, ':')); // get ns @@ -4545,7 +4545,7 @@ */ function end_element($parser, $name){ // unset schema status - if (/*ereg('types$', $name) ||*/ ereg('schema$', $name)) { + if (/*preg_match('/types$/', $name) ||*/ preg_match('/schema$/', $name)) { $this->status = ""; $this->appendDebug($this->currentSchema->getDebug()); $this->currentSchema->clearDebug(); @@ -5991,7 +5991,7 @@ $key_localpart = $this->getLocalPart($key); // if ns declarations, add to class level array of valid namespaces if($key_prefix == 'xmlns'){ - if(ereg('^http://www.w3.org/[0-9]{4}/XMLSchema$',$value)){ + if(preg_match('/^http:\/\/www\.w3\.org\/[0-9]{4}\/XMLSchema$/',$value)){ $this->XMLSchemaVersion = $value; $this->namespaces['xsd'] = $this->XMLSchemaVersion; $this->namespaces['xsi'] = $this->XMLSchemaVersion.'-instance'; @@ -6015,7 +6015,7 @@ // should do something here with the namespace of specified type? } elseif($key_localpart == 'arrayType'){ $this->message[$pos]['type'] = 'array'; - /* do arrayType ereg here + /* do arrayType regex here [1] arrayTypeValue ::= atype asize [2] atype ::= QName rank* [3] rank ::= '[' (',')* ']' @@ -6023,8 +6023,8 @@ [5] length ::= nextDimension* Digit+ [6] nextDimension ::= Digit+ ',' */ - $expr = '([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]'; - if(ereg($expr,$value,$regs)){ + $expr = '/([A-Za-z0-9_]+):([A-Za-z]+[A-Za-z0-9_]+)\[([0-9]+),?([0-9]*)\]/'; + if(preg_match($expr,$value,$regs)){ $this->message[$pos]['typePrefix'] = $regs[1]; $this->message[$pos]['arrayTypePrefix'] = $regs[1]; if (isset($this->namespaces[$regs[1]])) { @@ -6493,7 +6493,7 @@ // instantiate wsdl object and parse wsdl file $this->debug('instantiating wsdl class with doc: '.$endpoint); - $this->wsdl =& new wsdl($this->wsdlFile,$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout); + $this->wsdl = new wsdl($this->wsdlFile,$this->proxyhost,$this->proxyport,$this->proxyusername,$this->proxypassword,$this->timeout,$this->response_timeout); } $this->appendDebug($this->wsdl->getDebug()); $this->wsdl->clearDebug(); @@ -6741,7 +6741,7 @@ // detect transport switch(true){ // http(s) - case ereg('^http',$this->endpoint): + case preg_match('/^http/',$this->endpoint): $this->debug('transporting via HTTP'); if($this->persistentConnection == true && is_object($this->persistentConnection)){ $http =& $this->persistentConnection; @@ -6763,10 +6763,10 @@ $http->setEncoding($this->http_encoding); } $this->debug('sending message, length='.strlen($msg)); - if(ereg('^http:',$this->endpoint)){ + if(preg_match('/^http:/',$this->endpoint)){ //if(strpos($this->endpoint,'http:')){ $this->responseData = $http->send($msg,$timeout,$response_timeout,$this->cookies); - } elseif(ereg('^https',$this->endpoint)){ + } elseif(preg_match('/^https/',$this->endpoint)){ //} elseif(strpos($this->endpoint,'https:')){ //if(phpversion() == '4.3.0-dev'){ //$response = $http->send($msg,$timeout,$response_timeout); @@ -6824,7 +6824,7 @@ if (strpos($headers['content-type'], '=')) { $enc = str_replace('"', '', substr(strstr($headers["content-type"], '='), 1)); $this->debug('Got response encoding: ' . $enc); - if(eregi('^(ISO-8859-1|US-ASCII|UTF-8)$',$enc)){ + if(preg_match('/^(ISO-8859-1|US-ASCII|UTF-8)$/i',$enc)){ $this->xml_encoding = strtoupper($enc); } else { $this->xml_encoding = 'US-ASCII'; @@ -7238,4 +7238,4 @@ return true; } } -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/media_content.php xtcommerce/media_content.php --- xtcommerce.orig/media_content.php 2005-03-13 10:16:10.000000000 +0100 +++ xtcommerce/media_content.php 2010-08-11 15:40:10.000000000 +0200 @@ -53,7 +53,7 @@ if (strpos($content_data['content_file'], '.txt')) echo '
';
 
-	if (eregi('.gif', $content_data['content_file']) or eregi('.jpg', $content_data['content_file']) or eregi('.png', $content_data['content_file']) or eregi('.tif', $content_data['content_file']) or eregi('.bmp', $content_data['content_file'])) {
+	if (preg_match('/\.gif/i', $content_data['content_file']) or preg_match('/\.jpg/i', $content_data['content_file']) or preg_match('/\.png/i', $content_data['content_file']) or preg_match('/\.tif/i', $content_data['content_file']) or preg_match('/\.bmp/i', $content_data['content_file'])) {
 		echo '
'; echo xtc_image(DIR_WS_CATALOG.'media/products/'.$content_data['content_file']); @@ -73,4 +73,4 @@ } ?> - \ No newline at end of file + diff -Naur xtcommerce.orig/popup_coupon_help.php xtcommerce/popup_coupon_help.php --- xtcommerce.orig/popup_coupon_help.php 2005-10-18 17:49:16.000000000 +0200 +++ xtcommerce/popup_coupon_help.php 2010-08-11 14:46:56.000000000 +0200 @@ -54,7 +54,7 @@ $coupon_get = xtc_db_query("select restrict_to_categories from ".TABLE_COUPONS." where coupon_id='".(int)$_GET['cID']."'"); $get_result = xtc_db_fetch_array($coupon_get); -$cat_ids = split("[,]", $get_result['restrict_to_categories']); +$cat_ids = explode(",", $get_result['restrict_to_categories']); for ($i = 0; $i < count($cat_ids); $i ++) { $result = xtc_db_query("SELECT * FROM ".TABLE_CATEGORIES." c, ".TABLE_CATEGORIES_DESCRIPTION." cd WHERE c.categories_id = cd.categories_id and cd.language_id = '".$_SESSION['languages_id']."' and c.categories_id='".$cat_ids[$i]."'"); if ($row = xtc_db_fetch_array($result)) { @@ -68,7 +68,7 @@ $coupon_get = xtc_db_query("select restrict_to_products from ".TABLE_COUPONS." where coupon_id='".(int)$_GET['cID']."'"); $get_result = xtc_db_fetch_array($coupon_get); -$pr_ids = split("[,]", $get_result['restrict_to_products']); +$pr_ids = explode(",", $get_result['restrict_to_products']); for ($i = 0; $i < count($pr_ids); $i ++) { $result = xtc_db_query("SELECT * FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_id = pd.products_id and pd.language_id = '".$_SESSION['languages_id']."'and p.products_id = '".$pr_ids[$i]."'"); if ($row = xtc_db_fetch_array($result)) { @@ -86,4 +86,4 @@ $smarty->caching = 0; $smarty->display(CURRENT_TEMPLATE.'/module/popup_coupon_help.html'); include ('includes/application_bottom.php'); -?> \ No newline at end of file +?> diff -Naur xtcommerce.orig/templates/xtc4/source/boxes/categories.php xtcommerce/templates/xtc4/source/boxes/categories.php --- xtcommerce.orig/templates/xtc4/source/boxes/categories.php 2005-10-12 18:21:30.000000000 +0200 +++ xtcommerce/templates/xtc4/source/boxes/categories.php 2010-08-11 14:46:05.000000000 +0200 @@ -80,7 +80,7 @@ //------------------------ if ($cPath) { $new_path = ''; - $id = split('_', $cPath); + $id = explode('_', $cPath); reset($id); while (list ($key, $value) = each($id)) { unset ($prev_id); @@ -128,4 +128,4 @@ } $smarty->assign('box_CATEGORIES', $box_categories); -?> \ No newline at end of file +?>