From 26d4a5ef6cb1f0877b93c886e55a4201cf6efa5c Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 27 Nov 2010 09:41:16 +0000 Subject: [PATCH] replace PHP5.3 deprecated ereg with preg_match --- phpgwapi/inc/class.common.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.common.inc.php b/phpgwapi/inc/class.common.inc.php index 3cbda42ac5..fb9db8bea0 100644 --- a/phpgwapi/inc/class.common.inc.php +++ b/phpgwapi/inc/class.common.inc.php @@ -77,8 +77,8 @@ class common */ static function cmp_version($str1,$str2,$debug=False) { - ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)",$str1,$regs); - ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)",$str2,$regs2); + preg_match("/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)/",$str1,$regs); + preg_match("/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)/",$str2,$regs2); if($debug) { echo "
$regs[0] - $regs2[0]"; } for($i=1;$i<5;$i++) @@ -108,8 +108,8 @@ class common */ static function cmp_version_long($str1,$str2,$debug=False) { - ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)",$str1,$regs); - ereg("([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)",$str2,$regs2); + preg_match("/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)/",$str1,$regs); + preg_match("/([0-9]+)\.([0-9]+)\.([0-9]+)[a-zA-Z]*([0-9]*)\.([0-9]*)/",$str2,$regs2); if($debug) { echo "
$regs[0] - $regs2[0]"; } for($i=1;$i<6;$i++)