From 5e9dbe95c5cdd4a333e0cd62e42ff41f7fe44240 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 8 Aug 2004 09:18:04 +0000 Subject: [PATCH] fix for mbstring.func_overload 7: ereg_* where looping infinit, changed to preg_* --- etemplate/inc/class.db_tools.inc.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etemplate/inc/class.db_tools.inc.php b/etemplate/inc/class.db_tools.inc.php index 31c9e1354a..a763c77d54 100644 --- a/etemplate/inc/class.db_tools.inc.php +++ b/etemplate/inc/class.db_tools.inc.php @@ -724,13 +724,13 @@ } rename($file,$old_file); } - $fnew = eregi_replace("(.*\\$"."setup_info\\['$app'\\]\\['version'\\][ \\t]*=[ \\t]*')[^']*('.*)","\\1$new"."\\2",$fcontent); + $fnew = preg_replace('/(.*\\$'."setup_info\\['$app'\\]\\['version'\\][ \\t]*=[ \\t]*)'[^']*'(.*)/i","\\1'$new'\\2",$fcontent); if ($tables != '') { if ($setup_info[$app]['tables']) // if there is already tables array, update it { - $fnew = eregi_replace("(.*\\$"."setup_info\\['$app'\\]\\['tables'\\][ \\t]*=[ \\t]*array\()[^)]*","\\1$tables",$fwas=$fnew); + $fnew = preg_replace('/(.*\\$'."setup_info\\['$app'\\]\\['tables'\\][ \\t]*=[ \\t]*array\()[^)]*/i","\\1$tables",$fwas=$fnew); if ($fwas == $fnew) // nothing changed => tables are in single lines { @@ -739,7 +739,7 @@ $stage = 0; // 0 = before, 1 = in, 2 = after tables section foreach($fwas as $line) { - if (eregi("(.*\\$"."setup_info\\['$app'\\]\\['tables'\\]\\[[ \\t]*\\][ \\t]*=[ \\t]*)'",$line,$parts)) + if (preg_match('/(.*\\$'."setup_info\\['$app'\\]\\['tables'\\]\\[[ \\t]*\\][ \\t]*=[ \\t]*)'/i",$line,$parts)) { if ($stage == 0) // first line of tables-section {