From ae2915a4e9a3e351d849d0b3074981ea726a6449 Mon Sep 17 00:00:00 2001 From: Phil Davis Date: Mon, 25 Jan 2016 21:03:00 +0545 Subject: pkg.php consolidate else-if statement --- src/usr/local/www/pkg.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') 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)) { -- cgit v1.1