[pLog-svn] r6146 - plog/branches/lifetype-1.2/class/config

Jon Daley plogworld at jon.limedaley.com
Fri Jan 4 10:09:17 EST 2008


Verified.  Looks good to me.

On Fri, 4 Jan 2008, mark at devel.lifetype.net wrote:

> Author: mark
> Date: 2008-01-04 10:01:21 -0500 (Fri, 04 Jan 2008)
> New Revision: 6146
>
> Modified:
>   plog/branches/lifetype-1.2/class/config/configfilestorage.class.php
> Log:
> After discussed with Jon, I just revert the code to 6111, but replace "==" to "===". To make sure the getValue() have the same behavior in configFileStorage and configDbStorage.
>
> And this change also allow us to use 'false' and 0 in config db or files.
>
> Modified: plog/branches/lifetype-1.2/class/config/configfilestorage.class.php
> ===================================================================
> --- plog/branches/lifetype-1.2/class/config/configfilestorage.class.php	2008-01-04 09:49:24 UTC (rev 6145)
> +++ plog/branches/lifetype-1.2/class/config/configfilestorage.class.php	2008-01-04 15:01:21 UTC (rev 6146)
> @@ -247,7 +247,10 @@
>
>         function getValue( $key, $defaultValue = null )
>         {
> -        	$value = $this->_props->getValue( $key, $defaultValue );
> +        	$value = $this->_props->getValue( $key );
> +            if( $value === "" || $value === null )
> +            	if(isset($defaultValue))
> +                	$value = $defaultValue;
>
>             return $value;
>         }
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

-- 
Jon Daley
http://jon.limedaley.com/

Consistency requires you to be as ignorant
today as you were a year ago.
-- Bernard Berenson


More information about the pLog-svn mailing list