From 1e3fa38de5f940fef474fc3961c70b357b976308 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sun, 27 Feb 2011 17:12:43 +0100 Subject: Define "Packages.SubmitterUID" and "Packages.MaintainerUID" as "NULL". Signed-off-by: Lukas Fleischer --- web/lib/pkgfuncs.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/lib/pkgfuncs.inc') diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 6da29b4c..a0cd2692 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -487,7 +487,7 @@ function pkg_search_page($SID="") { } if ($_GET["do_Orphans"]) { - $q.= "AND MaintainerUID = 0 "; + $q.= "AND MaintainerUID IS NULL "; } if (isset($_GET['outdated'])) { @@ -813,7 +813,7 @@ function pkg_adopt ($atype, $ids, $action = True) { if ($action) { $user = uid_from_sid($_COOKIE["AURSID"]); } else { - $user = 0; + $user = 'NULL'; } $q.= "SET $field = $user "; @@ -821,7 +821,7 @@ function pkg_adopt ($atype, $ids, $action = True) { if ($action && $atype == "User") { # Regular users may only adopt orphan packages from unsupported - $q.= "AND $field = 0 "; + $q.= "AND $field IS NULL "; } else if ($atype == "User") { $q.= "AND $field = " . uid_from_sid($_COOKIE["AURSID"]); } -- cgit v1.2.3-24-g4f1b