diff options
author | Phil Davis <phil.davis@inf.org> | 2016-01-25 20:59:45 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-01-25 20:59:45 +0545 |
commit | f155b6e4300f6566985b8b7080a4e02c640955ed (patch) | |
tree | d9373042362f1d36c9bb41500aeb1ccfc70c9287 | |
parent | 9fa1712002c42cc3aa5467e9d769c7d036bd880e (diff) | |
download | pfsense-f155b6e4300f6566985b8b7080a4e02c640955ed.zip pfsense-f155b6e4300f6566985b8b7080a4e02c640955ed.tar.gz |
pkg.php consolidate else-if statement
-rwxr-xr-x | usr/local/www/pkg.php | 6 |
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)) { |