mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
Define "Packages.SubmitterUID" and "Packages.MaintainerUID" as "NULL".
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
84c2491e63
commit
1e3fa38de5
8 changed files with 20 additions and 10 deletions
|
@ -152,7 +152,7 @@ Scripts:
|
|||
can also set the account type to Dev. TUs and Devs are able to
|
||||
delete accounts. If an account is deleted, all "Unsupported"
|
||||
packages are orphaned (the MaintainerUID field in the Packages
|
||||
table is set to Null).
|
||||
table is set to NULL).
|
||||
|
||||
- html/packages.php
|
||||
PHP script to search the package database. It should support
|
||||
|
|
|
@ -344,7 +344,7 @@ if ($_COOKIE["AURSID"]):
|
|||
}
|
||||
}
|
||||
|
||||
if (!$pdata["MaintainerUID"]) pkg_notify(account_from_sid($_COOKIE["AURSID"]), array($pdata["ID"]));
|
||||
if ($pdata["MaintainerUID"] === NULL) pkg_notify(account_from_sid($_COOKIE["AURSID"]), array($pdata["ID"]));
|
||||
|
||||
header('Location: packages.php?ID=' . $pdata['ID']);
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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"]);
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ if ($row["OutOfDateTS"] === NULL) {
|
|||
echo " value='".__("UnFlag Out-of-date")."'>\n";
|
||||
}
|
||||
|
||||
if ($row["MaintainerUID"] == 0) {
|
||||
if ($row["MaintainerUID"] === NULL) {
|
||||
echo "<input type='submit' class='button' name='do_Adopt'";
|
||||
echo " value='".__("Adopt Packages")."'>\n";
|
||||
} else if ($uid == $row["MaintainerUID"] ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue