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

Jon Daley plogworld at jon.limedaley.com
Thu Jan 3 08:09:39 EST 2008


I see that I didn't copy the code from configdbstorage, since it looked 
more complex than was needed.  Perhaps you want to copy that code 
directly?

On Thu, 3 Jan 2008, Jon Daley wrote:

> What problems does it cause?
>
> The bug that it fixes is that you can't set any value in a configuration
> file to 0 or false, if the code provides a default.  This code is simply
> copying the code change from configdbstorage - we fixed that a long time
> ago, and never noticed that we should have copied it into file storage as
> well.
>
> On Thu, 3 Jan 2008, Mark Wu wrote:
>
>> Hi Jon:
>>
>> When did  you meet this bug?
>>
>> this change casue a big problem in 2.0 and takes me several hours to track
>> why the problem happend ....
>>
>> I am not sure this change will cause any problems in 1.2 or not. But, I will
>> revert it  in 2.0 first to make 2.0-dev works ...
>>
>> Mark
>>
>>> -----Original Message-----
>>> From: plog-svn-bounces at devel.lifetype.net
>>> [mailto:plog-svn-bounces at devel.lifetype.net] On Behalf Of
>>> jondaley at devel.lifetype.net
>>> Sent: Sunday, December 16, 2007 1:48 AM
>>> To: plog-svn at devel.lifetype.net
>>> Subject: [pLog-svn] r6112 - plog/branches/lifetype-1.2/class/config
>>>
>>> Author: jondaley
>>> Date: 2007-12-15 12:47:42 -0500 (Sat, 15 Dec 2007) New Revision: 6112
>>>
>>> Modified:
>>>    plog/branches/lifetype-1.2/class/config/configfilestorage.class.php
>>> Log:
>>> fixed bug where you couldn't use 0 or false in file based
>>> config files, else the default value would always be used.
>>> Removed getTempFolder() function, since the parent class
>>> already defines it identically
>>>
>>> Modified:
>>> plog/branches/lifetype-1.2/class/config/configfilestorage.class.php
>>> ===================================================================
>>> ---
>>> plog/branches/lifetype-1.2/class/config/configfilestorage.cl
>>> ass.php	2007-12-15 17:17:34 UTC (rev 6111)
>>> +++
>>> plog/branches/lifetype-1.2/class/config/configfilestorage.cl
>>> ass.php	2007-12-15 17:47:42 UTC (rev 6112)
>>> @@ -64,7 +64,6 @@
>>>                  $this->_props = new Properties();
>>>                  $result = false;
>>>              }
>>> -
>>>              return( $result );
>>>          }
>>>
>>> @@ -248,10 +247,7 @@
>>>
>>>          function getValue( $key, $defaultValue = null )
>>>          {
>>> -        	$value = $this->_props->getValue( $key );
>>> -            if( $value == "" || $value == null )
>>> -            	if(isset($defaultValue))
>>> -                	$value = $defaultValue;
>>> +        	$value = $this->_props->getValue( $key, $defaultValue );
>>>
>>>              return $value;
>>>          }
>>> @@ -299,19 +295,5 @@
>>>
>>>              return true;
>>>          }
>>> -
>>> -        /**
>>> -         * shortcut for one of the most sought after config
>>> keys: temp_folder
>>> -         *
>>> -         * not really needed, but it makes my life easier
>>> since I never remember
>>> -         * whether it is tmp_folder, temp_folder, temp_dir,
>>> or whatever :)
>>> -         *
>>> -         * @return The name of the folder used for temporary storage
>>> -         */
>>> -		function getTempFolder()
>>> -        {
>>> -            return $this->getValue( "temp_folder" );
>>> -        }
>>> -
>>>  	}
>>>  ?>
>>>
>>> _______________________________________________
>>> pLog-svn mailing list
>>> pLog-svn at devel.lifetype.net
>>> http://limedaley.com/mailman/listinfo/plog-svn
>>
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://limedaley.com/mailman/listinfo/plog-svn
>>
>
> -- 
> Jon Daley
> http://jon.limedaley.com/
>
> He who asks is a fool for five minutes,
> but he who does not ask remains a fool forever.
> -- Chinese proverb
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

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

Always be sincere, even when you don't mean it.
-- Irene Peter


More information about the pLog-svn mailing list