Commit da115385 authored by Johannes Löthberg's avatar Johannes Löthberg Committed by Lukas Fleischer
Browse files

rpc: msearch: Give orphans on empty maintainer argument



Signed-off-by: Johannes Löthberg's avatarJohannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent e8a6fe1e
......@@ -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);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment