mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-22 23:05:18 -04:00
1) Change the processing so the server_add start task can return done = 1
if there are no eligible files selected 2) Change the javascript to handle this condition and show a pop up
This commit is contained in:
@@ -85,6 +85,15 @@ class Server_Add_Controller extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
if ($total_count == 0) {
|
||||
print json_encode(array("result" => "success",
|
||||
"url" => "",
|
||||
"task" => array(
|
||||
"id" => -1, "done" => 1, "percent_complete" => 100,
|
||||
"status" => t("No Eligible files, import cancelled"))));
|
||||
return;
|
||||
}
|
||||
|
||||
$task_def = Task_Definition::factory()
|
||||
->callback("server_add_task::add_from_server")
|
||||
->description(t("Add photos or movies from the local server"))
|
||||
|
||||
Reference in New Issue
Block a user