Exemplo n.º 1
0
 /**
  * @return	JQuery
  */
 function _getListQuery()
 {
     // Create a new query object.
     $query = parent::_getListQuery();
     // Filter by frontpage.
     if ($this->getState('filter.frontpage')) {
         $query->join('INNER', '#__content_frontpage AS fp ON fp.content_id = a.id');
     }
     //echo nl2br(str_replace('#__','jos_',$query));
     return $query;
 }
Exemplo n.º 2
0
 /**
  * override method
  */
 function _getListQuery()
 {
     $query = parent::_getListQuery();
     $aId = $this->getState('filter.a_id');
     if (is_numeric($aId)) {
         $type = $this->getState('filter.a_id.include', true) ? '= ' : '<>';
         $query->where('a.id ' . $type . (int) $aId);
     } else {
         if (is_array($aId)) {
             JArrayHelper::toInteger($aId);
             $aId = implode(',', $aId);
             $type = $this->getState('filter.a_id.include', true) ? 'IN' : 'NOT IN';
             $query->where('a.id ' . $type . ' (' . $aId . ')');
         }
     }
     return $query;
 }