From: Glenn H. <thr...@us...> - 2004-08-14 18:26:04
|
Update of /cvsroot/mantisbt/mantisbt/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25027/core Modified Files: news_api.php Log Message: fix 0004164: [news] Announcement news don't remain on top (masc) Index: news_api.php =================================================================== RCS file: /cvsroot/mantisbt/mantisbt/core/news_api.php,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- news_api.php 21 Apr 2004 14:15:32 -0000 1.16 +++ news_api.php 14 Aug 2004 18:25:56 -0000 1.17 @@ -198,7 +198,7 @@ switch ( config_get( 'news_limit_method' ) ) { case 0 : - # Select the news posts + # BY_LIMIT - Select the news posts $query = "SELECT *, date_posted FROM $t_news_table WHERE project_id='$c_project_id' OR project_id=" . ALL_PROJECTS . " @@ -206,13 +206,14 @@ $result = db_query( $query , $t_news_view_limit , $c_offset); break; case 1 : - # Select the news posts @@BUGBUG-query + # BY_DATE - Select the news posts $query = "SELECT *, date_posted FROM $t_news_table WHERE ( project_id='$c_project_id' OR project_id=" . ALL_PROJECTS . " ) AND - " . db_helper_compare_days( db_now(), 'date_posted', "< $t_news_view_limit_days") . " + " . db_helper_compare_days( db_now(), 'date_posted', "< $t_news_view_limit_days") . " OR + announcement = 1 ORDER BY announcement DESC, id DESC"; - $result = db_query( $query ); + $result = db_query( $query, $t_news_view_limit, $c_offset ); break; } # end switch |