aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-07-07 14:46:47 +0200
committerMario Vavti <mario@mariovavti.com>2015-07-07 14:46:47 +0200
commitb50151d7bf5f05b4cac8afa2674605e195d12e9a (patch)
treec751d531f1e5264b54a0d638c8362ec7e3aa1b13
parent18798b1d12c1716b395d89bf214fdd42f41fd2d1 (diff)
downloadvolse-hubzilla-b50151d7bf5f05b4cac8afa2674605e195d12e9a.tar.gz
volse-hubzilla-b50151d7bf5f05b4cac8afa2674605e195d12e9a.tar.bz2
volse-hubzilla-b50151d7bf5f05b4cac8afa2674605e195d12e9a.zip
make directory suggest work with directory options
-rw-r--r--include/dir_fns.php8
-rw-r--r--include/widgets.php2
2 files changed, 7 insertions, 3 deletions
diff --git a/include/dir_fns.php b/include/dir_fns.php
index 77c78558c..046f05a50 100644
--- a/include/dir_fns.php
+++ b/include/dir_fns.php
@@ -113,6 +113,8 @@ function dir_sort_links() {
$safe_mode = get_safemode_setting($observer);
$globaldir = get_globaldir_setting($observer);
+ $suggest = ($_REQUEST['suggest']) ? '&suggest=' . $_REQUEST['suggest'] : '';
+
// Build urls without order and pubforums so it's easy to tack on the changed value
// Probably there's an easier way to do this
@@ -126,18 +128,20 @@ function dir_sort_links() {
$url = 'directory?f=';
$tmp = array_merge($_GET,$_POST);
+ unset($tmp['suggest']);
unset($tmp['order']);
unset($tmp['q']);
unset($tmp['f']);
- $sorturl = $url . http_build_query($tmp);
+ $sorturl = $url . $suggest . http_build_query($tmp);
$tmp = array_merge($_GET,$_POST);
+ unset($tmp['suggest']);
unset($tmp['pubforums']);
unset($tmp['global']);
unset($tmp['safe']);
unset($tmp['q']);
unset($tmp['f']);
- $forumsurl = $url . http_build_query($tmp);
+ $forumsurl = $url . $suggest . http_build_query($tmp);
$o = replace_macros(get_markup_template('dir_sort_links.tpl'), array(
'$header' => t('Directory Options'),
diff --git a/include/widgets.php b/include/widgets.php
index 4a9032a21..888e56733 100644
--- a/include/widgets.php
+++ b/include/widgets.php
@@ -132,7 +132,7 @@ function widget_suggestions($arr) {
'profile' => $rr['xchan_url'],
'name' => $rr['xchan_name'],
'photo' => $rr['xchan_photo_m'],
- 'ignlnk' => z_root() . '/suggest?ignore=' . $rr['xchan_hash'],
+ 'ignlnk' => z_root() . '/directory?ignore=' . $rr['xchan_hash'],
'conntxt' => t('Connect'),
'connlnk' => $connlnk,
'ignore' => t('Ignore/Hide')