Make sure that pkg_change_category() works, even if the "N" is used and
the "ID" get parameter is unset. Note that this is considered to be a
hack rather than a proper fix; pkg_change_category() needs a lot of
work.

Signed-off-by: Lukas Fleischer <[email protected]>
---
 web/lib/pkgfuncs.inc.php | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 1351e72..6fad628 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -1212,6 +1212,8 @@ function pkg_change_category($atype, $dbh=NULL) {
 
        if (isset($_GET["ID"])) {
                $pid = $_GET["ID"];
+       } elseif (isset($_GET["N"])) {
+               $pid = pkgid_from_name($_GET["N"]);
        } else {
                return __("Missing package ID.");
        }
-- 
1.7.11.2

Reply via email to