]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
A little more french translation.
[friendica.git] / mod / network.php
index 998f8f6ec1e7e8ee0d6b3e2b6af043a5ababc9d0..79a2f2b3896c6490acc789abc7b705b197ff3e7d 100644 (file)
@@ -39,35 +39,23 @@ function network_content(&$a, $update = 0) {
        $group = 0;
 
        $nouveau = false;
+       require_once('include/acl_selectors.php');
 
-       if($update && (x($_SESSION,'netargs'))) {
-               $nouveau = $_SESSION['netargs']['nouveau'];
-               $group   = $_SESSION['netargs']['group'];
-               if(strlen($group))
+       if(($a->argc > 2) && $a->argv[2] === 'new')
+               $nouveau = true;
+
+       if($a->argc > 1) {
+               if($a->argv[1] === 'new')
+                       $nouveau = true;
+               else {
+                       $group = intval($a->argv[1]);
                        $group_acl = array('allow_gid' => '<' . $group . '>');
-               $a->pager['page'] = $_SESSION['netargs']['page'];
-               $a->set_pager_itemspage(50);
+               }
        }
 
-
        if(! $update) {
                $o .= '<script> $(document).ready(function() { $(\'#nav-network-link\').addClass(\'nav-selected\'); });</script>';
 
-               if(($a->argc > 2) && $a->argv[2] === 'new')
-                       $nouveau = true;
-
-                       // pull out the group here because the updater might have different args
-               if($a->argc > 1) {
-                       if($a->argv[1] === 'new')
-                               $nouveau = true;
-                       else {
-                               $group = intval($a->argv[1]);
-                               $group_acl = array('allow_gid' => '<' . $group . '>');
-                       }
-               }
-
-
-               $_SESSION['netarg'] = array('nouveau' => $nouveau, 'group' => $group, 'page' => $a->pager['page']);
                $_SESSION['return_url'] = $a->cmd;
 
                $geotag = (($a->user['allow_location']) ? load_view_file('view/jot_geotag.tpl') : '');
@@ -80,7 +68,6 @@ function network_content(&$a, $update = 0) {
                        '$nickname' => $a->user['nickname']
                ));
 
-               require_once('include/acl_selectors.php');
 
                $tpl = load_view_file("view/jot.tpl");
                
@@ -118,10 +105,10 @@ function network_content(&$a, $update = 0) {
                // filtering by group and also you aren't writing a comment (the last
                // criteria is discovered in javascript).
 
-//             if($a->pager['start'] == 0 && $a->argc == 1) {
                        $o .= '<div id="live-network"></div>' . "\r\n";
-                       $o .= "<script> var profile_uid = " . $_SESSION['uid'] . "; </script>\r\n";
-//             }
+                       $o .= "<script> var profile_uid = " . $_SESSION['uid'] 
+                               . "; var netargs = '" . substr($a->cmd,8) 
+                               . "'; var profile_page = " . $a->pager['page'] . "; </script>\r\n";
 
        }