[pLog-svn] r5265 - plog/branches/lifetype-1.2/class/dao

mark at devel.lifetype.net mark at devel.lifetype.net
Tue Apr 3 15:01:54 EDT 2007


Author: mark
Date: 2007-04-03 15:01:54 -0400 (Tue, 03 Apr 2007)
New Revision: 5265

Modified:
   plog/branches/lifetype-1.2/class/dao/blogsettings.class.php
Log:
Fixed a bug reported by Reto.

If there is no site or user config, then we have to assign the $defaultValue to $key. Or it always return null.

Modified: plog/branches/lifetype-1.2/class/dao/blogsettings.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/dao/blogsettings.class.php	2007-04-03 18:10:52 UTC (rev 5264)
+++ plog/branches/lifetype-1.2/class/dao/blogsettings.class.php	2007-04-03 19:01:54 UTC (rev 5265)
@@ -59,8 +59,12 @@
 					// plugin settings say					
 					$value = parent::getValue( $key, GlobalPluginConfig::getValue( $key ));
 				}
-				else
+				else {
 					$value = GlobalPluginConfig::getValue( $key );
+				}
+				// If there no values from user or site plugin config, then we get it from $defaultValue
+				if( empty( $value ) )
+					$value = $defaultValue;
 			}
 			else {
 				$value = parent::getValue( $key, $defaultValue );



More information about the pLog-svn mailing list