From c94fc344e853ac00b83414f2f9175dad8aebba97 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 21 Apr 2009 06:04:03 +0000 Subject: Added progress bar and pause and continue functionality to rearrange --- modules/organize/helpers/organize_task.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'modules/organize/helpers') diff --git a/modules/organize/helpers/organize_task.php b/modules/organize/helpers/organize_task.php index 735a0831..f923fdc7 100644 --- a/modules/organize/helpers/organize_task.php +++ b/modules/organize/helpers/organize_task.php @@ -28,13 +28,10 @@ class organize_task_Core { try { $stop = $context["position"] + $context["batch"]; - $sql = ""; for (; $context["position"] < $stop; $context["position"]++ ) { $id = $context["items"][$context["position"]]; - $sql .= "Update {items} set weight = {$context["position"]} where id=$id;"; - } - if (!empty($sql)) { - $db = Database::instance()->query($sql); + Database::instance() + ->query("Update {items} set weight = {$context["position"]} where id=$id;"); } $task->state = "success"; } catch(Exception $e) { -- cgit v1.2.3