diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-04-21 06:04:03 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-04-21 06:04:03 +0000 |
commit | c94fc344e853ac00b83414f2f9175dad8aebba97 (patch) | |
tree | 51d677a6efa0bcc2f0624a13e82bd77168fe5f2c /modules/organize/helpers | |
parent | 201e8cdf7046937eef0e53542d777bf67c496054 (diff) |
Added progress bar and pause and continue functionality to rearrange
Diffstat (limited to 'modules/organize/helpers')
-rw-r--r-- | modules/organize/helpers/organize_task.php | 7 |
1 files changed, 2 insertions, 5 deletions
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) { |