diff options
author | smos <seth.mos@dds.nl> | 2012-01-19 20:33:41 +0100 |
---|---|---|
committer | smos <seth.mos@dds.nl> | 2012-01-19 20:33:41 +0100 |
commit | cfbfd9412b70bda8c34127b8b7dfdceff4872390 (patch) | |
tree | 465ee07c80898171a4cc41a6ac82d9133012797d /usr/local | |
parent | 80c88a686d0e56b2f2ad774da05debb1a2afba47 (diff) | |
download | pfsense-cfbfd9412b70bda8c34127b8b7dfdceff4872390.zip pfsense-cfbfd9412b70bda8c34127b8b7dfdceff4872390.tar.gz |
The function split() is replaced by the function explode(). Starting with PHP 5.3 this is deprecated and with version 6 gone.
Replacing it surpresses all the warnings
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/captiveportal/index.php | 2 | ||||
-rwxr-xr-x | usr/local/sbin/pfSsh.php | 8 | ||||
-rwxr-xr-x | usr/local/www/diag_backup.php | 4 | ||||
-rw-r--r-- | usr/local/www/diag_dns.php | 4 | ||||
-rwxr-xr-x | usr/local/www/diag_dump_states.php | 4 | ||||
-rwxr-xr-x | usr/local/www/firewall_aliases_edit.php | 4 | ||||
-rwxr-xr-x | usr/local/www/firewall_nat.php | 2 | ||||
-rwxr-xr-x | usr/local/www/firewall_virtual_ip_edit.php | 2 | ||||
-rw-r--r-- | usr/local/www/installer/installer.php | 20 | ||||
-rwxr-xr-x | usr/local/www/interfaces.php | 2 | ||||
-rw-r--r-- | usr/local/www/interfaces_ppps_edit.php | 2 | ||||
-rwxr-xr-x | usr/local/www/services_dyndns.php | 2 | ||||
-rwxr-xr-x | usr/local/www/status_rrd_graph.php | 8 | ||||
-rw-r--r-- | usr/local/www/status_rrd_graph_img.php | 2 | ||||
-rwxr-xr-x | usr/local/www/system.php | 2 | ||||
-rwxr-xr-x | usr/local/www/system_firmware_settings.php | 4 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/picture.widget.php | 2 | ||||
-rw-r--r-- | usr/local/www/widgets/widgets/rss.widget.php | 2 | ||||
-rwxr-xr-x | usr/local/www/wizard.php | 6 | ||||
-rw-r--r-- | usr/local/www/wizards/setup_wizard.xml | 4 |
20 files changed, 43 insertions, 43 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 040b6bb..3629f15 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -147,7 +147,7 @@ EOD; // $timecredit contains either a credit in minutes or an error message if ($timecredit > 0) { // voucher is valid. Remaining minutes returned // if multiple vouchers given, use the first as username - $a_vouchers = split("[\t\n\r ]+",$voucher); + $a_vouchers = explode("[\t\n\r ]+",$voucher); $voucher = $a_vouchers[0]; $attr = array( 'voucher' => 1, 'session_timeout' => $timecredit*60, diff --git a/usr/local/sbin/pfSsh.php b/usr/local/sbin/pfSsh.php index a73e7de..ac4a56a 100755 --- a/usr/local/sbin/pfSsh.php +++ b/usr/local/sbin/pfSsh.php @@ -56,7 +56,7 @@ if(!function_exists("readline")) { function more($text, $count=24) { $counter=0; - $lines = split("\n", $text); + $lines = explode("\n", $text); foreach($lines as $line) { if($counter > $count) { echo "Press RETURN to continue ..."; @@ -211,7 +211,7 @@ $tccommands[] = "RELENG_1_2"; while($shell_active == true) { $command = readline("{$g['product_name']} shell: "); readline_add_history($command); - $command_split = split(" ", $command); + $command_split = explode(" ", $command); $first_command = $command_split[0]; if($first_command == "playback" || $first_command == "run") { $playback_file = $command_split[1]; @@ -310,7 +310,7 @@ function str_replace_all($search,$replace,$subject) { } function playback_text($playback_file_contents) { - $playback_file_split = split("\n", $playback_file_contents); + $playback_file_split = explode("\n", $playback_file_contents); $playback_text = "require_once('functions.inc');\n"; $playback_text .= "require_once('globals.inc');\n"; $playback_text .= "require_once('config.inc');\n"; @@ -339,4 +339,4 @@ function playback_file($playback_file) { playback_text($playback_file_contents); } -?>
\ No newline at end of file +?> diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php index 9d28375..6efb1ff 100755 --- a/usr/local/www/diag_backup.php +++ b/usr/local/www/diag_backup.php @@ -57,7 +57,7 @@ require_once("shaper.inc"); function add_base_packages_menu_items() { global $g, $config; - $base_packages = split($g['base_packages'], ","); + $base_packages = explode($g['base_packages'], ","); $modified_config = false; foreach($base_packages as $bp) { $basepkg_path = "/usr/local/pkg/{$bp}"; @@ -226,7 +226,7 @@ if ($_POST) { */ if(!$_POST['donotbackuprrd']) { $data = str_replace("</" . $g['xml_rootobj'] . ">", "\t<rrddata>", $data); - $rrd_files_var_db_rrd = split("\n",`cd /var/db/rrd && ls *.rrd`); + $rrd_files_var_db_rrd = explode("\n",`cd /var/db/rrd && ls *.rrd`); foreach($rrd_files_var_db_rrd as $rrd) { if($rrd) { $rrd_data = file_get_contents("{$g['vardb_path']}/rrd/{$rrd}"); diff --git a/usr/local/www/diag_dns.php b/usr/local/www/diag_dns.php index cf5c397..63c119a 100644 --- a/usr/local/www/diag_dns.php +++ b/usr/local/www/diag_dns.php @@ -48,7 +48,7 @@ if($_GET['createalias'] == "true") { if($resolved) { $host = trim($_POST['host']); $dig=`dig "$host" A | grep "$host" | grep -v ";" | awk '{ print $5 }'`; - $resolved = split("\n", $dig); + $resolved = explode("\n", $dig); $isfirst = true; foreach($resolved as $re) { if($re <> "") { @@ -132,7 +132,7 @@ if ($_POST) { $resolved = gethostbyname($host); if($resolved) { $dig=`dig $host_esc A | grep $host_esc | grep -v ";" | awk '{ print $5 }'`; - $resolved = split("\n", $dig); + $resolved = explode("\n", $dig); } $hostname = $host; if ($host != $resolved) diff --git a/usr/local/www/diag_dump_states.php b/usr/local/www/diag_dump_states.php index 5ed855d..b368542 100755 --- a/usr/local/www/diag_dump_states.php +++ b/usr/local/www/diag_dump_states.php @@ -187,9 +187,9 @@ if(count($states) > 0) { /* break up info and extract $srcip and $dstip */ $ends = preg_split("/\<?-\>?/", $info); - $parts = split(":", $ends[0]); + $parts = explode(":", $ends[0]); $srcip = trim($parts[0]); - $parts = split(":", $ends[count($ends) - 1]); + $parts = explode(":", $ends[count($ends) - 1]); $dstip = trim($parts[0]); echo "<tr valign='top' name='r:{$srcip}:{$dstip}'> diff --git a/usr/local/www/firewall_aliases_edit.php b/usr/local/www/firewall_aliases_edit.php index 6413c8f..9263955 100755 --- a/usr/local/www/firewall_aliases_edit.php +++ b/usr/local/www/firewall_aliases_edit.php @@ -213,14 +213,14 @@ if ($_POST) { if(file_exists("{$temp_filename}/aliases")) { $file_contents = file_get_contents("{$temp_filename}/aliases"); $file_contents = str_replace("#", "\n#", $file_contents); - $file_contents_split = split("\n", $file_contents); + $file_contents_split = explode("\n", $file_contents); foreach($file_contents_split as $fc) { // Stop at 3000 items, aliases larger than that tend to break both pf and the WebGUI. if ($address_count >= 3000) break; $tmp = trim($fc); if(stristr($fc, "#")) { - $tmp_split = split("#", $tmp); + $tmp_split = explode("#", $tmp); $tmp = trim($tmp_split[0]); } $tmp = trim($tmp); diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php index d2a9caa..0d92d1a 100755 --- a/usr/local/www/firewall_nat.php +++ b/usr/local/www/firewall_nat.php @@ -290,7 +290,7 @@ echo "<script type=\"text/javascript\" language=\"javascript\" src=\"/javascript <?php $localport = $natent['local-port']; - list($dstbeginport, $dstendport) = split("-", $natent['destination']['port']); + list($dstbeginport, $dstendport) = explode("-", $natent['destination']['port']); if ($dstendport) { $localendport = $natent['local-port'] + $dstendport - $dstbeginport; diff --git a/usr/local/www/firewall_virtual_ip_edit.php b/usr/local/www/firewall_virtual_ip_edit.php index 841b629..a354475 100755 --- a/usr/local/www/firewall_virtual_ip_edit.php +++ b/usr/local/www/firewall_virtual_ip_edit.php @@ -64,7 +64,7 @@ else $id = $_GET['id']; function return_first_two_octets($ip) { - $ip_split = split("\.", $ip); + $ip_split = explode("\.", $ip); return $ip_split[0] . "." . $ip_split[1]; } diff --git a/usr/local/www/installer/installer.php b/usr/local/www/installer/installer.php index fdb682a..96b58a5 100644 --- a/usr/local/www/installer/installer.php +++ b/usr/local/www/installer/installer.php @@ -205,16 +205,16 @@ function installer_find_first_disk() { function pcsysinstall_get_disk_info($diskname) { global $g, $fstype, $savemsg; - $disk = split("\n", `/usr/sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh disk-list`); + $disk = explode("\n", `/usr/sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh disk-list`); $disks_array = array(); foreach($disk as $d) { - $disks_info = split(":", $d); + $disks_info = explode(":", $d); $tmp_array = array(); if($disks_info[0] == $diskname) { - $disk_info = split("\n", `/usr/sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh disk-info {$disks_info[0]}`); - $disk_info_split = split("=", $disk_info); + $disk_info = explode("\n", `/usr/sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh disk-info {$disks_info[0]}`); + $disk_info_split = explode("=", $disk_info); foreach($disk_info as $di) { - $di_s = split("=", $di); + $di_s = explode("=", $di); if($di_s[0]) $tmp_array[$di_s[0]] = $di_s[1]; } @@ -229,16 +229,16 @@ function pcsysinstall_get_disk_info($diskname) { // Return an array with all disks information. function installer_find_all_disks() { global $g, $fstype, $savemsg; - $disk = split("\n", `/usr/sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh disk-list`); + $disk = explode("\n", `/usr/sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh disk-list`); $disks_array = array(); foreach($disk as $d) { if(!$d) continue; - $disks_info = split(":", $d); + $disks_info = explode(":", $d); $tmp_array = array(); - $disk_info = split("\n", `/usr/sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh disk-info {$disks_info[0]}`); + $disk_info = explode("\n", `/usr/sbin/pc-sysinstall/pc-sysinstall/pc-sysinstall.sh disk-info {$disks_info[0]}`); foreach($disk_info as $di) { - $di_s = split("=", $di); + $di_s = explode("=", $di); if($di_s[0]) $tmp_array[$di_s[0]] = $di_s[1]; } @@ -1209,4 +1209,4 @@ function return_rowhelper_row($rownum, $mountpoint, $fstype, $disk, $size, $encp return $custom_txt; } -?>
\ No newline at end of file +?> diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php index 2ac5c28..c197c63 100755 --- a/usr/local/www/interfaces.php +++ b/usr/local/www/interfaces.php @@ -132,7 +132,7 @@ if ($wancfg['if'] == $a_ppps[$pppid]['if']) { } log_error("ResetTime:".$resetTime); if ($a_ppps[$pppid]['pppoe-reset-type'] == "custom") { - $resetTime_a = split(" ", $resetTime); + $resetTime_a = explode(" ", $resetTime); $pconfig['pppoe_pr_custom'] = true; $pconfig['pppoe_resetminute'] = $resetTime_a[0]; $pconfig['pppoe_resethour'] = $resetTime_a[1]; diff --git a/usr/local/www/interfaces_ppps_edit.php b/usr/local/www/interfaces_ppps_edit.php index 50378f4..6f95bec 100644 --- a/usr/local/www/interfaces_ppps_edit.php +++ b/usr/local/www/interfaces_ppps_edit.php @@ -124,7 +124,7 @@ if (isset($id) && $a_ppps[$id]) { } if ($a_ppps[$id]['pppoe-reset-type'] == "custom") { - $resetTime_a = split(" ", $resetTime); + $resetTime_a = explode(" ", $resetTime); $pconfig['pppoe_pr_custom'] = true; $pconfig['pppoe_resetminute'] = $resetTime_a[0]; $pconfig['pppoe_resethour'] = $resetTime_a[1]; diff --git a/usr/local/www/services_dyndns.php b/usr/local/www/services_dyndns.php index 28eefb0..9b359f4 100755 --- a/usr/local/www/services_dyndns.php +++ b/usr/local/www/services_dyndns.php @@ -131,7 +131,7 @@ include("head.inc"); $filename = "{$g['conf_path']}/dyndns_{$if}{$dyndns['type']}" . escapeshellarg($dyndns['host']) . ".cache"; $ipaddr = dyndnsCheckIP($if); if(file_exists($filename)) { - $cached_ip_s = split(":", file_get_contents($filename)); + $cached_ip_s = explode(":", file_get_contents($filename)); $cached_ip = $cached_ip_s[0]; if($ipaddr <> $cached_ip) echo "<font color='red'>"; diff --git a/usr/local/www/status_rrd_graph.php b/usr/local/www/status_rrd_graph.php index 125abf4..78acd9c 100755 --- a/usr/local/www/status_rrd_graph.php +++ b/usr/local/www/status_rrd_graph.php @@ -384,7 +384,7 @@ function get_dates($curperiod, $graph) { if($curcat == "custom") { foreach ($custom_databases as $db => $database) { - $optionc = split("-", $database); + $optionc = explode("-", $database); $search = array("-", ".rrd", $optionc); $replace = array(" :: ", "", $friendly); echo "<option value=\"{$database}\""; @@ -399,7 +399,7 @@ function get_dates($curperiod, $graph) { if(! preg_match("/($curcat)/i", $database)) { continue; } - $optionc = split("-", $database); + $optionc = explode("-", $database); $search = array("-", ".rrd", $optionc); $replace = array(" :: ", "", $friendly); @@ -487,7 +487,7 @@ function get_dates($curperiod, $graph) { if(! preg_match("/($curcat)/i", $curdatabase)) { continue; } - $optionc = split("-", $curdatabase); + $optionc = explode("-", $curdatabase); $search = array("-", ".rrd", $optionc); $replace = array(" :: ", "", $friendly); switch($curoption) { @@ -562,7 +562,7 @@ function get_dates($curperiod, $graph) { if(! stristr($curdatabase, $curcat)) { continue; } - $optionc = split("-", $curdatabase); + $optionc = explode("-", $curdatabase); $search = array("-", ".rrd", $optionc); $replace = array(" :: ", "", $friendly); switch($curoption) { diff --git a/usr/local/www/status_rrd_graph_img.php b/usr/local/www/status_rrd_graph_img.php index f6247e5..3756f65 100644 --- a/usr/local/www/status_rrd_graph_img.php +++ b/usr/local/www/status_rrd_graph_img.php @@ -127,7 +127,7 @@ foreach($scales as $scalelength => $value) { // log_error("start $start, end $end, archivestart $archivestart, average $average, scale $scale, seconds $seconds"); /* Deduce a interface if possible and use the description */ -$curif = split("-", $curdatabase); +$curif = explode("-", $curdatabase); $curif = "$curif[0]"; $friendly = convert_friendly_interface_to_friendly_descr(strtolower($curif)); if($friendly == "") { diff --git a/usr/local/www/system.php b/usr/local/www/system.php index 190f344..6248ada 100755 --- a/usr/local/www/system.php +++ b/usr/local/www/system.php @@ -109,7 +109,7 @@ if ($_POST) { $pconfig = $_POST; /* input validation */ - $reqdfields = split(" ", "hostname domain"); + $reqdfields = explode(" ", "hostname domain"); $reqdfieldsn = array(gettext("Hostname"),gettext("Domain")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); diff --git a/usr/local/www/system_firmware_settings.php b/usr/local/www/system_firmware_settings.php index e7dec02..5792a2e 100755 --- a/usr/local/www/system_firmware_settings.php +++ b/usr/local/www/system_firmware_settings.php @@ -76,7 +76,7 @@ include("head.inc"); exec("/usr/bin/fetch -q -o /tmp/manifest \"{$g['update_manifest']}\""); if(file_exists("/tmp/manifest")) { - $preset_urls_split = split("\n", file_get_contents("/tmp/manifest")); + $preset_urls_split = explode("\n", file_get_contents("/tmp/manifest")); } ?> @@ -129,7 +129,7 @@ function enable_altfirmwareurl(enable_over) { <option></option> <?php foreach($preset_urls_split as $pus) { - $pus_text = split("\t", $pus); + $pus_text = explode("\t", $pus); if($pus_text[0]) echo "<option value='{$pus_text[1]}'>{$pus_text[0]}</option>"; } diff --git a/usr/local/www/widgets/widgets/picture.widget.php b/usr/local/www/widgets/widgets/picture.widget.php index 90bf288..0c47875 100644 --- a/usr/local/www/widgets/widgets/picture.widget.php +++ b/usr/local/www/widgets/widgets/picture.widget.php @@ -33,7 +33,7 @@ require_once("pfsense-utils.inc"); require_once("functions.inc"); if($_GET['getpic']=="true") { - $pic_type_s = split("\.", $config['widgets']['picturewidget_filename']); + $pic_type_s = explode("\.", $config['widgets']['picturewidget_filename']); $pic_type = $pic_type_s[1]; if($config['widgets']['picturewidget']) $data = base64_decode($config['widgets']['picturewidget']); diff --git a/usr/local/www/widgets/widgets/rss.widget.php b/usr/local/www/widgets/widgets/rss.widget.php index 0843684..d7bbcbd 100644 --- a/usr/local/www/widgets/widgets/rss.widget.php +++ b/usr/local/www/widgets/widgets/rss.widget.php @@ -43,7 +43,7 @@ if($_POST['rssfeed']) { // Use saved feed and max items if($config['widgets']['rssfeed']) - $rss_feed_s = split(",", $config['widgets']['rssfeed']); + $rss_feed_s = explode(",", $config['widgets']['rssfeed']); if($config['widgets']['rssmaxitems']) $max_items = $config['widgets']['rssmaxitems']; diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php index a136f7b..a40bb38 100755 --- a/usr/local/www/wizard.php +++ b/usr/local/www/wizard.php @@ -125,7 +125,7 @@ if ($_POST && !$input_errors) { function update_config_field($field, $updatetext, $unset, $arraynum, $field_type) { global $config; - $field_split = split("->",$field); + $field_split = explode("->",$field); foreach ($field_split as $f) $field_conv .= "['" . $f . "']"; if($field_conv == "") @@ -359,7 +359,7 @@ function showchange() { if($field['bindstofield'] <> "") { $arraynum = ""; $field_conv = ""; - $field_split = split("->", $field['bindstofield']); + $field_split = explode("->", $field['bindstofield']); // arraynum is used in cases where there is an array of the same field // name such as dnsserver (2 of them) if($field['arraynum'] <> "") @@ -855,7 +855,7 @@ if($pkg['step'][$stepid]['disableallfieldsbydefault'] <> "") { foreach ($field['options']['option'] as $opt) { if($opt['enablefields'] <> "") { echo "\t\tcase " . $idcounter . ":\n"; - $enablefields_split = split(",", $opt['enablefields']); + $enablefields_split = explode(",", $opt['enablefields']); foreach ($enablefields_split as $efs) { $fieldname = ereg_replace(" ", "", $efs); $fieldname = strtolower($fieldname); diff --git a/usr/local/www/wizards/setup_wizard.xml b/usr/local/www/wizards/setup_wizard.xml index 5d672af..cb6b334 100644 --- a/usr/local/www/wizards/setup_wizard.xml +++ b/usr/local/www/wizards/setup_wizard.xml @@ -502,11 +502,11 @@ print_info_box_np("Invalid LAN IP Address. Please press back in your browser window and correct."); die; } - $ft = split("\.", $_POST['lanipaddress']); + $ft = explode("\.", $_POST['lanipaddress']); $ft_ip = $ft[0] . "." . $ft[1] . "." . $ft[2] . "."; $config['dhcpd']['lan']['range']['from'] = $ft_ip . "10"; $highestip = gen_subnet_max($_POST['lanipaddress'], $config['interfaces']['lan']['subnet']); - $hi = split("\.", $highestip); + $hi = explode("\.", $highestip); $highestip = $hi[3]-10; $config['dhcpd']['lan']['range']['to'] = $ft_ip . $highestip; ]]> |