[pLog-svn] r3831 - in plog/trunk: class/dao class/view/admin
templates/admin
mark at devel.lifetype.net
mark at devel.lifetype.net
Wed Aug 2 06:20:12 GMT 2006
Author: mark
Date: 2006-08-02 06:20:10 +0000 (Wed, 02 Aug 2006)
New Revision: 3831
Modified:
plog/trunk/class/dao/articles.class.php
plog/trunk/class/view/admin/admindashboardview.class.php
plog/trunk/class/view/admin/adminpostslistview.class.php
plog/trunk/templates/admin/editposts.template
Log:
Fixed http://bugs.lifetype.net/view.php?id=997. The problem is not in buildWhere(), is the value of categoryId.
1. Change the default categoryId to -1 in postslistview (We should see "not in main page" articles in postslist)
2. Change the categoryId to -1 in dashboardView (We should see "not in main page" articles in dashboard)
Modified: plog/trunk/class/dao/articles.class.php
===================================================================
--- plog/trunk/class/dao/articles.class.php 2006-08-01 16:20:16 UTC (rev 3830)
+++ plog/trunk/class/dao/articles.class.php 2006-08-02 06:20:10 UTC (rev 3831)
@@ -365,7 +365,7 @@
// the common part "c.id = a.category_id" is needed so that
// we don't get one article row as many times as the amount of categories
// we have... due to the sql 'join' operation we're carrying out
- if( $categoryId <= 0 )
+ if( $categoryId == -1 )
$query .= " AND c.id = l.category_id AND a.id = l.article_id ";
else {
if( $categoryId > 0 )
Modified: plog/trunk/class/view/admin/admindashboardview.class.php
===================================================================
--- plog/trunk/class/view/admin/admindashboardview.class.php 2006-08-01 16:20:16 UTC (rev 3830)
+++ plog/trunk/class/view/admin/admindashboardview.class.php 2006-08-02 06:20:10 UTC (rev 3831)
@@ -74,7 +74,7 @@
$recentPosts[$userBlog->getId()] = $articles->getBlogArticles( $userBlog->getId(),
-1, // no date,
DASHBOARD_MAX_RECENT_ITEMS,
- 0,
+ -1,
POST_STATUS_PUBLISHED );
$recentComments[$userBlog->getId()] = $comments->getBlogComments ( $userBlog->getId(),
COMMENT_ORDER_NEWEST_FIRST,
Modified: plog/trunk/class/view/admin/adminpostslistview.class.php
===================================================================
--- plog/trunk/class/view/admin/adminpostslistview.class.php 2006-08-01 16:20:16 UTC (rev 3830)
+++ plog/trunk/class/view/admin/adminpostslistview.class.php 2006-08-02 06:20:10 UTC (rev 3831)
@@ -18,7 +18,7 @@
class AdminPostsListView extends AdminTemplatedView
{
- var $_showCategory = 0;
+ var $_showCategory = -1;
var $_showStatus = 1;
var $_showUser = 0;
var $_showMonth;
@@ -111,7 +111,7 @@
// fetch the different parameters that we are going to need
// to show the view...
- $this->_showCategory = $this->_getParameter( $params, "showCategory", 0 );
+ $this->_showCategory = $this->_getParameter( $params, "showCategory", -1 );
$this->_showStatus = $this->_getParameter( $params, "showStatus", POST_STATUS_ALL );
$this->_showUser = $this->_getParameter( $params, "showUser", 0 );
$this->_showMonth = $this->_getParameter( $params, "showMonth", $this->_locale->formatDate( new Timestamp(), "%Y%m" ));
Modified: plog/trunk/templates/admin/editposts.template
===================================================================
--- plog/trunk/templates/admin/editposts.template 2006-08-01 16:20:16 UTC (rev 3830)
+++ plog/trunk/templates/admin/editposts.template 2006-08-02 06:20:10 UTC (rev 3831)
@@ -16,7 +16,7 @@
<label for="showCategory">{$locale->tr("category")}</label>
<br />
<select name="showCategory" id="showCategory">
- <option value="0">{$locale->tr("category_all")}</option>
+ <option value="-1">{$locale->tr("category_all")}</option>
{foreach from=$categories item=category}
<option value="{$category->getId()}" {if $currentcategory == $category->getId()} selected="selected" {/if}>{$category->getName()}</option>
{/foreach}
More information about the pLog-svn
mailing list