functions_routing.php: set action to empty when serving JS

genpage is called but no action given -
the default page was generated at every call.

Cherry-picked from master branch.

Signed-off-by: Thomas Hochstein <thh@inter.net>
This commit is contained in:
Stephan Brunker 2019-11-15 01:51:53 +01:00 committed by Thomas Hochstein
parent ac81762eaa
commit 3bf067c6ea
2 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,9 @@
Version 2.3.3-beta1 () Version 2.3.3-beta1 ()
------------------------------------------------------------------------ ------------------------------------------------------------------------
* Fix: Set action to empty in functions_routing.php when serving JS;
otherisw the default page has been generated at every call.
* media_choose.tpl: Fixes bad usage of * media_choose.tpl: Fixes bad usage of
{serendipity_hookPlugin eventData=...} to {serendipity_hookPlugin eventData=} {serendipity_hookPlugin eventData=...} to {serendipity_hookPlugin eventData=}
and allow plugins to skip HTML block insertion to use their own and allow plugins to skip HTML block insertion to use their own

View File

@ -132,6 +132,10 @@ function serveJS($js_mode) {
header('Content-type: application/javascript; charset=' . LANG_CHARSET); header('Content-type: application/javascript; charset=' . LANG_CHARSET);
$out = ""; $out = "";
// FIXFIX: including genpage without any given action will generate the
// default page which is unneccessary, set action to empty to only make
// the fix below
$serendipity['GET']['action'] = 'empty';
include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php'); include(S9Y_INCLUDE_PATH . 'include/genpage.inc.php');