[pLog-svn] r1281 - plog/trunk/class/dao
oscar at devel.plogworld.net
oscar at devel.plogworld.net
Wed Mar 2 13:49:36 GMT 2005
Author: oscar
Date: 2005-03-02 13:49:36 +0000 (Wed, 02 Mar 2005)
New Revision: 1281
Modified:
plog/trunk/class/dao/bloginfo.class.php
Log:
solved a strange situation where the method getBlogTemplateSet would return null if the template used by the blog had previously been removed by the admin. Now it will check this condition and return the default one if it happens...
Modified: plog/trunk/class/dao/bloginfo.class.php
===================================================================
--- plog/trunk/class/dao/bloginfo.class.php 2005-03-02 13:27:01 UTC (rev 1280)
+++ plog/trunk/class/dao/bloginfo.class.php 2005-03-02 13:49:36 UTC (rev 1281)
@@ -404,6 +404,10 @@
include_once( PLOG_CLASS_PATH."class/template/templatesets/templatesets.class.php" );
$ts = new TemplateSets();
$this->_templateSet = $ts->getTemplateSet( $this->getTemplate(), $this->getId());
+ if( $this->_templateSet == null ) {
+ // what if the admin removes the current template set used by this blog???
+ $this->_templateSet = $ts->getDefaultTemplateSet();
+ }
}
return $this->_templateSet;
More information about the pLog-svn
mailing list