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

Jon Daley plogworld at daley.snurgle.org
Wed Mar 30 17:33:43 GMT 2005


 	This change looks odd to me.  Is it really correct?

On Wed, 30 Mar 2005 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
>

**************************************************************
*     Jonathan M. Daley     *      I used to think I was     *
*   jondaley at snurgle.org    *   indecisive, but now I'm not  *
* www.snurgle.org/~jondaley *              sure              *
**************************************************************



More information about the pLog-svn mailing list