[RCD] Plugin API register task

Rosali myroundcube at mail4us.net
Fri Aug 15 07:50:41 CEST 2014

Am 2014-08-14 18:28, schrieb Thomas Bruederli:
> On Thu, Aug 14, 2014 at 3:52 PM, Rosali <myroundcube at mail4us.net> 
> wrote:
>> Hello Devs,
>> I don't understand how I should handle $this->register_task.
>> I have noticed if a plugin is running on its own task then it behaves
>> strange.
>> I think it is best to give an example:
>> [...]
>> So, what am I doing wrong? How do I have to register the action in a 
>> plugin
>> so that they are properly recognized while staying on a task which is
>> registered/owned by another plugin?
> I guess looking at the request dispatching routine [1] clarifies the
> situation. First it checks is_plugin_task() and only if it isn't, the
> 'plugin.' prefix is checked. We might change the order of these checks
> and give precedence to 'plugin.*' actions but I can't imagine the
> side-effects such a change might have.
> A work-around for your particular situation could be to execute
> rcmail.http_post('mail/plugin.carddav-addressbook-sync') or
> rcmail.http_post('foo/plugin.carddav-addressbook-sync') in order to
> not hit a task that is registered by a plugin.

I think 'plugin.*' should have precendence. Let's wait what others say. 
I can live with the code as is. Thanks a lot for the hints!


> Kind regards,
> Thomas

More information about the dev mailing list