mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-07-30 19:50:36 -04:00
Add a pause button to the server add dialog and if it is clicked then
the upload is paused. If the dialog is closed and the task is not complete then a warning message is displayed on the album.
This commit is contained in:
@@ -107,7 +107,7 @@ class Server_Add_Controller extends Controller {
|
||||
break;
|
||||
|
||||
case "error":
|
||||
message::success(t("Add from server completed with errors"));
|
||||
message::warning(t("Add from server completed with errors"));
|
||||
break;
|
||||
}
|
||||
print json_encode(array("result" => "success",
|
||||
@@ -119,7 +119,15 @@ class Server_Add_Controller extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function finish($id, $task_id) {
|
||||
public function finish($id, $task_id, $cancelled=false) {
|
||||
access::verify_csrf();
|
||||
|
||||
$task = task::run($task_id);
|
||||
|
||||
if (!$task->done && $cancelled) {
|
||||
message::warning(t("Add from server was cancelled prior to completion"));
|
||||
}
|
||||
|
||||
batch::stop();
|
||||
print json_encode(array("result" => "success"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user