[pLog-svn] r3911 - in plog/trunk/class: action/admin daoview/admin

Reto Hugi plog at hugi.to
Sun Sep 3 18:12:51 GMT 2006


On 03.09.2006 19:15, Mark Wu wrote:
> In registerBlog, we only allow the user to create the blogs with
> MAX_BLOGS_PER_USER limitation. But, the logic of original regsiterBlog is
> wrong.
> 
> 1. We count the blogs that owned by others in at getBlogs(). Therefore if a
> user own 1 blog, but he has the permission to edit other 2 blogs, then the
> registerBlog will not allow this user to create blogs. That's why a create a
> new method getOwnBlogs() to get right number.
> 2. We did not save the session in previous implementation. So, if we call
> getBlogs(), it always returns the original blogs array. Therefore the user
> can create unlimit blogs in the same session.
> 3. Add validation to check the blogs is over limit or not, instead of
> if-statement in smarty only. 

well done mark! :)

(do we need unit tests for this?) *oops* :-P

reto


More information about the pLog-svn mailing list