[pLog-svn] r2295 - plog/branches/plog-1.0.2/class/dao

Oscar Renalias phunkphorce at gmail.com
Mon Jul 11 13:46:51 GMT 2005


looks ok to me... Guess we never needed that parameter to be -1 :)

Oscar

On 7/9/05, jondaley at devel.plogworld.net <jondaley at devel.plogworld.net> wrote:
> Author: jondaley
> Date: 2005-07-09 13:55:38 +0000 (Sat, 09 Jul 2005)
> New Revision: 2295
> 
> Modified:
>    plog/branches/plog-1.0.2/class/dao/articles.class.php
> Log:
> buildWhere was doing the wrong thing when blogId was equal to -1.  Is there a better solution than this?  This way makes it easier for the following lines, as they can always prepend 'AND' to their query.  I don't know if this makes mysql slower?
> 
> Modified: plog/branches/plog-1.0.2/class/dao/articles.class.php
> ===================================================================
> --- plog/branches/plog-1.0.2/class/dao/articles.class.php       2005-07-08 13:46:29 UTC (rev 2294)
> +++ plog/branches/plog-1.0.2/class/dao/articles.class.php       2005-07-09 13:55:38 UTC (rev 2295)
> @@ -256,7 +256,12 @@
>                 {
>              $postStatus = $status;
>                     $prefix = $this->getPrefix();
> -                   $query = "a.blog_id = ".Db::qstr($blogid);
> +            if($blogid == -1){
> +                $query = "a.blog_id = a.blog_id";
> +            }
> +            else{
> +                $query = "a.blog_id = ".Db::qstr($blogid);
> +            }
>              if( $date != -1 ) {
>                                 // consider the time difference
>                 $blogSettings = $this->blogs->getBlogSettings( $blogid );
> 
> _______________________________________________
> 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