[pLog-svn] r2795 -
inplog/trunk:class/action/adminclass/daotemplates/admin
Mark Wu
markplace at gmail.com
Tue Jan 17 15:43:38 GMT 2006
Great! Many thanks, I really can not figure it out ... :(
Mark
> -----Original Message-----
> From: plog-svn-bounces at devel.lifetype.net
> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of
> Oscar Renalias
> Sent: Tuesday, January 17, 2006 3:55 PM
> To: plog-svn at devel.lifetype.net
> Subject: Re: [pLog-svn] r2795 -
> inplog/trunk:class/action/adminclass/daotemplates/admin
>
> I will take a look later and let you know the solution.
>
> Oscar
>
> On 1/16/06, Mark Wu <markplace at gmail.com> wrote:
> > Hi Oscar:
> >
> > I try to figure out the problem, but still confused.
> >
> > Can you use the svn 2795 and 2796 as example, and let me
> know how to
> > handle the cache...?
> >
> > The most things confuse me is when I should touch the cache
> handling. ...
> >
> > Mark
> >
> > > -----Original Message-----
> > > From: plog-svn-bounces at devel.lifetype.net
> > > [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Oscar
> > > Renalias
> > > Sent: Monday, January 16, 2006 8:39 PM
> > > To: plog-svn at devel.lifetype.net
> > > Subject: Re: [pLog-svn] r2795 - in
> > > plog/trunk:class/action/adminclass/daotemplates/admin
> > >
> > > the dao layer will do it for you. In fact, you as a client of the
> > > dao layer should not even know that caching is happening.
> > >
> > > Oscar
> > >
> > > On 1/16/06, Mark Wu <markplace at gmail.com> wrote:
> > > > I see, I will try to test that.
> > > >
> > > > And, if I use the $blog->updateBlog( $blogSettings); Do I
> > > need to set
> > > > the cache? Or the dao will do it for me?
> > > >
> > > > Mark
> > > >
> > > > > -----Original Message-----
> > > > > From: plog-svn-bounces at devel.lifetype.net
> > > > > [mailto:plog-svn-bounces at devel.lifetype.net] On
> Behalf Of Oscar
> > > > > Renalias
> > > > > Sent: Monday, January 16, 2006 7:56 PM
> > > > > To: plog-svn at devel.lifetype.net
> > > > > Subject: Re: [pLog-svn] r2795 - in plog/trunk:
> > > > > class/action/adminclass/daotemplates/admin
> > > > >
> > > > > I must have forgotten to clean the cache in many situation.
> > > > >
> > > > > All you need to do is call the following from the dao class:
> > > > >
> > > > > $this->_cache->removeData( $value, $cacheId )
> > > > >
> > > > > Where $cacheId is the identifier of the cache you want to
> > > clean, and
> > > > > $value is the key that you'd like to remove. The $cacheId
> > > is usually
> > > > > defined somewhere on top of the class file.
> > > > >
> > > > > Oscar
> > > > >
> > > > > On 1/16/06, Mark Wu <markplace at gmail.com> wrote:
> > > > > > Hi Oscar:
> > > > > >
> > > > > > BTW, you can follow the steps to reproduce my problem:
> > > > > >
> > > > > > 1. add a new user from Admin>>AddUser 2. Then, goto
> > > > > > BlogSetting>>AddBlogUser --> You will get
> > > > > empty page (It
> > > > > > seems the data does not in cache) 3. Then, delete all
> > > caches under
> > > > > > /tmp (push the lifetype read all data
> > > > > > again)
> > > > > > 4. Then, repeat 2, you can see the user add successful ...
> > > > > >
> > > > > > Mark
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Mark Wu [mailto:markplace at gmail.com]
> > > > > > > Sent: Monday, January 16, 2006 7:19 PM
> > > > > > > To: 'plog-svn at devel.lifetype.net'
> > > > > > > Subject: RE: [pLog-svn] r2795 - in plog/trunk:
> > > > > > > class/action/admin class/daotemplates/admin
> > > > > > >
> > > > > > > Hi Oscar:
> > > > > > >
> > > > > > > Actually, the addbloguseraction does not work
> ..... It only
> > > > > > > works when I clear the cache.
> > > > > > >
> > > > > > > Then, I can add the user to blog without any problem ...
> > > > > > >
> > > > > > > Really .... frustrating :(
> > > > > > >
> > > > > > > Did I miss anything?
> > > > > > >
> > > > > > > Mark
> > > > > > >
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: plog-svn-bounces at devel.lifetype.net
> > > > > > > > [mailto:plog-svn-bounces at devel.lifetype.net] On
> Behalf Of
> > > > > > > > mark at devel.lifetype.net
> > > > > > > > Sent: Monday, January 16, 2006 4:10 PM
> > > > > > > > To: plog-svn at devel.lifetype.net
> > > > > > > > Subject: [pLog-svn] r2795 - in plog/trunk:
> > > class/action/admin
> > > > > > > > class/daotemplates/admin
> > > > > > > >
> > > > > > > > Author: mark
> > > > > > > > Date: 2006-01-16 08:10:06 +0000 (Mon, 16 Jan 2006) New
> > > > > > > Revision: 2795
> > > > > > > >
> > > > > > > > Modified:
> > > > > > > >
> > > > > plog/trunk/class/action/admin/adminaddbloguseraction.class.php
> > > > > > > > plog/trunk/class/dao/userpermissions.class.php
> > > > > > > > plog/trunk/templates/admin/blogtemplates.template
> > > > > > > > plog/trunk/templates/admin/blogusers.template
> > > > > > > > Log:
> > > > > > > > 1. More codes and templates clean up 2. addbloguser and
> > > > > > > > deletebloguserpermission works again
> > > > > > > >
> > > > > > > > Modified:
> > > > > > > >
> > > plog/trunk/class/action/admin/adminaddbloguseraction.class.php
> > > > > > > >
> > > > >
> ================================================================
> > > > > ==
> > > > > > > > =
> > > > > > > > ---
> > > > > > > > plog/trunk/class/action/admin/adminaddbloguseraction.cl
> > > > > > > > ass.php 2006-01-16 07:40:28 UTC (rev 2794)
> > > > > > > > +++
> > > > > > > > plog/trunk/class/action/admin/adminaddbloguseraction.cl
> > > > > > > > ass.php 2006-01-16 08:10:06 UTC (rev 2795)
> > > > > > > > @@ -4,6 +4,7 @@
> > > > > > > > include_once(
> > > > > > > >
> > > > >
> PLOG_CLASS_PATH."class/view/admin/admintemplatedview.class.php"
> > > > > );
> > > > > > > > include_once(
> > > > > > > >
> > > > >
> > >
> PLOG_CLASS_PATH."class/data/validator/stringvalidator.class.php" );
> > > > > > > > include_once(
> > > > > PLOG_CLASS_PATH."class/dao/users.class.php" );
> > > > > > > > + include_once(
> > > > > > > > PLOG_CLASS_PATH."class/dao/userpermissions.class.php"
> > > > > > > > + );
> > > > > > > > include_once(
> > > > > > > >
> > > > > > >
> > > > >
> > >
> PLOG_CLASS_PATH."class/view/admin/adminbloguserslistview.class.php"
> > > > > > > );
> > > > > > > > include_once(
> > > > > > > > PLOG_CLASS_PATH."class/mail/emailservice.class.php" );
> > > > > > > >
> > > > > > > >
> > > > > > > > Modified: plog/trunk/class/dao/userpermissions.class.php
> > > > > > > >
> > > > >
> ================================================================
> > > > > ==
> > > > > > > > =
> > > > > > > > --- plog/trunk/class/dao/userpermissions.class.php
> > > > > > > > 2006-01-16 07:40:28 UTC (rev 2794)
> > > > > > > > +++ plog/trunk/class/dao/userpermissions.class.php
> > > > > > > > 2006-01-16 08:10:06 UTC (rev 2795) @@ -109,7 +109,7 @@
> > > > > > > > $userPerms =
> > > > > > > > $this->getUserPermissions(
> > > > > > > $userId, $blogId );
> > > > > > > > foreach( $userPerms as $perm ) {
> > > > > > > > if( $perm->getUserId() ==
> > > > > $userId &&
> > > > > > > > $perm->getBlogId() == $blogId &&
> > > > > > > > -
> $perm->getPermissionId() ==
> > > > > > > > $permissionId()) {
> > > > > > > > +
> $perm->getPermissionId()
> > > > > > > > + ==
> > > > > > > > $permissionId ) {
> > > > > > > > $found = true;
> > > > > > > > break;
> > > > > > > > } @@ -118,7 +118,7 @@
> > > > > > > > return( true );
> > > > > > > >
> > > > > > > > // build the query to remove the row
> > > > > > > > - $query = "DELETE FROM
> > > > > > > > ".$this->getPrefix()."user_permissions WHERE user_id =
> > > > > > > > '".Db::qstr( $userId )."'
> > > > > > > > + $query = "DELETE FROM
> > > > > > > > ".$this->getPrefix()."users_permissions WHERE user_id =
> > > > > > > '".Db::qstr(
> > > > > > > > $userId )."'
> > > > > > > > AND blog_id = '".Db::qstr(
> > > > > > > $blogId ) ."' AND
> > > > > > > > permission_id = '".Db::qstr( $permissionId )."'";
> > > > > > > > // and execute it
> > > > > > > > $result = $this->Execute( $query );
> > > > > > > >
> > > > > > > > Modified:
> > > > > > > > plog/trunk/templates/admin/blogtemplates.template
> > > > > > > >
> > > > >
> ================================================================
> > > > > ==
> > > > > > > > =
> > > > > > > > --- plog/trunk/templates/admin/blogtemplates.template
> > > > > > > > 2006-01-16 07:40:28 UTC (rev 2794)
> > > > > > > > +++ plog/trunk/templates/admin/blogtemplates.template
> > > > > > > > 2006-01-16 08:10:06 UTC (rev 2795) @@ -8,7 +8,7 @@
> > > > > > > > <table class="info">
> > > > > > > > <thead>
> > > > > > > > <tr>
> > > > > > > > - <th style="width:10px;"><input class="checkbox"
> > > > > > > > type="checkbox" class="check" name="all"
> id="all" value="1"
> > > > > > > > onclick="toggleAllChecks('editTemplates');" /></th>
> > > > > > > > + <th style="width:10px;"><input class="checkbox"
> > > > > > > > type="checkbox"
> > > > > > > > + name="all" id="all" value="1"
> > > > > > > > + onclick="toggleAllChecks('editTemplates');" /></th>
> > > > > > > > <th
> > > style="width:670px;">{$locale->tr("template")}</th>
> > > > > > > > <th
> style="width:95px;">{$locale->tr("actions")}</th>
> > > > > > > > </tr>
> > > > > > > > @@ -53,4 +53,5 @@
> > > > > > > > <input type="submit" name="{$locale->tr("delete")}"
> > > > > > > > value="{$locale->tr("delete")}"/>
> > > > > > > > </div>
> > > > > > > > </form>
> > > > > > > > +{include
> > > file="$admintemplatepath/footernavigation.template"}
> > > > > > > > {include file="$admintemplatepath/footer.template"}
> > > > > > > > \ No newline at end of file
> > > > > > > >
> > > > > > > > Modified: plog/trunk/templates/admin/blogusers.template
> > > > > > > >
> > > > >
> ================================================================
> > > > > ==
> > > > > > > > =
> > > > > > > > --- plog/trunk/templates/admin/blogusers.template
> > > > > > > > 2006-01-16 07:40:28 UTC (rev 2794)
> > > > > > > > +++ plog/trunk/templates/admin/blogusers.template
> > > > > > > > 2006-01-16 08:10:06 UTC (rev 2795) @@ -8,7 +8,7 @@
> > > > > > > > <table class="info">
> > > > > > > > <thead>
> > > > > > > > <tr>
> > > > > > > > - <th style="width:10px;"><input
> > > > > > > > class="checkbox" type="checkbox" class="check"
> name="all"
> > > > > > > > id="all" value="1"
> > > > > onclick="toggleAllChecks('blogUsers');" /></th>
> > > > > > > > + <th style="width:10px;"><input
> > > > > > > > class="checkbox"
> > > > > > > > + type="checkbox" name="all" id="all" value="1"
> > > > > > > > + onclick="toggleAllChecks('blogUsers');" /></th>
> > > > > > > > <th
> > > > > > > > style="width:145px;">{$locale->tr("username")}</th>
> > > > > > > > <th
> > > > > > > > style="width:325px;">{$locale->tr("full_name")}</th>
> > > > > > > >
> > > > > > > > <th
> > > > > > > > style="width:210px;">{$locale->tr("email")}</th>
> > > > > > > >
> > > > > > > > _______________________________________________
> > > > > > > > pLog-svn mailing list
> > > > > > > > pLog-svn at devel.lifetype.net
> > > > > > > > http://devel.lifetype.net/mailman/listinfo/plog-svn
> > > > > >
> > > > > > _______________________________________________
> > > > > > pLog-svn mailing list
> > > > > > pLog-svn at devel.lifetype.net
> > > > > > http://devel.lifetype.net/mailman/listinfo/plog-svn
> > > > > >
> > > > > _______________________________________________
> > > > > pLog-svn mailing list
> > > > > pLog-svn at devel.lifetype.net
> > > > > http://devel.lifetype.net/mailman/listinfo/plog-svn
> > > >
> > > > _______________________________________________
> > > > pLog-svn mailing list
> > > > pLog-svn at devel.lifetype.net
> > > > http://devel.lifetype.net/mailman/listinfo/plog-svn
> > > >
> > > _______________________________________________
> > > pLog-svn mailing list
> > > pLog-svn at devel.lifetype.net
> > > http://devel.lifetype.net/mailman/listinfo/plog-svn
> >
> > _______________________________________________
> > pLog-svn mailing list
> > pLog-svn at devel.lifetype.net
> > http://devel.lifetype.net/mailman/listinfo/plog-svn
> >
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
More information about the pLog-svn
mailing list