diff options
author | ccesario <carloscesario@gmail.com> | 2012-07-01 19:45:07 -0300 |
---|---|---|
committer | ccesario <carloscesario@gmail.com> | 2012-07-01 19:45:07 -0300 |
commit | 4dc8f32e3dce78406f993dfaba8cf9fd94a14617 (patch) | |
tree | 8e36e1f5e916ea457da87b3e051f2d9e2a67e17e | |
parent | 4afb7d66b42b82e4b888d675ed8ae72bbcd2041f (diff) | |
download | pfsense-4dc8f32e3dce78406f993dfaba8cf9fd94a14617.zip pfsense-4dc8f32e3dce78406f993dfaba8cf9fd94a14617.tar.gz |
Change ereg_replace() to preg_replace() function
-rwxr-xr-x | usr/local/www/wizard.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php index a40bb38..615ec70 100755 --- a/usr/local/www/wizard.php +++ b/usr/local/www/wizard.php @@ -3,7 +3,7 @@ /* wizard.php Copyright (C) 2004 Scott Ullrich - Copyright (C) 2010 Ermal Luçi + Copyright (C) 2010 Ermal Lu�i All rights reserved. Redistribution and use in source and binary forms, with or without @@ -353,7 +353,7 @@ function showchange() { $value = $field['value']; $name = $field['name']; - $name = ereg_replace(" ", "", $name); + $name = preg_replace("/\s+/", "", $name); $name = strtolower($name); if($field['bindstofield'] <> "") { @@ -838,7 +838,7 @@ if($pkg['step'][$stepid]['disableallfieldsbydefault'] <> "") { if($field['type'] <> "submit" and $field['type'] <> "listtopic") { if(!$field['donotdisable'] <> "") { array_push($fieldnames_array, $field['name']); - $fieldname = ereg_replace(" ", "", $field['name']); + $fieldname = preg_replace("/\s+/", "", $field['name']); $fieldname = strtolower($fieldname); echo "\tdocument.forms[0]." . $fieldname . ".disabled = 1;\n"; } @@ -857,7 +857,7 @@ if($pkg['step'][$stepid]['disableallfieldsbydefault'] <> "") { echo "\t\tcase " . $idcounter . ":\n"; $enablefields_split = explode(",", $opt['enablefields']); foreach ($enablefields_split as $efs) { - $fieldname = ereg_replace(" ", "", $efs); + $fieldname = preg_replace("/\s+/", "", $efs); $fieldname = strtolower($fieldname); if($fieldname <> "") { $onchange = "\t\t\tdocument.forms[0]." . $fieldname . ".disabled = 0; \n"; |