- Timestamp:
- 06/07/11 13:52:50 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2/news_admin/inc/class.sonews.inc.php
r49 r4589 44 44 45 45 $sql = 'SELECT * FROM phpgw_news WHERE news_cat ' . $filter; 46 $sql_count = 'SELECT count(*) as total FROM phpgw_news WHERE news_cat ' . $filter; 46 47 if($activeonly) 47 48 { 48 49 $now = time(); 49 $sql .= " AND news_begin<=$now AND news_end>=$now"; 50 $filter_plus = " AND news_begin<=$now AND news_end>=$now"; 51 $sql .= $filter_plus; 52 $sql_count.= $filter_plus; 50 53 } 51 54 $sql .= $ordermethod; 52 55 53 $this->db->query($sql,__LINE__,__FILE__); 54 $total = $this->db->num_rows(); 56 $this->db->query($sql_count,__LINE__,__FILE__); 57 if($this->db->next_record()) 58 $total = $this->db->f('total'); 59 else 60 $total=0; 55 61 $this->db->limit_query($sql,$start,__LINE__,__FILE__,$limit); 56 62
Note: See TracChangeset
for help on using the changeset viewer.