summaryrefslogtreecommitdiff
path: root/demos/blog/protected/Pages/Posts/ListPost.php
diff options
context:
space:
mode:
authorxue <>2006-05-31 03:12:35 +0000
committerxue <>2006-05-31 03:12:35 +0000
commit067ab51fbd9b2f18f63fc80895476e5b0e2f9bfb (patch)
tree4025d5e8379bef9de6bb4d251c2796c00e8503a2 /demos/blog/protected/Pages/Posts/ListPost.php
parentb87fd00a62994d24a3708cec5f5613ed2e9a67ed (diff)
Merge from 3.0 branch till 1115.
Diffstat (limited to 'demos/blog/protected/Pages/Posts/ListPost.php')
-rw-r--r--demos/blog/protected/Pages/Posts/ListPost.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/demos/blog/protected/Pages/Posts/ListPost.php b/demos/blog/protected/Pages/Posts/ListPost.php
index bed18222..c3b2bcc9 100644
--- a/demos/blog/protected/Pages/Posts/ListPost.php
+++ b/demos/blog/protected/Pages/Posts/ListPost.php
@@ -28,7 +28,7 @@ class ListPost extends BlogPage
$this->_posts=$this->DataAccess->queryPosts(
$this->getPostFilter(),
$this->getCategoryFilter(),
- 'ORDER BY create_time DESC',
+ 'ORDER BY a.status DESC, create_time DESC',
'LIMIT '.$this->getPageOffset().','.$this->getPageSize());
if($this->Request['cat']!==null)
{
@@ -36,6 +36,7 @@ class ListPost extends BlogPage
$this->_category=$this->DataAccess->queryCategoryByID($catID);
$this->CategoryPanel->Visible=true;
}
+ $this->Title=$this->Application->Parameters['SiteTitle'];
}
private function getPageOffset()
@@ -73,7 +74,7 @@ class ListPost extends BlogPage
private function getPostFilter()
{
- $filter='a.status=0';
+ $filter='(a.status=0 OR a.status=3)';
if(($timeFilter=$this->getTimeFilter())!=='')
return "$filter AND $timeFilter";
else