Define "Packages.SubmitterUID" and "Packages.MaintainerUID" as "NULL".

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2011-02-27 17:12:43 +01:00
parent 84c2491e63
commit 1e3fa38de5
8 changed files with 20 additions and 10 deletions

View file

@ -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;
}

View file

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