mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
rpc: msearch: Give orphans on empty maintainer argument
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com> Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
e8a6fe1efc
commit
da1153857f
1 changed files with 6 additions and 2 deletions
|
@ -437,9 +437,13 @@ class AurJSON {
|
|||
*/
|
||||
private function msearch($http_data) {
|
||||
$maintainer = $http_data['arg'];
|
||||
$maintainer = $this->dbh->quote($maintainer);
|
||||
|
||||
$where_condition = "Users.Username = $maintainer ";
|
||||
if (empty($maintainer)) {
|
||||
$where_condition = "Users.ID is NULL";
|
||||
} else {
|
||||
$maintainer = $this->dbh->quote($maintainer);
|
||||
$where_condition = "Users.Username = $maintainer ";
|
||||
}
|
||||
|
||||
return $this->process_query('msearch', $where_condition);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue