pkgfuncs.inc.php: Fix pkg_change_category()

Make sure that pkg_change_category() works, even if the "N" get
parameter is used and "ID" 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 <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2012-07-18 07:21:52 +02:00
parent 0608bcae12
commit 3d07a58aac

View file

@ -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.");
}