diff options
author | xue <> | 2006-05-31 00:33:26 +0000 |
---|---|---|
committer | xue <> | 2006-05-31 00:33:26 +0000 |
commit | e3b10414305b181aa4e39e211cf6b0e9bf992518 (patch) | |
tree | 780cf0f0eab6ca0a216a3cdbc960ac4585eaf922 /demos/blog/protected/Pages/Posts/ListPost.php | |
parent | ac746689f6ba6efc4e8fac69d19e4daa7393d7fb (diff) |
Added sticky feature for published posts.
Diffstat (limited to 'demos/blog/protected/Pages/Posts/ListPost.php')
-rw-r--r-- | demos/blog/protected/Pages/Posts/ListPost.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/demos/blog/protected/Pages/Posts/ListPost.php b/demos/blog/protected/Pages/Posts/ListPost.php index bed18222..8c51546f 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)
{
@@ -73,7 +73,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
|