[geeklog-devel] Plugin upgrade failure (was: More automation)

Dirk Haun dirk at haun-online.de
Sat May 21 16:19:55 EDT 2011


Rouslan Placella wrote:

> I didn't try your fix yet, but from what I can see in plugins.php, there
> is no output sent to the browser when you call COM_refresh($url). So it
> should be possible to use:
> 
> header("Location: $url");
> 
> Will that send a referrer?

For a moment, I thought I had missed something obvious ... It's not so easy, unfortunately.

The referrer is just another HTTP header. But we can't create it, the browser has to do it:

COM_refresh() creates an HTML snippet that does a meta refresh to the new URL. This HTML snippet is sent to the browser as the result of clicking the "Upload" button. The browser then sends another HTTP GET request (to the URL from the meta refresh) back to Geeklog (which then triggers the second part of the plugin upgrade). The referrer would have to be sent with that GET request, i.e. the browser would have to create it.

The only way we could make this work would be by throwing some JavaScript into the mix. But I don't really want the plugin upload to _require_ JavaScript. That's the tradeoff here, I guess.

bye, Dirk




More information about the geeklog-devel mailing list