diff options
author | Friendika <info@friendika.com> | 2011-02-17 00:40:35 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-02-17 00:40:35 -0800 |
commit | f7b2f9f5e7556e241d096ad31d9140619895f529 (patch) | |
tree | 6e6cc0757be5bf2ea80c3284c1a791bddb256e25 /mod/network.php | |
parent | 3cc63f2e6f17a9da6c023a4dc696a455a3d5286f (diff) | |
download | volse-hubzilla-f7b2f9f5e7556e241d096ad31d9140619895f529.tar.gz volse-hubzilla-f7b2f9f5e7556e241d096ad31d9140619895f529.tar.bz2 volse-hubzilla-f7b2f9f5e7556e241d096ad31d9140619895f529.zip |
convert update script arg passing to js - remembering the browser prefetch issues
Diffstat (limited to 'mod/network.php')
-rw-r--r-- | mod/network.php | 37 |
1 files changed, 12 insertions, 25 deletions
diff --git a/mod/network.php b/mod/network.php index 4dc5d4b4c..696d00dcc 100644 --- a/mod/network.php +++ b/mod/network.php @@ -40,34 +40,21 @@ function network_content(&$a, $update = 0) { $nouveau = false; - 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['netargs'] = 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') : ''); @@ -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"; } |