[pLog-svn] r3998 - plugins/branches/lifetype-1.1/templateeditor/class/action

oscar at devel.lifetype.net oscar at devel.lifetype.net
Wed Sep 20 07:42:53 GMT 2006


Author: oscar
Date: 2006-09-20 07:42:53 +0000 (Wed, 20 Sep 2006)
New Revision: 3998

Modified:
   plugins/branches/lifetype-1.1/templateeditor/class/action/pluginblogcopytemplatesetaction.class.php
   plugins/branches/lifetype-1.1/templateeditor/class/action/pluginblogdeletetemplatesetsaction.class.php
Log:
this should solve the problems that people have been having with the templateeditor plugin, with templates disappearing form the list (it was a problem with the session data)


Modified: plugins/branches/lifetype-1.1/templateeditor/class/action/pluginblogcopytemplatesetaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/templateeditor/class/action/pluginblogcopytemplatesetaction.class.php	2006-09-20 06:22:37 UTC (rev 3997)
+++ plugins/branches/lifetype-1.1/templateeditor/class/action/pluginblogcopytemplatesetaction.class.php	2006-09-20 07:42:53 UTC (rev 3998)
@@ -50,7 +50,7 @@
 			if ( $this->_type == 1 ) {
             	$ts = new TemplateSets();
                 $blogTemplateSets = $ts->getBlogTemplateSets( $this->_blogInfo->getId(), false );
-                
+                                
                 foreach ($blogTemplateSets as $template) {
                     if ( $template->getName() == $this->_newTemplateId ) {
                     	$this->_view = new PluginBlogTemplateSetsListView( $this->_blogInfo );
@@ -103,7 +103,10 @@
                 }                
             }
 
-			// if everything went ok...
+			// if everything went ok... we need to reload the blog from disk so that we can refresh the
+            // session data or else it'll be badly out of sync
+            $blogs = new Blogs();
+            $this->_blogInfo = $blogs->getBlogInfo( $this->_blogInfo->getId());                    			
             $this->_session->setValue( "blogInfo", $this->_blogInfo );
             $this->saveSession();
             

Modified: plugins/branches/lifetype-1.1/templateeditor/class/action/pluginblogdeletetemplatesetsaction.class.php
===================================================================
--- plugins/branches/lifetype-1.1/templateeditor/class/action/pluginblogdeletetemplatesetsaction.class.php	2006-09-20 06:22:37 UTC (rev 3997)
+++ plugins/branches/lifetype-1.1/templateeditor/class/action/pluginblogdeletetemplatesetsaction.class.php	2006-09-20 07:42:53 UTC (rev 3998)
@@ -78,6 +78,13 @@
             if( $errorMessage != "" ) $this->_view->setErrorMessage( $errorMessage );
             if( $successMessage != "" ) $this->_view->setSuccessMessage( $successMessage );
             $this->setCommonData();
+            
+			// if everything went ok... we need to reload the blog from disk so that we can refresh the
+            // session data or else it'll be badly out of sync
+            $blogs = new Blogs();
+            $this->_blogInfo = $blogs->getBlogInfo( $this->_blogInfo->getId());                    			
+            $this->_session->setValue( "blogInfo", $this->_blogInfo );
+            $this->saveSession();            
 
             return true;
         }



More information about the pLog-svn mailing list