X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fnetwork.php;h=79a2f2b3896c6490acc789abc7b705b197ff3e7d;hb=3ad7c395fb9a33319531e04673563e7c9983d8f0;hp=f11db45a8b5647c4300df48caeb2ca71313ccf0d;hpb=53dff2204bf2cbe46b6cbdb7174fa0cf1a7162b1;p=friendica.git diff --git a/mod/network.php b/mod/network.php index f11db45a8b..79a2f2b389 100644 --- a/mod/network.php +++ b/mod/network.php @@ -39,22 +39,22 @@ function network_content(&$a, $update = 0) { $group = 0; $nouveau = false; + require_once('include/acl_selectors.php'); - if(! $update) { - $o .= ''; + if(($a->argc > 2) && $a->argv[2] === 'new') + $nouveau = true; - if(($a->argc > 2) && $a->argv[2] === 'new') + if($a->argc > 1) { + if($a->argv[1] === '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 . '>'); - } + else { + $group = intval($a->argv[1]); + $group_acl = array('allow_gid' => '<' . $group . '>'); } + } + + if(! $update) { + $o .= ''; $_SESSION['return_url'] = $a->cmd; @@ -68,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"); @@ -106,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 .= '
' . "\r\n"; - $o .= "\r\n"; - } + $o .= "\r\n"; } @@ -134,6 +133,8 @@ function network_content(&$a, $update = 0) { intval($_SESSION['uid']) ); if(! count($r)) { + if($update) + killme(); notice( t('No such group') . EOL ); goaway($a->get_baseurl() . '/network'); return; // NOTREACHED @@ -340,7 +341,8 @@ function network_content(&$a, $update = 0) { if($item['last-child']) { $comment = replace_macros($cmnt_tpl,array( - '$return_path' => $_SESSION['return_url'], + '$return_path' => '', + '$jsreload' => '', // $_SESSION['return_url'], '$type' => 'net-comment', '$id' => $item['item_id'], '$parent' => $item['parent'], @@ -425,6 +427,7 @@ function network_content(&$a, $update = 0) { '$owner_url' => $owner_url, '$owner_photo' => $owner_photo, '$owner_name' => $owner_name, + '$plink' => get_plink($item), '$drop' => $drop, '$vote' => $likebuttons, '$like' => $like,