Commit b85ccab5 authored by Leigh Stoller's avatar Leigh Stoller

Fix admin search by project/user arguments to backend script.

parent 74bb1d9e
...@@ -60,7 +60,7 @@ function Do_Search() ...@@ -60,7 +60,7 @@ function Do_Search()
} }
} }
elseif (isset($ajax_args["target_project"])) { elseif (isset($ajax_args["target_project"])) {
$target_project = Project::LookupByPid($ajax_args["target_project"]); $target_project = Project::Lookup($ajax_args["target_project"]);
if (!$target_project) { if (!$target_project) {
SPITAJAX_ERROR(1, "No such project"); SPITAJAX_ERROR(1, "No such project");
return; return;
...@@ -77,6 +77,20 @@ function Do_Search() ...@@ -77,6 +77,20 @@ function Do_Search()
$target_user = $this_user; $target_user = $this_user;
} }
} }
elseif (isset($ajax_args["target_project"])) {
$target_project = Project::Lookup($ajax_args["target_project"]);
if (!$target_project) {
SPITAJAX_ERROR(1, "No such project");
return;
}
}
elseif (isset($ajax_args["target_user"])) {
$target_user = User::LookupByUid($ajax_args["target_user"]);
if (!$target_user) {
SPITAJAX_ERROR(1, "No such user");
return;
}
}
$whereclause = ""; $whereclause = "";
if (isset($target_project)) { if (isset($target_project)) {
......
Markdown is supported
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