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);
// Set this so that the conversation function can find out contact info for our wall-wall items
$a->page_contact = $a->contact;
// Set this so that the conversation function can find out contact info for our wall-wall items
$a->page_contact = $a->contact;
- $o .= conversation($a, $items, $mode, $update);
+ $o = conversation($a, $items, $mode, $update);
$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')) {
- notice(sprintf(tt("Warning: This group contains %s member from a network that doesn't allow non public messages.",
+ if (($t = Contact::getOStatusCountByGroupId($group)) && !PConfig::get(local_user(), 'system', 'nowarn_insecure')) {
+ notice(tt("Warning: This group contains %s member from a network that doesn't allow non public messages.",
// 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));
- if (strlen($file)) {
- $sql_post_table .= sprintf("INNER JOIN (SELECT `oid` FROM `term` WHERE `term` = '%s' AND `otype` = %d AND `type` = %d AND `uid` = %d ORDER BY `tid` DESC) AS `term` ON `item`.`id` = `term`.`oid` ",
- dbesc(protect_sprintf($file)), intval(TERM_OBJ_POST), intval(TERM_FILE), intval(local_user()));
- $sql_order = "`item`.`id`";
- $order_mode = "id";
- }
-
- if ($_GET["offset"] == "") {
+ if (x($_GET, 'offset')) {
+ $date_offset = $_GET["offset"];
+ } elseif(count($items)) {
// 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',