summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-01-25 20:59:45 +0545
committerPhil Davis <phil.davis@inf.org>2016-01-25 20:59:45 +0545
commitf155b6e4300f6566985b8b7080a4e02c640955ed (patch)
treed9373042362f1d36c9bb41500aeb1ccfc70c9287
parent9fa1712002c42cc3aa5467e9d769c7d036bd880e (diff)
downloadpfsense-f155b6e4300f6566985b8b7080a4e02c640955ed.zip
pfsense-f155b6e4300f6566985b8b7080a4e02c640955ed.tar.gz
pkg.php consolidate else-if statement
-rwxr-xr-xusr/local/www/pkg.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/usr/local/www/pkg.php b/usr/local/www/pkg.php
index 945559f..c60806d 100755
--- a/usr/local/www/pkg.php
+++ b/usr/local/www/pkg.php
@@ -56,10 +56,8 @@ if($xml == "") {
$pkg_realpath = realpath($pkg_full_path);
if (empty($pkg_realpath)) {
$path_error = sprintf(gettext("ERROR: Package path %s not found."), htmlspecialchars($pkg_full_path));
- } else {
- if (substr_compare($pkg_realpath, $pkg_xml_prefix, 0, strlen($pkg_xml_prefix))) {
- $path_error = sprintf(gettext("ERROR: Invalid path %s specified."), htmlspecialchars($pkg_full_path));
- }
+ } else if (substr_compare($pkg_realpath, $pkg_xml_prefix, 0, strlen($pkg_xml_prefix))) {
+ $path_error = sprintf(gettext("ERROR: Invalid path %s specified."), htmlspecialchars($pkg_full_path));
}
if (!empty($path_error)) {
OpenPOWER on IntegriCloud