Changeset 119

Show
Ignore:
Timestamp:
08/27/07 14:07:57 (17 months ago)
Author:
chris
Message:

Made sorting of the queue take advantage of the new multi-call support.

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/CHANGELOG

    r118 r119  
    2222 
    2323* Added multi-call support to HellaController. 
     24 
     25* Made sorting take advantage of the multi-call support, speeding up queue 
     26  sorting significantly. 
    2427 
    25281.7 
  • trunk/index.php

    r117 r119  
    152152                        if ($type == 1 && array_key_exists('order', $_POST) && is_array($_POST['order'])) { 
    153153                                arsort($_POST['order']); 
     154                                $c->beginMultiCall(); 
    154155                                foreach($_POST['order'] as $queueindex => $neworder) { 
    155156                                        if (ctype_digit($neworder) && $queueindex != $neworder) { 
     
    157158                                        } 
    158159                                } 
     160                                $c->endMultiCall(); 
    159161                        } elseif (array_key_exists('sortdirection', $_POST) && ctype_digit($_POST['sortdirection'])) { 
    160162                                $sortdir = $_POST['sortdirection']; 
     
    169171                                        } 
    170172                                        $i = 1; 
     173                                        $c->beginMultiCall(); 
    171174                                        while (list($id) = each($nzbName)) { 
    172175                                                $c->move($c->queue[$id]['id'], $i++); 
    173176                                        } 
     177                                        $c->endMultiCall(); 
    174178                                } elseif ($type == 3) { 
    175179                                        $size = array(); 
     
    182186                                        } 
    183187                                        $i = 1; 
     188                                        $c->beginMultiCall(); 
    184189                                        while (list($id) = each($size)) { 
    185190                                                $c->move($c->queue[$id]['id'], $i++); 
    186191                                        } 
     192                                        $c->endMultiCall(); 
    187193                                } 
    188194                        }