From 3bf067c6ea6e3482a8b1d1d1ae2e5e30a3d36cdd Mon Sep 17 00:00:00 2001 From: Stephan Brunker Date: Fri, 15 Nov 2019 01:51:53 +0100 Subject: [PATCH] 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 --- docs/NEWS | 3 +++ include/functions_routing.inc.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/docs/NEWS b/docs/NEWS index a4ad2e2a..513ef430 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -1,6 +1,9 @@ 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 {serendipity_hookPlugin eventData=...} to {serendipity_hookPlugin eventData=} and allow plugins to skip HTML block insertion to use their own diff --git a/include/functions_routing.inc.php b/include/functions_routing.inc.php index 504c949e..465a68c9 100644 --- a/include/functions_routing.inc.php +++ b/include/functions_routing.inc.php @@ -132,6 +132,10 @@ function serveJS($js_mode) { header('Content-type: application/javascript; charset=' . LANG_CHARSET); $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');