summaryrefslogtreecommitdiffstats
path: root/etc/inc/util.inc
diff options
context:
space:
mode:
authorwhjvenyl <encecity@gmail.com>2012-04-12 11:21:24 +0300
committerwhjvenyl <encecity@gmail.com>2012-04-12 11:21:24 +0300
commite371f8b95a05da5829e451224519f35b382c7e37 (patch)
treeaeb4d92e9c481fdef66e0e57753f6ffc6d337347 /etc/inc/util.inc
parentf989a6ef078f63b803d96936fe3c8b1ea1a70292 (diff)
downloadpfsense-e371f8b95a05da5829e451224519f35b382c7e37.zip
pfsense-e371f8b95a05da5829e451224519f35b382c7e37.tar.gz
Update etc/inc/util.inc
Diffstat (limited to 'etc/inc/util.inc')
-rw-r--r--etc/inc/util.inc14
1 files changed, 4 insertions, 10 deletions
diff --git a/etc/inc/util.inc b/etc/inc/util.inc
index 525ad8d..aaa57c4 100644
--- a/etc/inc/util.inc
+++ b/etc/inc/util.inc
@@ -605,10 +605,7 @@ function is_port($port) {
function is_portrange($portrange) {
$ports = explode(":", $portrange);
- if(count($ports) == 2 && is_port($ports[0]) && is_port($ports[1]))
- return true;
- else
- return false;
+ return (count($ports) == 2 && is_port($ports[0]) && is_port($ports[1]));
}
/* returns true if $port is a valid port number or an alias thereof */
@@ -916,7 +913,7 @@ function get_interface_list($mode = "active", $keyby = "physical", $vfaces = "")
function log_error($error) {
global $g;
$page = $_SERVER['SCRIPT_NAME'];
- syslog(LOG_WARNING, "$page: $error");
+ syslog(LOG_ERROR, "$page: $error");
if ($g['debug'])
syslog(LOG_WARNING, var_dump(debug_backtrace()));
return;
@@ -1115,10 +1112,7 @@ function check_subnets_overlap($subnet1, $bits1, $subnet2, $bits2) {
$sn1 = gen_subnet_mask_long($relbits) & ip2long($subnet1);
$sn2 = gen_subnet_mask_long($relbits) & ip2long($subnet2);
- if ($sn1 == $sn2)
- return true;
- else
- return false;
+ return ($sn1 == $sn2);
}
/* compare two IP addresses */
@@ -1543,7 +1537,7 @@ function msort($array, $id="id", $sort_ascending=true) {
if ($sort_ascending) {
return $temp_array;
} else {
- return array_reverse($temp_array);
+ return array_reverse($temp_array);
}
}
OpenPOWER on IntegriCloud