summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xetc/ecl.php4
-rw-r--r--etc/inc/auth.inc16
-rw-r--r--etc/inc/captiveportal.inc4
-rw-r--r--etc/inc/config.lib.inc2
-rw-r--r--etc/inc/dyndns.class4
-rw-r--r--etc/inc/filter.inc16
-rw-r--r--etc/inc/filter_log.inc14
-rw-r--r--etc/inc/pfsense-utils.inc13
-rw-r--r--etc/inc/pkg-utils.inc2
-rw-r--r--etc/inc/upgrade_config.inc2
-rw-r--r--etc/inc/voucher.inc4
-rw-r--r--etc/inc/vslb.inc2
-rwxr-xr-xtmp/post_upgrade_command.php4
-rwxr-xr-xusr/local/captiveportal/index.php2
-rwxr-xr-xusr/local/sbin/pfSsh.php8
-rwxr-xr-xusr/local/www/diag_backup.php4
-rw-r--r--usr/local/www/diag_dns.php4
-rwxr-xr-xusr/local/www/diag_dump_states.php4
-rwxr-xr-xusr/local/www/firewall_aliases_edit.php4
-rwxr-xr-xusr/local/www/firewall_nat.php2
-rwxr-xr-xusr/local/www/firewall_virtual_ip_edit.php2
-rw-r--r--usr/local/www/installer/installer.php20
-rwxr-xr-xusr/local/www/interfaces.php2
-rw-r--r--usr/local/www/interfaces_ppps_edit.php2
-rwxr-xr-xusr/local/www/services_dyndns.php2
-rwxr-xr-xusr/local/www/status_rrd_graph.php8
-rw-r--r--usr/local/www/status_rrd_graph_img.php2
-rwxr-xr-xusr/local/www/system.php2
-rwxr-xr-xusr/local/www/system_firmware_settings.php4
-rw-r--r--usr/local/www/widgets/widgets/picture.widget.php2
-rw-r--r--usr/local/www/widgets/widgets/rss.widget.php2
-rwxr-xr-xusr/local/www/wizard.php6
-rw-r--r--usr/local/www/wizards/setup_wizard.xml4
33 files changed, 87 insertions, 86 deletions
diff --git a/etc/ecl.php b/etc/ecl.php
index 47e187a..425aed1 100755
--- a/etc/ecl.php
+++ b/etc/ecl.php
@@ -49,7 +49,7 @@ function get_disk_slices($disk) {
$slices = str_replace("/dev/", "", $slices);
if($slices == "ls: No match.")
return;
- $slices_array = split(" ", $slices);
+ $slices_array = explode(" ", $slices);
return $slices_array;
}
@@ -161,4 +161,4 @@ echo "External config loader 1.0 is now starting...";
find_config_xml();
echo "\n";
-?> \ No newline at end of file
+?>
diff --git a/etc/inc/auth.inc b/etc/inc/auth.inc
index 81d3058..48052a9 100644
--- a/etc/inc/auth.inc
+++ b/etc/inc/auth.inc
@@ -825,7 +825,7 @@ function ldap_get_user_ous($show_complete_ou=true, $authcfg) {
if (is_array($info)) {
foreach ($info as $inf) {
if (!$show_complete_ou) {
- $inf_split = split(",", $inf['dn']);
+ $inf_split = explode(",", $inf['dn']);
$ou = $inf_split[0];
$ou = str_replace("OU=","", $ou);
$ou = str_replace("CN=","", $ou);
@@ -852,12 +852,12 @@ function ldap_get_groups($username, $authcfg) {
return false;
if(stristr($username, "@")) {
- $username_split=split("\@", $username);
+ $username_split = explode("\@", $username);
$username = $username_split[0];
}
if(stristr($username, "\\")) {
- $username_split=split("\\", $username);
+ $username_split = explode("\\", $username);
$username = $username_split[0];
}
@@ -943,7 +943,7 @@ function ldap_get_groups($username, $authcfg) {
/* Iterate through the groups and throw them into an array */
foreach ($info[0][$ldapgroupattribute] as $member) {
if (stristr($member, "CN=") !== false) {
- $membersplit = split(",", $member);
+ $membersplit = explode(",", $member);
$memberof[] = preg_replace("/CN=/i", "", $membersplit[0]);
}
}
@@ -969,11 +969,11 @@ function ldap_backed($username, $passwd, $authcfg) {
return;
if(stristr($username, "@")) {
- $username_split=split("\@", $username);
+ $username_split = explode("\@", $username);
$username = $username_split[0];
}
if(stristr($username, "\\")) {
- $username_split=split("\\", $username);
+ $username_split = explode("\\", $username);
$username = $username_split[0];
}
@@ -1056,7 +1056,7 @@ function ldap_backed($username, $passwd, $authcfg) {
}
/* Get LDAP Authcontainers and split em up. */
- $ldac_splits = split(";", $ldapauthcont);
+ $ldac_splits = explode(";", $ldapauthcont);
/* setup the usercount so we think we havn't found anyone yet */
$usercount = 0;
@@ -1357,7 +1357,7 @@ function session_auth() {
/* and destroy it */
session_destroy();
- $scriptName = split("/", $_SERVER["SCRIPT_FILENAME"]);
+ $scriptName = explode("/", $_SERVER["SCRIPT_FILENAME"]);
$scriptElms = count($scriptName);
$scriptName = $scriptName[$scriptElms-1];
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc
index e1d80e0..0fda324 100644
--- a/etc/inc/captiveportal.inc
+++ b/etc/inc/captiveportal.inc
@@ -1505,14 +1505,14 @@ function getVolume($ip) {
captiveportal_ipfw_set_context($cpzone);
exec("/sbin/ipfw table 1 entrystats {$ip}", $ipfwin);
if ($ipfwin[0]) {
- $ipfwin = split(" ", $ipfwin[0]);
+ $ipfwin = explode(" ", $ipfwin[0]);
$volume['input_pkts'] = $ipfwin[2];
$volume['input_bytes'] = $ipfwin[3];
}
exec("/sbin/ipfw table 2 entrystats {$ip}", $ipfwout);
if ($ipfwout[0]) {
- $ipfwout = split(" ", $ipfwout[0]);
+ $ipfwout = explode(" ", $ipfwout[0]);
$volume['output_pkts'] = $ipfwout[2];
$volume['output_bytes'] = $ipfwout[3];
}
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc
index c54c854..4af04ae 100644
--- a/etc/inc/config.lib.inc
+++ b/etc/inc/config.lib.inc
@@ -190,7 +190,7 @@ function generate_config_cache($config) {
}
function discover_last_backup() {
- $backups = split("\n", `cd /cf/conf/backup && ls -ltr *.xml | awk '{print \$9}'`);
+ $backups = explode("\n", `cd /cf/conf/backup && ls -ltr *.xml | awk '{print \$9}'`);
$last_backup = "";
foreach($backups as $backup)
if($backup)
diff --git a/etc/inc/dyndns.class b/etc/inc/dyndns.class
index d980f4b..0f4715d 100644
--- a/etc/inc/dyndns.class
+++ b/etc/inc/dyndns.class
@@ -525,7 +525,7 @@
case 'dhs':
break;
case 'noip':
- list($ip,$code) = split(":",$data);
+ list($ip,$code) = explode(":",$data);
switch ($code) {
case 0:
$status = "phpDynDNS: (Success) IP address is current, no update performed.";
@@ -900,7 +900,7 @@
if (file_exists($this->_cacheFile)) {
$contents = file_get_contents($this->_cacheFile);
- list($cacheIP,$cacheTime) = split(':', $contents);
+ list($cacheIP,$cacheTime) = explode(':', $contents);
$this->_debug($cacheIP.'/'.$cacheTime);
$initial = false;
$log_error .= "Cached IP: {$cacheIP} ";
diff --git a/etc/inc/filter.inc b/etc/inc/filter.inc
index dc635cd..23383c0 100644
--- a/etc/inc/filter.inc
+++ b/etc/inc/filter.inc
@@ -331,7 +331,7 @@ function filter_configure_sync($delete_states_if_needed = true) {
*/
if($rules_loading <> 0) {
$rules_error = exec_command("/sbin/pfctl -f {$g['tmp_path']}/rules.debug");
- $line_error = split("\:", $rules_error);
+ $line_error = explode("\:", $rules_error);
$line_number = $line_error[1];
$line_split = file("{$g['tmp_path']}/rules.debug");
if(is_array($line_split))
@@ -464,7 +464,7 @@ function filter_generate_scrubing() {
function filter_generate_nested_alias($name, $alias, &$aliasnesting, &$aliasaddrnesting) {
global $aliastable, $filterdns;
- $addresses = split(" ", $alias);
+ $addresses = explode(" ", $alias);
$finallist = "";
$builtlist = "";
$urltable_nesting = "";
@@ -595,9 +595,9 @@ function filter_generate_aliases() {
foreach ($config['openvpn']['user'] as $openvpn)
$openvpncfg[$openvpn['name']] = $openvpn['ip'];
}
- $vpn_lines = split("\n", $addrlist);
+ $vpn_lines = explode("\n", $addrlist);
foreach ($vpn_lines as $vpn_line) {
- $vpn_address_split = split(" ", $vpn_line);
+ $vpn_address_split = explode(" ", $vpn_line);
foreach($vpn_address_split as $vpnsplit) {
if(isset($openvpncfg[$vpnsplit])) {
$newaddress .= " ";
@@ -2856,7 +2856,7 @@ function filter_tdr_day($schedule) {
if($weekday == 0)
$weekday = 7;
$date = date("d");
- $defined_days = split(",", $schedule);
+ $defined_days = explode(",", $schedule);
if($g['debug'])
log_error("[TDR DEBUG] filter_tdr_day($schedule)");
foreach($defined_days as $dd) {
@@ -2868,7 +2868,7 @@ function filter_tdr_day($schedule) {
function filter_tdr_hour($schedule) {
global $g;
/* $schedule should be a string such as 16:00-19:00 */
- $tmp = split("-", $schedule);
+ $tmp = explode("-", $schedule);
$starting_time = strtotime($tmp[0]);
$ending_time = strtotime($tmp[1]);
$now = strtotime("now");
@@ -2893,7 +2893,7 @@ function filter_tdr_position($schedule) {
log_error("[TDR DEBUG] filter_tdr_position($schedule) $weekday");
if($weekday == 0)
$weekday = 7;
- $schedule_days = split(",", $schedule);
+ $schedule_days = explode(",", $schedule);
foreach($schedule_days as $day) {
if($day == $weekday)
return true;
@@ -2907,7 +2907,7 @@ function filter_tdr_month($schedule) {
* Calculate month
*/
$todays_month = date("n");
- $months = split(",", $schedule);
+ $months = explode(",", $schedule);
if($g['debug'])
log_error("[TDR DEBUG] filter_tdr_month($schedule)");
foreach($months as $month) {
diff --git a/etc/inc/filter_log.inc b/etc/inc/filter_log.inc
index 13b68cf..3429ca7 100644
--- a/etc/inc/filter_log.inc
+++ b/etc/inc/filter_log.inc
@@ -126,7 +126,7 @@ function parse_filter_line($line) {
$flent['interface'] = convert_real_interface_to_friendly_descr($flent['realint']);
- $tmp = split("/", $rule);
+ $tmp = explode("/", $rule);
$flent['rulenum'] = $tmp[0];
$proto = array(" ", "(?)");
@@ -144,13 +144,13 @@ function parse_filter_line($line) {
} elseif (!(strpos($line, 'sum ok] ') === FALSE)) {
preg_match("/.*\ssum ok]\s(.*)\,\s.*/", $line, $proto);
}
- $proto = split(" ", trim($proto[1]));
+ $proto = explode(" ", trim($proto[1]));
$flent['proto'] = rtrim($proto[0], ",");
/* If we're dealing with TCP, try to determine the flags/control bits */
$flent['tcpflags'] = "";
if ($flent['proto'] == "TCP") {
- $flags = split('[\, ]', $leftovers);
+ $flags = explode('[\, ]', $leftovers);
$flent['tcpflags'] = str_replace(".", "A", substr($flags[1], 1, -1));
} elseif ($flent['proto'] == "Options") {
$flent['proto'] = "none";
@@ -174,21 +174,21 @@ function parse_ipport($addr) {
$port = '';
if (substr_count($addr, '.') > 1) {
/* IPv4 */
- $addr_split = split("\.", $addr);
+ $addr_split = explode("\.", $addr);
$ip = "{$addr_split[0]}.{$addr_split[1]}.{$addr_split[2]}.{$addr_split[3]}";
if ($ip == "...")
return array($addr, '');
if($addr_split[4] != "") {
- $port_split = split("\:", $addr_split[4]);
+ $port_split = explode("\:", $addr_split[4]);
$port = $port_split[0];
}
} else {
/* IPv6 */
- $addr = split(" ", $addr);
+ $addr = explode(" ", $addr);
$addr = rtrim($addr[0], ":");
- $addr_split = split("\.", $addr);
+ $addr_split = explode("\.", $addr);
if (count($addr_split) > 1) {
$ip = $addr_split[0];
$port = $addr_split[1];
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index c1cf525..a1a2c73 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -329,7 +329,7 @@ function get_carp_status() {
*/
function convert_ip_to_network_format($ip, $subnet) {
- $ipsplit = split('[.]', $ip);
+ $ipsplit = explode('[.]', $ip);
$string = $ipsplit[0] . "." . $ipsplit[1] . "." . $ipsplit[2] . ".0/" . $subnet;
return $string;
}
@@ -898,7 +898,7 @@ function auto_login() {
$status = true;
$gettytab = file_get_contents("/etc/gettytab");
- $getty_split = split("\n", $gettytab);
+ $getty_split = explode("\n", $gettytab);
conf_mount_rw();
$fd = false;
$tries = 0;
@@ -942,7 +942,7 @@ function setup_serial_port($when="save", $path="") {
$boot_config = "";
if($g['platform'] <> "cdrom") {
- $boot_config_split = split("\n", $boot_config);
+ $boot_config_split = explode("\n", $boot_config);
$fd = fopen($boot_config_file,"w");
if($fd) {
foreach($boot_config_split as $bcs) {
@@ -986,7 +986,7 @@ function setup_serial_port($when="save", $path="") {
}
}
$ttys = file_get_contents("/etc/ttys");
- $ttys_split = split("\n", $ttys);
+ $ttys_split = explode("\n", $ttys);
$fd = fopen("/etc/ttys", "w");
foreach($ttys_split as $tty) {
if(stristr($tty, "ttyd0") or stristr($tty, "ttyu0")) {
@@ -1597,6 +1597,7 @@ function update_progress_bar($percent) {
/* Split() is being DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 6.0.0. Relying on this feature is highly discouraged. */
if(!function_exists("split")) {
function split($seperator, $haystack, $limit = null) {
+ log_error("deprecated split() call with seperator '{$seperator}'");
return preg_split($seperator, $haystack, $limit);
}
}
@@ -1669,11 +1670,11 @@ function update_alias_url_data() {
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) {
$tmp = trim($fc);
if(stristr($fc, "#")) {
- $tmp_split = split("#", $tmp);
+ $tmp_split = explode("#", $tmp);
$tmp = trim($tmp_split[0]);
}
if(trim($tmp) <> "") {
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index 95de0f7..8f60e61 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -479,7 +479,7 @@ function pkg_fetch_recursive($pkgname, $filename, $dependlevel = 0, $base_url =
$filename = str_replace("\n", " ", $filename);
$filename = str_replace(" ", " ", $filename);
- $pkgs = split(" ", $filename);
+ $pkgs = explode(" ", $filename);
foreach($pkgs as $filename) {
$filename = trim($filename);
if (($g['platform'] == "nanobsd") || ($g['platform'] == "embedded")) {
diff --git a/etc/inc/upgrade_config.inc b/etc/inc/upgrade_config.inc
index 595b87a..1126473 100644
--- a/etc/inc/upgrade_config.inc
+++ b/etc/inc/upgrade_config.inc
@@ -1876,7 +1876,7 @@ function upgrade_053_to_054() {
$gateway_group['item'] = array();
$i = 0;
foreach($lbpool['servers'] as $member) {
- $split = split("\|", $member);
+ $split = explode("\|", $member);
$interface = $split[0];
$monitor = $split[1];
/* on static upgraded configuration we automatically prepend GW_ */
diff --git a/etc/inc/voucher.inc b/etc/inc/voucher.inc
index dc7f613..b3bc5a4 100644
--- a/etc/inc/voucher.inc
+++ b/etc/inc/voucher.inc
@@ -213,7 +213,7 @@ function voucher_expire($voucher_received) {
}
// split into an array. Useful for multiple vouchers given
- $a_vouchers_received = split("[\t\n\r ]+",$voucher_received);
+ $a_vouchers_received = preg_split("/[\t\n\r ]+/s", $voucher_received);
$active_dirty = false;
$cpdb = captiveportal_read_db(false, 4); /* Indexed by Voucher */
@@ -329,7 +329,7 @@ function voucher_auth($voucher_received, $test = 0) {
}
// split into an array. Useful for multiple vouchers given
- $a_vouchers_received = split("[\t\n\r ]+",$voucher_received);
+ $a_vouchers_received = preg_split("/[\t\n\r ]+/s", $voucher_received);
$error = 0;
$test_result = array(); // used to display for voucher test option in GUI
$total_minutes = 0;
diff --git a/etc/inc/vslb.inc b/etc/inc/vslb.inc
index fc00d3d..71ea75f 100644
--- a/etc/inc/vslb.inc
+++ b/etc/inc/vslb.inc
@@ -385,7 +385,7 @@ function get_lb_summary() {
exec('/usr/local/sbin/relayctl show summary 2>&1', $relayctl);
$relay_hosts=Array();
foreach( (array) $relayctl as $line) {
- $t=split("\t", $line);
+ $t = explode("\t", $line);
switch (trim($t[1])) {
case "table":
$curpool=trim($t[2]);
diff --git a/tmp/post_upgrade_command.php b/tmp/post_upgrade_command.php
index 8ec4f73..2285ae8 100755
--- a/tmp/post_upgrade_command.php
+++ b/tmp/post_upgrade_command.php
@@ -23,9 +23,9 @@
$newslicedir = '/tmp' . $ARGV[1];
setup_serial_port("upgrade", $newslicedir);
- $files_to_process = split("\n", file_get_contents("/etc/pfSense.obsoletedfiles"));
+ $files_to_process = explode("\n", file_get_contents("/etc/pfSense.obsoletedfiles"));
foreach($files_to_process as $filename)
if(file_exists($filename))
exec("/bin/rm -f $filename");
-?> \ No newline at end of file
+?>
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;
]]>
OpenPOWER on IntegriCloud