use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
use Friendica\Core\System;
use Friendica\Core\Config;
use Friendica\Core\PConfig;
- $a->page['aside'] .= (feature_enabled(local_user(),'groups') ? group_side('network/0','network','standard',$group_id) : '');
- $a->page['aside'] .= (feature_enabled(local_user(),'forumlist_widget') ? ForumManager::widget(local_user(),$cid) : '');
+ $a->page['aside'] .= (Feature::isEnabled(local_user(),'groups') ? Group::sidebarWidget('network/0','network','standard',$group_id) : '');
+ $a->page['aside'] .= (Feature::isEnabled(local_user(), 'forumlist_widget') ? ForumManager::widget(local_user(), $cid) : '');
$a->page['aside'] .= posted_date_widget('network',local_user(),false);
$a->page['aside'] .= networks_widget('network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
$a->page['aside'] .= saved_searches($search);
$a->page['aside'] .= posted_date_widget('network',local_user(),false);
$a->page['aside'] .= networks_widget('network',(x($_GET, 'nets') ? $_GET['nets'] : ''));
$a->page['aside'] .= saved_searches($search);
$rawmode = (isset($_GET["mode"]) AND ($_GET["mode"] == "raw"));
if (isset($_GET["last_received"]) && isset($_GET["last_commented"]) && isset($_GET["last_created"]) && isset($_GET["last_id"])) {
$rawmode = (isset($_GET["mode"]) AND ($_GET["mode"] == "raw"));
if (isset($_GET["last_received"]) && isset($_GET["last_commented"]) && isset($_GET["last_created"]) && isset($_GET["last_id"])) {
- $last_received = dbm::date($_GET["last_received"]);
- $last_commented = dbm::date($_GET["last_commented"]);
- $last_created = dbm::date($_GET["last_created"]);
+ $last_received = DBM::date($_GET["last_received"]);
+ $last_commented = DBM::date($_GET["last_commented"]);
+ $last_created = DBM::date($_GET["last_created"]);
- if (($t = group_public_members($group)) && !PConfig::get(local_user(),'system','nowarn_insecure')) {
+ if (($t = Contact::getOStatusCountByGroupId($group)) && !PConfig::get(local_user(), 'system', 'nowarn_insecure')) {
notice(sprintf(tt("Warning: This group contains %s member from a network that doesn't allow non public messages.",
"Warning: This group contains %s members from a network that doesn't allow non public messages.",
$t), $t).EOL);
notice(sprintf(tt("Warning: This group contains %s member from a network that doesn't allow non public messages.",
"Warning: This group contains %s members from a network that doesn't allow non public messages.",
$t), $t).EOL);
// If $cid belongs to a communitity forum or a privat goup,.add a mention to the status editor
$condition = array("`id` = ? AND (`forum` OR `prv`)", $cid);
$contact = dba::select('contact', array('addr', 'nick'), $condition, array('limit' => 1));
// If $cid belongs to a communitity forum or a privat goup,.add a mention to the status editor
$condition = array("`id` = ? AND (`forum` OR `prv`)", $cid);
$contact = dba::select('contact', array('addr', 'nick'), $condition, array('limit' => 1));
if ($group) {
$r = dba::select('group', array('name'), array('id' => $group, 'uid' => $_SESSION['uid']), array('limit' => 1));
if ($group) {
$r = dba::select('group', array('name'), array('id' => $group, 'uid' => $_SESSION['uid']), array('limit' => 1));
if ((is_array($contacts)) && count($contacts)) {
$contact_str_self = "";
$contact_str = implode(',',$contacts);
$self = dba::select('contact', array('id'), array('uid' => $_SESSION['uid'], 'self' => true), array('limit' => 1));
if ((is_array($contacts)) && count($contacts)) {
$contact_str_self = "";
$contact_str = implode(',',$contacts);
$self = dba::select('contact', array('id'), array('uid' => $_SESSION['uid'], 'self' => true), array('limit' => 1));
'forum', 'prv', 'contact-type', 'addr', 'thumb', 'location');
$condition = array("`id` = ? AND (NOT `blocked` OR `pending`)", $cid);
$r = dba::select('contact', $fields, $condition, array('limit' => 1));
'forum', 'prv', 'contact-type', 'addr', 'thumb', 'location');
$condition = array("`id` = ? AND (NOT `blocked` OR `pending`)", $cid);
$r = dba::select('contact', $fields, $condition, array('limit' => 1));
foreach ($r as $rr) {
if (!in_array($rr['item_id'],$parents_arr)) {
$parents_arr[] = $rr['item_id'];
foreach ($r as $rr) {
if (!in_array($rr['item_id'],$parents_arr)) {
$parents_arr[] = $rr['item_id'];
if (!$group && !$cid && !$star) {
$condition = array('unseen' => true, 'uid' => local_user());
if (!$group && !$cid && !$star) {
$condition = array('unseen' => true, 'uid' => local_user());
} elseif ($parents_str) {
$condition = array("`uid` = ? AND `unseen` AND `parent` IN (" . dbesc($parents_str) . ")", local_user());
} elseif ($parents_str) {
$condition = array("`uid` = ? AND `unseen` AND `parent` IN (" . dbesc($parents_str) . ")", local_user());
$mode = 'network';
$o .= networkConversation($a, $items, $mode, $update);
$mode = 'network';
$o .= networkConversation($a, $items, $mode, $update);
// item filter tabs
/// @TODO fix this logic, reduce duplication
/// $a->page['content'] .= '<div class="tabs-wrapper">';
// item filter tabs
/// @TODO fix this logic, reduce duplication
/// $a->page['content'] .= '<div class="tabs-wrapper">';
list($no_active, $all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active) = network_query_get_sel_tab($a);
list($no_active, $all_active, $postord_active, $conv_active, $new_active, $starred_active, $bookmarked_active, $spam_active) = network_query_get_sel_tab($a);
$tabs[] = array(
'label' => t('Personal'),
'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&conv=1',
$tabs[] = array(
'label' => t('Personal'),
'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&conv=1',
$tabs[] = array(
'label' => t('Shared Links'),
'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&bmark=1',
$tabs[] = array(
'label' => t('Shared Links'),
'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&bmark=1',
$tabs[] = array(
'label' => t('Starred'),
'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&star=1',
$tabs[] = array(
'label' => t('Starred'),
'url' => str_replace('/new', '', $cmd) . ((x($_GET,'cid')) ? '/?f=&cid=' . $_GET['cid'] : '/?f=') . '&star=1',