diff options
author | Phil Davis <phil.davis@inf.org> | 2016-01-25 21:03:00 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-01-25 21:03:00 +0545 |
commit | ae2915a4e9a3e351d849d0b3074981ea726a6449 (patch) | |
tree | c36272a863178839a42d00abb64e00cd98b4fc9a /src/usr/local/www/pkg.php | |
parent | 74817ee23827a1591bf97bfc4e6631321e89b490 (diff) | |
download | pfsense-ae2915a4e9a3e351d849d0b3074981ea726a6449.zip pfsense-ae2915a4e9a3e351d849d0b3074981ea726a6449.tar.gz |
pkg.php consolidate else-if statement
Diffstat (limited to 'src/usr/local/www/pkg.php')
-rwxr-xr-x | src/usr/local/www/pkg.php | 6 |
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)) { |