[pLog-svn] r5384 - plugins/branches/lifetype-1.2/tagcloud
Oscar Renalias
oscar at renalias.net
Fri May 11 00:56:45 EDT 2007
Where exactly do we need that change?
And why is it only affecting this event and/or plugin? Or do all
other plugins call register() manually within their own code?
On 11 May 2007, at 05:55, Jon Daley wrote:
> Ah, it is something that changed from php4 to php5. Someone
> removed a & somewhere that was causing a notice under php5, but is
> required in php4. Anyone have any guesses what was changed? I
> guess we
> will need an:
> if(php4)
> ... =& ...
> else
> ... = ...
>
> to make it work on both platforms.
>
>
> On Thu, 10 May 2007, Jon Daley wrote:
>
>> 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.
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.lifetype.net
>> http://limedaley.com/mailman/listinfo/plog-svn
>>
>
> --
> Jon Daley
> http://jon.limedaley.com/
>
> Furious activity is no substitute for understanding.
> -- H. H. Williams
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://limedaley.com/mailman/listinfo/plog-svn
>
More information about the pLog-svn
mailing list