diff options
author | Seth Mos <seth.mos@dds.nl> | 2012-07-01 08:09:52 -0700 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2012-07-01 08:09:52 -0700 |
commit | b501f04de5178fddd0b8e39709b169c0562f68dc (patch) | |
tree | b19c7bd91f8fc8e81797f43f61493078161c8944 /etc | |
parent | 83e0d4c85c9e5d45c22e82b7a2dfcf0b1d15a413 (diff) | |
parent | aff670f655be6858acc84f977cd2e081a091b74b (diff) | |
download | pfsense-b501f04de5178fddd0b8e39709b169c0562f68dc.zip pfsense-b501f04de5178fddd0b8e39709b169c0562f68dc.tar.gz |
Merge pull request #158 from ccesario/master
Change ereg_replace to preg_replace() and ereg() to preg_match() functions
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/config.console.inc | 2 | ||||
-rw-r--r-- | etc/inc/config.inc | 2 | ||||
-rw-r--r-- | etc/inc/pfsense-utils.inc | 4 | ||||
-rw-r--r-- | etc/inc/smtp.inc | 2 | ||||
-rw-r--r-- | etc/inc/upgrade_config.inc | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/etc/inc/config.console.inc b/etc/inc/config.console.inc index aaf54f3..78ad524 100644 --- a/etc/inc/config.console.inc +++ b/etc/inc/config.console.inc @@ -69,7 +69,7 @@ function set_networking_interfaces_ports() { $key = null; /* Only present auto interface option if running from LiveCD and interface mismatch*/ - if ((ereg("cdrom", $g['platform'])) && is_interface_mismatch()) + if ((preg_match("/cdrom/", $g['platform'])) && is_interface_mismatch()) $auto_assign = false; echo <<<EOD diff --git a/etc/inc/config.inc b/etc/inc/config.inc index b8199df..790fbc1 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -122,7 +122,7 @@ else if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) { /* config is on floppy disk for CD-ROM version */ $cfgdevice = $cfgpartition = "fd0"; $dmesg = `dmesg -a`; - if(ereg("da0", $dmesg) == true) { + if(preg_match("/da0/", $dmesg) == true) { $cfgdevice = $cfgpartition = "da0" ; if (mwexec("/sbin/mount -r /dev/{$cfgdevice} /cf")) { /* could not mount, fallback to floppy */ diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 8d5dac0..e1182ad 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -1632,7 +1632,7 @@ function read_header($ch, $string) { global $file_size, $fout; $length = strlen($string); $regs = ""; - ereg("(Content-Length:) (.*)", $string, $regs); + preg_match("/(Content-Length:) (.*)/", $string, $regs); if($regs[2] <> "") { $file_size = intval($regs[2]); } @@ -1686,7 +1686,7 @@ function read_body($ch, $string) { */ function update_output_window($text) { global $pkg_interface; - $log = ereg_replace("\n", "\\n", $text); + $log = preg_replace("/\n/", "\\n", $text); if($pkg_interface != "console") { echo "\n<script language=\"JavaScript\">\nthis.document.forms[0].output.value = \"" . $log . "\";\n"; echo "this.document.forms[0].output.scrollTop = this.document.forms[0].output.scrollHeight;\n"; diff --git a/etc/inc/smtp.inc b/etc/inc/smtp.inc index 1f371f6..5aec015 100644 --- a/etc/inc/smtp.inc +++ b/etc/inc/smtp.inc @@ -223,7 +223,7 @@ class smtp_class || !extension_loaded("openssl")) return(gettext("establishing SSL connections requires the OpenSSL extension enabled")); } - if(ereg('^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$',$domain)) + if(preg_match('/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/',$domain)) $ip=$domain; else { diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc index b8bb978..bd12830 100644 --- a/etc/inc/upgrade_config.inc +++ b/etc/inc/upgrade_config.inc @@ -1907,7 +1907,7 @@ function upgrade_053_to_054() { foreach($lbpool_arr as $lbpool) { if($lbpool['type'] == "gateway") { // Gateway Groups have to have valid names in pf, old lb pools did not. Clean them up. - $group_name = ereg_replace("[^A-Za-z0-9]", "", $lbpool['name'] ); + $group_name = preg_replace("/[^A-Za-z0-9]/", "", $lbpool['name'] ); // If we made and changes, check for collisions and note the change. if ($group_name != $lbpool['name']) { // Make sure the name isn't already in use. |