[pLog-svn] Rewrite of getSessionValue()

Mark Wu markplace at gmail.com
Sun Jul 9 08:02:32 GMT 2006


Hi Ammar:
 
I can't wait for this mail. So, just send to us when you are ready. :)
 
About the getSessuinValue(), I think Jon already checked it into SVN. So, it
will include in 1.1 release. Thanks.
 
Mark


  _____  

From: plog-svn-bounces at devel.lifetype.net
[mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of Ammar Ibrahim
Sent: Sunday, July 09, 2006 3:47 AM
To: plog-svn at devel.lifetype.net
Subject: Re: Re: [pLog-svn] Rewrite of getSessionValue()


that's a great way to move forward. Most of the changes were related to
usability, but I will review the changes tom and hopefully write a long
email describing the changes.

Thanks,
- Ammar


On 7/8/06, Oscar Renalias <oscar at renalias.net> wrote: 

We'd be interested to know what changes you made that cannot be
implemented as plugins. Perhaps we can find a way to make things
easier for all the people who have heavy customizations.

Or if your changes are related to performance, we'd be more than happy 
to hear more about them.

On 7/8/06, Ammar Ibrahim <ammar.ibrahim at gmail.com> wrote:
> I agree, having people upgrade is a really good idea, but for someone like

> me with huge code changes that can't be implemented as a plugin, and
> removing some parts of the code, rewriting some parts of some DAOs. It'll
be
> really hard to upgrade. I'm not suggesting adding features or anything to 
> the 1.0.x branch, just some fixes
>
> - Ammar
>
>
> On 7/8/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
> >         We want people to upgrade, even if you did all the work, it
still 
> > takes time away from other developers.
> >         I agree that we need a nicer way for people to be able to modify
> > the admin templates and not have their stuff overwritten during
upgrades. 
> > Other than that, I don't know any reason for someone to stay with an
older
> > version of the software.  With the plugin architecture, I don't know of
> > any reasons to modify the core code any more. 
> >
> > On Sat, 8 Jul 2006, Ammar Ibrahim wrote:
> > > Why not, I can maintain it once I'm more familiar with the project. It
> takes
> > > 10 seconds to replace this code and commit it 
> > >
> > > - Ammar
> > >
> > > On 7/8/06, Mark Wu <markplace at gmail.com> wrote:
> > >>
> > >> I will suggest we just put it into 1.1 trunk. Unlese we have another
> sql
> > >> injection bug in 1.0.x series., or I think we won' t have another
1.0.x
> > >> version release.
> > >>
> > >> Mark 
> > >>
> > >> > -----Original Message-----
> > >> > From: plog-svn-bounces at devel.lifetype.net
> > >> > [mailto: plog-svn-bounces at devel.lifetype.net ] On
> Behalf Of Jon Daley
> > >> > Sent: Saturday, July 08, 2006 9:07 PM
> > >> > To: plog-svn at devel.lifetype.net
> > >> > Subject: Re: [pLog-svn] Rewrite of getSessionValue()
> > >> >
> > >> >       It looks alright, though I don't think it changes 
> > >> > anything.  A even simpler version is below.  We don't have a
> > >> > place to check stuff in for fixes to 1.0.6, do we?  This
> > >> > particular fix should not be the one to open a new branch, 
> > >> > though if we do end up using one, this might as well get
> > >> > checked in.  I can put this in 1.1 , definitely.
> > >> >
> > >> > >       function getSessionValue( $param, $defaultValue = "" ) 
> > >> > >       {
> > >> > >           $session = HttpVars::getSession();
> > >> > >           $viewName = $this->className();
> > >> > >           $keyName = "{$viewName}_{$param}"; 
> > >> > >
> > >> > >           if ( isset($session[$keyName]) &&
> > >> > $session[$keyName] != '' ){
> > >> > >               return $session[$keyName]; 
> > >> > >           } else {
> > >> > >               return $defaultValue;
> > >> > >           }
> > >> > >       }
> > >> > 
> > >> >
> > >> >
> > >> > On Sat, 8 Jul 2006, Ammar Ibrahim wrote:
> > >> >
> > >> > > While reading some code, I stumbled across getSessionValue() in 
> > >> > > class/view/view.class.php . And I think the logic
> > >> > implemented is quite
> > >> > > complicated to do a really simple thing and there were a
> > >> > few mistakes
> > >> > > like putting a string variable between quotes. Here's a
> > >> > rewrite, could
> > >> > > someone please update the 1.0.6 branch, because I don't
> > >> > have SVN accesss.
> > >> > >
> > >> > >       /**
> > >> > >        * retrieves a parameter from the session 
> > >> > >        *
> > >> > >        * @param param
> > >> > >        * @param defaultValue
> > >> > >        * @return The value associated to the parameter or 
> > >> > empty if not
> > >> > >        * found
> > >> > >        */
> > >> > >
> > >> > >       function getSessionValue( $param, $defaultValue = "" ) 
> > >> > >       {
> > >> > >           $session = HttpVars::getSession();
> > >> > >           $viewName = $this->className();
> > >> > >           $keyName = "{$viewName}_{$param}"; 
> > >> > >
> > >> > >           $value = '';
> > >> > >           if ( isset($session[$keyName]) &&
> > >> > $session[$keyName] != '' ){ 
> > >> > >               $value = $session[$keyName];
> > >> > >           } else {
> > >> > >               $value = $defaultValue;
> > >> > >           } 
> > >> > >
> > >> > >           return $value;
> > >> > >       }
> > >> >
> > >> > --
> > >> > Jon Daley 
> > >> > http://jon.limedaley.com/
> > >> >
> > >> > There is forgiveness through the cross.
> > >> > _______________________________________________ 
> > >> > 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
> > >>
> > >
> > 
> > --
> > Jon Daley
> > http://jon.limedaley.com/
> >
> > I always blame the software. Unless I wrote it.
> > Then I blame the hardware. 
> > -- Forest Godfrey
> > _______________________________________________
> > 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



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http:// devel.lifetype.net/pipermail/plog-svn/attachments/20060709/44b79df9/attachment.html


More information about the pLog-svn mailing list