]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
Merge pull request #112 from tomtom84/master
[friendica.git] / mod / network.php
index 894ac48ed67e3554d7265841b27f5a34b7540ad5..27c6e315b81fc05fc48a0bca9012507e614e245d 100755 (executable)
@@ -51,14 +51,14 @@ function network_init(&$a) {
 
 function saved_searches($search) {
 
-       $srchurl = '/network' 
-               . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : '') 
-               . ((x($_GET,'star')) ? '?star=' . $_GET['star'] : '')
-               . ((x($_GET,'bmark')) ? '?bmark=' . $_GET['bmark'] : '')
-               . ((x($_GET,'conv')) ? '?conv=' . $_GET['conv'] : '')
-               . ((x($_GET,'nets')) ? '?nets=' . $_GET['nets'] : '')
-               . ((x($_GET,'cmin')) ? '?cmin=' . $_GET['cmin'] : '')
-               . ((x($_GET,'cmax')) ? '?cmax=' . $_GET['cmax'] : '');
+       $srchurl = '/network?f=
+               . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : '') 
+               . ((x($_GET,'star')) ? '&star=' . $_GET['star'] : '')
+               . ((x($_GET,'bmark')) ? '&bmark=' . $_GET['bmark'] : '')
+               . ((x($_GET,'conv')) ? '&conv=' . $_GET['conv'] : '')
+               . ((x($_GET,'nets')) ? '&nets=' . $_GET['nets'] : '')
+               . ((x($_GET,'cmin')) ? '&cmin=' . $_GET['cmin'] : '')
+               . ((x($_GET,'cmax')) ? '&cmax=' . $_GET['cmax'] : '');
        
        $o = '';
 
@@ -164,33 +164,33 @@ function network_content(&$a, $update = 0) {
        $tabs = array(
                array(
                        'label' => t('Commented Order'),
-                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '?cid=' . $_GET['cid'] : ''), 
+                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '?f=&cid=' . $_GET['cid'] : ''), 
                        'sel'=>$all_active,
                ),
                array(
                        'label' => t('Posted Order'),
-                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '?order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : ''), 
+                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '?f=&order=post' . ((x($_GET,'cid')) ? '&cid=' . $_GET['cid'] : ''), 
                        'sel'=>$postord_active,
                ),
 
                array(
                        'label' => t('Personal'),
-                       'url' => $a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?cid=' . $_GET['cid'] : '') . '&conv=1',
+                       'url' => $a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&conv=1',
                        'sel' => $conv_active,
                ),
                array(
                        'label' => t('New'),
-                       'url' => $a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '/new' . ((x($_GET,'cid')) ? '/?cid=' . $_GET['cid'] : ''),
+                       'url' => $a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . '/new' . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : ''),
                        'sel' => $new_active,
                ),
                array(
                        'label' => t('Starred'),
-                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?cid=' . $_GET['cid'] : '') . '&star=1',
+                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&star=1',
                        'sel'=>$starred_active,
                ),
                array(
                        'label' => t('Bookmarks'),
-                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?cid=' . $_GET['cid'] : '') . '&bmark=1',
+                       'url'=>$a->get_baseurl() . '/' . str_replace('/new', '', $a->cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '') . '&bmark=1',
                        'sel'=>$bookmarked_active,
                ),      
 //             array(
@@ -256,8 +256,6 @@ function network_content(&$a, $update = 0) {
 
                nav_set_selected('network');
 
-               $_SESSION['return_url'] = $a->query_string;
-
                $celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
 
                $x = array(
@@ -472,7 +470,7 @@ function network_content(&$a, $update = 0) {
 
                if(count($r)) {
                        foreach($r as $rr)
-                               if(! array_key_exists($rr['item_id'],$parents_arr))
+                               if(! in_array($rr['item_id'],$parents_arr))
                                        $parents_arr[] = $rr['item_id'];
                        $parents_str = implode(', ', $parents_arr);