From db5abc6c211d78ad80b716ddef11eabe5e32f137 Mon Sep 17 00:00:00 2001
From: alecpl <alec@alec.pl>
Date: Mon, 04 May 2009 04:03:48 -0400
Subject: [PATCH] - ereg -> preg

---
 program/lib/icl_commons.inc  |    4 ++--
 program/lib/enriched.inc     |    2 +-
 program/lib/tnef_decoder.inc |    8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/program/lib/enriched.inc b/program/lib/enriched.inc
index 2435a82..e3abd8c 100644
--- a/program/lib/enriched.inc
+++ b/program/lib/enriched.inc
@@ -45,7 +45,7 @@
 			'</indentright>'=>'</span>');
 	
 	while(list($find,$replace)=each($a)){
-		$body = eregi_replace($find,$replace,$body);
+		$body = preg_replace('#'.$find.'#i', $replace, $body);
 	}
 	return $body;
 }
diff --git a/program/lib/icl_commons.inc b/program/lib/icl_commons.inc
index 5992051..87eed62 100644
--- a/program/lib/icl_commons.inc
+++ b/program/lib/icl_commons.inc
@@ -48,8 +48,8 @@
 }
 
 function iil_utf7_encode($str){
-	if (!ereg("[\200-\237]",$str) && !ereg("[\241-\377]",$str))
-        return $str;
+	if (!preg_match('/[\200-\237\241-\377]/', $str))
+    		return $str;
 
 	$len = strlen($str);
 
diff --git a/program/lib/tnef_decoder.inc b/program/lib/tnef_decoder.inc
index 8e3682a..750faf6 100644
--- a/program/lib/tnef_decoder.inc
+++ b/program/lib/tnef_decoder.inc
@@ -185,12 +185,12 @@
       switch($attr_name)
       {
          case TNEF_MAPI_ATTACH_LONG_FILENAME: // used in preference to AFILENAME value
-            $attachment_data[0]['name'] = ereg_replace('.*[\/](.*)$', '\1', $value); // strip path
+            $attachment_data[0]['name'] = preg_replace('/.*[\/](.*)$/', '\1', $value); // strip path
             break;
 
          case TNEF_MAPI_ATTACH_MIME_TAG: // Is this ever set, and what is format?
-            $attachment_data[0]['type0'] = ereg_replace('^(.*)/.*', '\1', $value);
-            $attachment_data[0]['type1'] = ereg_replace('.*/(.*)$', '\1', $value);
+            $attachment_data[0]['type0'] = preg_replace('/^(.*)\/.*/', '\1', $value);
+            $attachment_data[0]['type1'] = preg_replace('/.*\/(.*)$/', '\1', $value);
             break;
 
          case TNEF_MAPI_ATTACH_DATA:
@@ -247,7 +247,7 @@
 
       case TNEF_AFILENAME: // filename
          $length = tnef_geti32($buf);
-         $attachment_data[0]['name'] = ereg_replace('.*[\/](.*)$',
+         $attachment_data[0]['name'] = preg_replace('/.*[\/](.*)$/',
                                                     '\1',
                                                     tnef_getx($length, $buf)); // strip path
          tnef_geti16($buf); //checksum

--
Gitblit v1.9.1