[pLog-svn] r5134 - in plog/branches/lifetype-1.2/class: action/admin plugin

pwestbro at devel.lifetype.net pwestbro at devel.lifetype.net
Tue Mar 20 05:38:06 EDT 2007


Author: pwestbro
Date: 2007-03-20 05:38:06 -0400 (Tue, 20 Mar 2007)
New Revision: 5134

Modified:
   plog/branches/lifetype-1.2/class/action/admin/admincleanupaction.class.php
   plog/branches/lifetype-1.2/class/plugin/eventlist.properties.php
Log:
First part of fix for bug 1223

Now an event is sent when the temporary folder is purged


Modified: plog/branches/lifetype-1.2/class/action/admin/admincleanupaction.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/action/admin/admincleanupaction.class.php	2007-03-19 18:28:02 UTC (rev 5133)
+++ plog/branches/lifetype-1.2/class/action/admin/admincleanupaction.class.php	2007-03-20 09:38:06 UTC (rev 5134)
@@ -170,6 +170,23 @@
 			$excludes = array('.htaccess', '.svn');
 			File::deleteDir( $tmpFolder, true, true, $excludes );
 			
+			// Iterate through all of the blogs, and give the 
+			// plugins a chance to regenerate any files that 
+			// were deleted
+			lt_include( PLOG_CLASS_PATH."class/dao/blogs.class.php" );
+
+			$blogs = new Blogs();
+        	$activeBlogs = $blogs->getAllBlogs( BLOG_STATUS_ACTIVE );
+            // Get the plugin manager
+            $plugMgr =& PluginManager::getPluginManager();
+
+        	foreach( $activeBlogs as $blogInfo ) {
+	            $plugMgr->setBlogInfo( $blogInfo);
+	            $plugMgr->loadPlugins( "admin" );
+	            // Send the EVENT_POST_ADMIN_PURGE_TEMP_FOLDER message
+	            $plugMgr->notifyEvent( EVENT_POST_ADMIN_PURGE_TEMP_FOLDER );            
+        	}
+			
 			$this->_message = $this->_locale->tr( "temp_folder_reset_ok" );
 			
 			return true ;

Modified: plog/branches/lifetype-1.2/class/plugin/eventlist.properties.php
===================================================================
--- plog/branches/lifetype-1.2/class/plugin/eventlist.properties.php	2007-03-19 18:28:02 UTC (rev 5133)
+++ plog/branches/lifetype-1.2/class/plugin/eventlist.properties.php	2007-03-20 09:38:06 UTC (rev 5134)
@@ -186,4 +186,5 @@
 	define( "EVENT_PRE_DELETE_PERMISSION", ++$eventValue );
 	define( "EVENT_POST_DELETE_PERMISSION", ++$eventValue );
     define( "EVENT_PROCESS_BLOG_ADMIN_TEMPLATE_OUTPUT", ++$eventValue );
+    define( "EVENT_POST_ADMIN_PURGE_TEMP_FOLDER", ++$eventValue );
 ?>
\ No newline at end of file



More information about the pLog-svn mailing list