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

Jon Daley plogworld at jon.limedaley.com
Fri May 11 03:16:35 EDT 2007


 	Ah, I see.  I am only looking at one blog at the moment.  I'll see 
if putting it back will now call register for us.

On Fri, 11 May 2007, Oscar Renalias wrote:

> I don't think your change does what you think it does :)
>
> The idea of the original code is to process the
> EVENT_POST_ADMIN_PURGE_TEMP_FOLDER event using each one of the active
> blogs in the system. For that reason we need to call
> PluginBase::setBlogInfo() every time within the loop, so that the
> plugin has the right blog in its context, otherwise the event is
> thrown and processed only by the current blog.
>
> On 5/11/07, jondaley at devel.lifetype.net <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
>>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>

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

Faith is a simple trust in a personal redeemer.
The simpler our trust in Christ for all things, the surer our peace.
-- William Adams


More information about the pLog-svn mailing list