[pLog-svn] r1648 - plog/trunk/class/dao

Oscar Renalias oscar at renalias.net
Wed Mar 30 17:34:12 GMT 2005


That was correct!! We are supposed to check against a constant... Post 
statuses are constants and not strings anymore!!!

I'm just thinking now that perhaps the name of the constant should be 
defined as POST_STATUS_ALL instead of POST_STATUS_ANY.

Could you please revert the changes and rename the constant? Also, make 
very sure that it works as expected. We cannot afford a cock-up one day 
before the final release!!!

Or even better, hold this one back until 1.0.1. I'm not too sure about 
it.

Oscar

On 30 Mar 2005, at 20:18, ork at devel.plogworld.net wrote:

> Author: ork
> Date: 2005-03-30 17:18:41 +0000 (Wed, 30 Mar 2005)
> New Revision: 1648
>
> Modified:
>    plog/trunk/class/dao/articles.class.php
> Log:
> i guess someone wanted to check against a string, not a const
>
>
> Modified: plog/trunk/class/dao/articles.class.php
> ===================================================================
> --- plog/trunk/class/dao/articles.class.php	2005-03-30 17:16:11 UTC 
> (rev 1647)
> +++ plog/trunk/class/dao/articles.class.php	2005-03-30 17:18:41 UTC 
> (rev 1648)
> @@ -89,7 +89,7 @@
>           * @param blogId If set, the article must belong to the given 
> blog
>           * @return Returns an Article object or 'false' otherwise.
>           */
> -        function getBlogArticle( $artId, $blogId = -1, 
> $includeHiddenFields = true, $date = -1, $categoryId = -1, $userId = 
> -1, $status = POST_STATUS_ANY )
> +        function getBlogArticle( $artId, $blogId = -1, 
> $includeHiddenFields = true, $date = -1, $categoryId = -1, $userId = 
> -1, $status = 'POST_STATUS_ANY' )
>          {
>  			$prefix = $this->getPrefix();
>              $query = "SELECT a.id, a.date,
> @@ -111,7 +111,7 @@
>  				$query .= " AND a.user_id = ".Db::qstr($userId);
>  			if( $categoryId != -1 )
>  				$query .= " AND c.id = ".Db::qstr($categoryId)." AND c.id = 
> l.category_id AND a.id = l.article_id";
> -			if( $status != POST_STATUS_ANY )
> +			if( $status != 'POST_STATUS_ANY' )
>  				$query .= " AND a.status = $status;";			
>
>              return $this->_getBlogArticleFromQuery( $query, 
> $includeHiddenFields );
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
>




More information about the pLog-svn mailing list