Exemplo n.º 1
0
 function execute($par)
 {
     $inc = $this->including();
     if ($inc) {
         $this->limit = (int) $par;
         $this->offset = 0;
     }
     $this->setListoutput($inc);
     $this->shownavigation = !$inc;
     parent::execute($par);
 }
Exemplo n.º 2
0
 function execute($par)
 {
     $inc = $this->including();
     if ($inc) {
         $parts = explode('/', $par, 2);
         $this->limit = (int) $parts[0];
         // @todo FIXME: nlinks is ignored
         //$nlinks = isset( $parts[1] ) && $parts[1] === 'nlinks';
         $this->offset = 0;
     } else {
         //$nlinks = true;
     }
     $this->setListoutput($inc);
     $this->shownavigation = !$inc;
     parent::execute($par);
 }
 function preprocessResults($db, $res)
 {
     parent::preprocessResults($db, $res);
     $this->currentCategoryCounts = array();
     if (!$res->numRows() || !$this->isCached()) {
         return;
     }
     // Fetch (hopefully) up-to-date numbers of pages in each category.
     // This should be fast enough as we limit the list to a reasonable length.
     $allCategories = array();
     foreach ($res as $row) {
         $allCategories[] = $row->title;
     }
     $categoryRes = $db->select('category', array('cat_title', 'cat_pages'), array('cat_title' => $allCategories), __METHOD__);
     foreach ($categoryRes as $row) {
         $this->currentCategoryCounts[$row->cat_title] = intval($row->cat_pages);
     }
     // Back to start for display
     $res->seek(0);
 }
Exemplo n.º 4
0
 function __construct($name = 'Wantedcategories')
 {
     parent::__construct($name);
 }
 function __construct($name = 'Wantedfiles')
 {
     parent::__construct($name);
 }
 function __construct($name = 'Wantedtemplates')
 {
     parent::__construct($name);
 }