[RCD] Plugin - AJAX GET request to cross domain
thomas at roundcube.net
Sun Sep 18 15:20:45 CEST 2016
On Sun, Sep 18, 2016 at 10:53 AM, Joogl <jooglnetz at posteo.uk> wrote:
> Thanks a lot Thomas,
> was not too hard to be honest.
> But I still have problems with my values I want to transfer.
> Do I really have to use $_POST? I mean, for what reason do I have the
> $args variable?
Actually, the $args variable is empty in this case.
In order to access request data, you should use the dedicated function :
This does proper input sanitization like html tag stripping and
Use rcube_utils::INPUT_GET or rcube_utils::INPUT_POST to access GET or
POST parameters specifically.
> Am 17.09.2016 um 00:56 schrieb Thomas Bruederli:
>> On Mon, Sep 12, 2016 at 11:21 AM, Jakob Bachhuber <jakob-b at posteo.de> wrote:
>>> Of course, I have read the documentation. I also analysed some other
>>> plugins, but it is still just random guessing for me.
>> The relevant part for you is probably here:
>>> In my php I do:
>>> $this->register_action('plugin.someaction', array($this, 'actions'));
>>> function actions($args)
>> The way to pass data back to the client is not using `echo` but send
>> it a "command" for which your plugin has already registered an event
>> $rcmail->output->command('plugin.somecallback', $args);
>> Makes sense?
More information about the dev