From 09b09dedbc3157e1859f4a777aeab54fadabfb43 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 11 Nov 2014 16:06:16 -0800 Subject: Most directory searches are POST. get_query_args() only handles GET so that had to be fixed or page 2 of directory search results wouldn't match the search. --- include/text.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index fca23ca22..4aa412355 100644 --- a/include/text.php +++ b/include/text.php @@ -2046,7 +2046,7 @@ function normalise_openid($s) { // used in ajax endless scroll request to find out all the args that the master page was viewing. // This was using $_REQUEST, but $_REQUEST also contains all your cookies. So we're restricting it -// to $_GET. If this is used in a post handler, that decision may need to be considered. +// to $_GET and $_POST. function extra_query_args() { $s = ''; @@ -2058,5 +2058,13 @@ function extra_query_args() { } } } + if(count($_POST)) { + foreach($_POST as $k => $v) { + // these are request vars we don't want to duplicate + if(! in_array($k, array('q','f','zid','page','PHPSESSID'))) { + $s .= '&' . $k . '=' . $v; + } + } + } return $s; } -- cgit v1.2.3 From 06e5d0798c67e8314429e475523a6a30e50bfb8e Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 11 Nov 2014 16:09:45 -0800 Subject: and urlencode that. --- include/text.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 4aa412355..7cb54edd3 100644 --- a/include/text.php +++ b/include/text.php @@ -2054,7 +2054,7 @@ function extra_query_args() { foreach($_GET as $k => $v) { // these are request vars we don't want to duplicate if(! in_array($k, array('q','f','zid','page','PHPSESSID'))) { - $s .= '&' . $k . '=' . $v; + $s .= '&' . $k . '=' . urlencode($v); } } } @@ -2062,7 +2062,7 @@ function extra_query_args() { foreach($_POST as $k => $v) { // these are request vars we don't want to duplicate if(! in_array($k, array('q','f','zid','page','PHPSESSID'))) { - $s .= '&' . $k . '=' . $v; + $s .= '&' . $k . '=' . urlencode($v); } } } -- cgit v1.2.3 From 570577a99089ff5bb48c5c67a612bdd874721e95 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 11 Nov 2014 18:05:50 -0800 Subject: a couple of places where we need to look for a sys channel euid. --- include/text.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 7cb54edd3..ba1f9e5a3 100644 --- a/include/text.php +++ b/include/text.php @@ -2021,7 +2021,14 @@ function json_decode_plus($s) { function design_tools() { + $channel = get_app()->get_channel(); + + if(array_key_exists('sys',$_REQUEST) && $_REQUEST['sys'] == 1 && is_site_admin()) { + require_once('include/identity.php'); + $channel = get_sys_channel(); + } + $who = $channel['channel_address']; return replace_macros(get_markup_template('design_tools.tpl'), array( -- cgit v1.2.3 From b5af6679857eeafcb360d7dec69acf11af034c1d Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 11 Nov 2014 19:29:30 -0800 Subject: slow progress on sys publishing, making sure all the data we need is in the places we need it but validate it anyway --- include/text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index ba1f9e5a3..686dee4a2 100644 --- a/include/text.php +++ b/include/text.php @@ -2024,7 +2024,7 @@ function design_tools() { $channel = get_app()->get_channel(); - if(array_key_exists('sys',$_REQUEST) && $_REQUEST['sys'] == 1 && is_site_admin()) { + if(get_app()->is_sys && is_site_admin()) { require_once('include/identity.php'); $channel = get_sys_channel(); } -- cgit v1.2.3 From 4b9ec6645b79f4da1ad5e7dd20a04ca6ca4a3e4a Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 11 Nov 2014 20:44:43 -0800 Subject: cleanup --- include/text.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 686dee4a2..d816fdb0a 100644 --- a/include/text.php +++ b/include/text.php @@ -2023,10 +2023,12 @@ function json_decode_plus($s) { function design_tools() { $channel = get_app()->get_channel(); + $sys = false; if(get_app()->is_sys && is_site_admin()) { require_once('include/identity.php'); $channel = get_sys_channel(); + $sys = true; } $who = $channel['channel_address']; @@ -2034,6 +2036,7 @@ function design_tools() { return replace_macros(get_markup_template('design_tools.tpl'), array( '$title' => t('Design'), '$who' => $who, + '$sys' => $sys, '$blocks' => t('Blocks'), '$menus' => t('Menus'), '$layout' => t('Layouts'), -- cgit v1.2.3