Project

General

Profile

« Previous | Next » 

Revision 866

Added by thorn about 16 years ago

News: total number of news wasn't calculated correctly

View differences:

trunk/CHANGELOG
10 10
# = Bugfix
11 11
! = Update/Change
12 12

  
13
------------------------------------- 2.7.1 -------------------------------------
13
------------------------------------- 2.7.1 -------------------------------------
14
29-Oct-2008 Thomas Hornik
15
# News: total number of news wasn't calculated correctly
14 16
25-Oct-2008 Christian Sommer
15 17
!	updated basic templates according the template guidelines
16 18
24-Oct-2008 Dietrich Roland Pehlke
trunk/wb/modules/news/view.php
97 97
		$setting_posts_per_page = '';
98 98
	}
99 99
	
100
	$t = time();
100 101
	// Get total number of posts
101
	$t = time();
102
	$query_total_num = $database->query("SELECT post_id FROM ".TABLE_PREFIX."mod_news_posts WHERE section_id = '$section_id' AND active = '1' AND title != '' $query_extra AND (published_when = '0' OR published_when <= $t) AND (published_until = 0 OR published_until >= $t)");
102
	$query_total_num = $database->query("SELECT post_id FROM ".TABLE_PREFIX."mod_news_posts
103
		WHERE section_id = '$section_id' AND active = '1' AND title != '' $query_extra 
104
		AND (published_when = '0' OR published_when <= $t) AND (published_until = 0 OR published_until >= $t)");
103 105
	$total_num = $query_total_num->numRows();
104 106

  
105 107
	// Work-out if we need to add limit code to sql
......
110 112
	}
111 113
	
112 114
	// Query posts (for this page)
113
	$t = time();
114 115
	$query_posts = $database->query("SELECT * FROM ".TABLE_PREFIX."mod_news_posts
115 116
		WHERE section_id = '$section_id' AND active = '1' AND title != ''$query_extra
116 117
		AND (published_when = '0' OR published_when <= $t) AND (published_until = 0 OR published_until >= $t)
......
351 352
	}
352 353
}
353 354

  
354
?>
355
?>

Also available in: Unified diff