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

Oscar Renalias oscar at renalias.net
Sun Dec 26 10:56:22 GMT 2004


> check if userinfo is null: null userinfo means we can not get 
> userinfo, so just return blogId=0, this will used to redirect user to 
> summary page in the future?

Don't know, I'd like to keep the summary separated as much as possible 
from the core... In fact, it is getting so big that I was thinking 
about releasing it as a separate package instead of including ig in the 
final .tar.gz with the final version of 1.0.

One thing we can do is include it as a condition... *If* the summary is 
available, then redirect to the summary. That shouldn't be too 
difficult :-)

By the way, any improvement regarding the changes to the search engine 
and php's handling of chinese characters?

Oscar

>
>
> Modified: plog/trunk/class/dao/users.class.php
> ===================================================================
> --- plog/trunk/class/dao/users.class.php	2004-12-23 23:38:23 UTC (rev 
> 576)
> +++ plog/trunk/class/dao/users.class.php	2004-12-26 02:22:47 UTC (rev 
> 577)
> @@ -432,7 +432,11 @@
>              $blogs = new Blogs();
>
>              $userinfo = $this->getUserInfoFromUsername($username);
> +            // if userinfo is null, this maybe because username is 
> not exists..
> +            // return 0 means, should go to summary page
> +            if(!$userinfo) return 0;
>              $userid = $userinfo->getId();
> +            $userid = $userinfo->getId();
>
>          	// check if the user is the owner of any blog
>              $owner = "SELECT id FROM ".$this->getPrefix()."blogs 
> WHERE owner_id = ".$userid.";";
>
> _______________________________________________
> 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