[pLog-svn] r5384 - plugins/branches/lifetype-1.2/tagcloud
Jon Daley
plogworld at jon.limedaley.com
Thu May 10 22:09:12 EDT 2007
Hrm. It appears we do need to call register() manually in the
case where we are fielding events, and need the stuff from register to be
called for us.
The case that I am examining now is where the event is set on the
purge temporary directory action.
I changed the cleanupaction to call $this->_pm->notifyEvent()
instead of manually loading in the plugins, since no one else is using
loadPlugin() but that didn't help. What I see happening is that the
setCommonData of AdminAction calls getPlugins(), which calls register() on
each plugin.
And then I set the event for purging tmp, and the tagcloud plugin
class has another instance of itself that is in $_pm->_pluginEventList and
so that particular plugin instance hasn't been registered, so it needs to
call it manually.
It seems like calling register() is hiding a problem with how
plugins are working - that there should really only ever be one instance
of a plugin instantiated. This is starting to get deeper than I know
about the structure of how things work.
Oscar - can you help out -- do we need to instantiate something
statically, or pass references instead of objects?
On Thu, 10 May 2007, jondaley at devel.lifetype.net wrote:
> Author: jondaley
> Date: 2007-05-10 21:27:43 -0400 (Thu, 10 May 2007)
> New Revision: 5384
>
> Modified:
> plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php
> Log:
> we don't need to manually call register() right?
>
> Modified: plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php
> ===================================================================
> --- plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php 2007-05-09 21:14:22 UTC (rev 5383)
> +++ plugins/branches/lifetype-1.2/tagcloud/plugintagcloud.class.php 2007-05-11 01:27:43 UTC (rev 5384)
> @@ -109,9 +109,6 @@
> return true;
> }
>
> - // Load all of the settings for this blog
> - $this->register();
> -
> // do nothing if the plugin is not enabled!
> $blogSettings = $this->blogInfo->getSettings();
> if( !$blogSettings->getValue( "plugin_tagcloud_enabled" ))
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>
--
Jon Daley
http://jon.limedaley.com/
I haven't lost my mind; I have a tape backup somewhere.
More information about the pLog-svn
mailing list