[pLog-svn] r5388 - plog/branches/lifetype-1.2/class/action/admin

Jon Daley plogworld at jon.limedaley.com
Thu May 10 23:23:38 EDT 2007


 	If we instantiate the pluginmanager like this, the 
$plugin->register is never called, so we shouldn't do it like this, but 
instead rely on the parent class.  It is mildly annoying that the parent 
doesn't call getPlugins() until in setCommonData, so maybe that should be 
moved, I am not sure.


On Thu, 10 May 2007, jondaley at devel.lifetype.net wrote:

> Author: jondaley
> Date: 2007-05-10 23:21:41 -0400 (Thu, 10 May 2007)
> New Revision: 5388
>
> Modified:
>   plog/branches/lifetype-1.2/class/action/admin/admincleanupaction.class.php
> Log:
> as long as we call notifyEvent *after* setCommonData, the plugin manager is already setup for us
>
> Modified: plog/branches/lifetype-1.2/class/action/admin/admincleanupaction.class.php
> ===================================================================
> --- plog/branches/lifetype-1.2/class/action/admin/admincleanupaction.class.php	2007-05-11 03:20:21 UTC (rev 5387)
> +++ plog/branches/lifetype-1.2/class/action/admin/admincleanupaction.class.php	2007-05-11 03:21:41 UTC (rev 5388)
> @@ -177,16 +177,7 @@
>
> 			$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 ;
> @@ -232,6 +223,9 @@
>
> 			$this->setCommonData();
>
> +            if($this->_op == "cleanupTemp")
> +                $this->notifyEvent(EVENT_POST_ADMIN_PURGE_TEMP_FOLDER );
> +
> 			return true;
> 		}
> 	}
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

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

If at first you don't succeed, destroy all evidence that you tried.


More information about the pLog-svn mailing list