diff options
-rwxr-xr-x | usr/local/www/exec.php | 2 | ||||
-rwxr-xr-x | usr/local/www/wizard.php | 8 | ||||
-rw-r--r-- | usr/local/www/wizards/openvpn_wizard.inc | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/usr/local/www/exec.php b/usr/local/www/exec.php index 5bd7f30..4342c1d 100755 --- a/usr/local/www/exec.php +++ b/usr/local/www/exec.php @@ -71,7 +71,7 @@ if($_POST) // Function: is Blank // Returns true or false depending on blankness of argument. -function isBlank( $arg ) { return ereg( "^\s*$", $arg ); } +function isBlank( $arg ) { return preg_match( "/^\s*$/", $arg ); } // Function: Puts diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php index a40bb38..f191b98 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"; diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc index 076bfc8..8f6fbc9 100644 --- a/usr/local/www/wizards/openvpn_wizard.inc +++ b/usr/local/www/wizards/openvpn_wizard.inc @@ -1,6 +1,6 @@ <?php /* - 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 @@ -29,7 +29,7 @@ require_once("openvpn.inc"); function has_special_chars($text) { - return ereg('[^A-Za-z0-9 _-]', $text); + return preg_match('/[^A-Za-z0-9 _-]/', $text); } function step1_submitphpaction() { |