diff options
author | Habeas Codice <habeascodice@federated.social> | 2014-11-26 11:02:30 -0800 |
---|---|---|
committer | Habeas Codice <habeascodice@federated.social> | 2014-11-26 11:02:30 -0800 |
commit | d3ffdbf2a4e25636cb2762f35c69fcc1abbcf7d5 (patch) | |
tree | 0dd876ff9767998ec13c73cab2ff02f5cbce371a /mod/directory.php | |
parent | 1a57f3ed517e7dd68bd6c7a23802ebee138c128f (diff) | |
parent | 3bb0ef8a82ec660ff8ef37b9abc93da94234649a (diff) | |
download | volse-hubzilla-d3ffdbf2a4e25636cb2762f35c69fcc1abbcf7d5.tar.gz volse-hubzilla-d3ffdbf2a4e25636cb2762f35c69fcc1abbcf7d5.tar.bz2 volse-hubzilla-d3ffdbf2a4e25636cb2762f35c69fcc1abbcf7d5.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/directory.php')
-rw-r--r-- | mod/directory.php | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/mod/directory.php b/mod/directory.php index d4a4c383a..c06a14d9e 100644 --- a/mod/directory.php +++ b/mod/directory.php @@ -31,8 +31,9 @@ function directory_content(&$a) { if(x($_REQUEST,'safe')) $safe_mode = (intval($_REQUEST['safe'])); - - + $pubforums = null; + if(array_key_exists('pubforums',$_REQUEST)) + $pubforums = intval($_REQUEST['pubforums']); $o = ''; nav_set_selected('directory'); @@ -92,11 +93,21 @@ function directory_content(&$a) { $query .= '&keywords=' . urlencode($keywords); if($advanced) $query .= '&query=' . urlencode($advanced); + if(! is_null($pubforums)) + $query .= '&pubforums=' . intval($pubforums); + + if(! is_null($pubforums)) + $query .= '&pubforums=' . intval($pubforums); $sort_order = ((x($_REQUEST,'order')) ? $_REQUEST['order'] : ''); + if($pubforums) + $sort_order = 'normal'; + if($sort_order) $query .= '&order=' . urlencode($sort_order); + + if($a->pager['page'] != 1) $query .= '&p=' . $a->pager['page']; |