Dotclear


Ignore:
Timestamp:
07/06/11 13:20:22 (14 years ago)
Author:
Tomtom33 <tbouron@…>
Branch:
formfilters
Message:

Applied changes in adminItemsList class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/popup_posts.php

    r68 r520  
    1717$q = !empty($_GET['q']) ? $_GET['q'] : null; 
    1818 
    19 $page = !empty($_GET['page']) ? (integer) $_GET['page'] : 1; 
    20 $nb_per_page =  10; 
     19$post_list = new adminPostMiniList($core); 
    2120 
    2221$params = array(); 
    23 $params['limit'] = array((($page-1)*$nb_per_page),$nb_per_page); 
    2422$params['no_content'] = true; 
    25 $params['order'] = 'post_dt DESC'; 
     23 
     24# - Limit, sortby and order filter 
     25$params = $post_list->applyFilters($params); 
    2626 
    2727if ($q) { 
     
    4343     $posts = $core->blog->getPosts($params); 
    4444     $counter = $core->blog->getPosts($params,true); 
    45      $post_list = new adminPostMiniList($core,$posts,$counter->f(0)); 
     45     $post_list->setItems($posts,$counter->f(0)); 
    4646} catch (Exception $e) { 
    4747     $core->error->add($e->getMessage()); 
     
    4949 
    5050echo '<div id="form-entries">'; # I know it's not a form but we just need the ID 
    51 $post_list->display($page,$nb_per_page); 
     51$post_list->display(); 
    5252echo '</div>'; 
    5353 
Note: See TracChangeset for help on using the changeset viewer.

Sites map