diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-02-27 17:12:43 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-02-27 19:46:19 +0100 |
commit | 1e3fa38de5f940fef474fc3961c70b357b976308 (patch) | |
tree | 3474eadc3354f5312f245425deb9a2bf1fe64114 /web/lib | |
parent | 84c2491e63ef2797084f9378674d3e38248b7c24 (diff) | |
download | aurweb-1e3fa38de5f940fef474fc3961c70b357b976308.tar.xz |
Define "Packages.SubmitterUID" and "Packages.MaintainerUID" as "NULL".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/aur.inc | 2 | ||||
-rw-r--r-- | web/lib/pkgfuncs.inc | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/web/lib/aur.inc b/web/lib/aur.inc index 5a60c4c..b59addb 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -339,7 +339,7 @@ function can_submit_pkg($name="", $sid="") { if ($row[1] == "1") { return 1; } $my_uid = uid_from_sid($sid); - if (!$row[0] || $row[0] == $my_uid) { + if ($row[0] === NULL || $row[0] == $my_uid) { return 1; } diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 6da29b4..a0cd269 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"]); } |