summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/pkg.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-01-25 21:03:00 +0545
committerPhil Davis <phil.davis@inf.org>2016-01-25 21:03:00 +0545
commitae2915a4e9a3e351d849d0b3074981ea726a6449 (patch)
treec36272a863178839a42d00abb64e00cd98b4fc9a /src/usr/local/www/pkg.php
parent74817ee23827a1591bf97bfc4e6631321e89b490 (diff)
downloadpfsense-ae2915a4e9a3e351d849d0b3074981ea726a6449.zip
pfsense-ae2915a4e9a3e351d849d0b3074981ea726a6449.tar.gz
pkg.php consolidate else-if statement
Diffstat (limited to 'src/usr/local/www/pkg.php')
-rwxr-xr-xsrc/usr/local/www/pkg.php6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/usr/local/www/pkg.php b/src/usr/local/www/pkg.php
index c8b09e0..ac085b4 100755
--- a/src/usr/local/www/pkg.php
+++ b/src/usr/local/www/pkg.php
@@ -80,10 +80,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