<?php
-
/**
- * @file mod/network.php
+ * @copyright Copyright (C) 2020, Friendica
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ *
*/
use Friendica\App;
use Friendica\Content\Widget;
use Friendica\Content\Text\HTML;
use Friendica\Core\ACL;
-use Friendica\Core\Config;
use Friendica\Core\Hook;
use Friendica\Core\Logger;
use Friendica\Core\Protocol;
return ' LIMIT 100';
}
- // check if we serve a mobile device and get the user settings
- // accordingly
if (DI::mode()->isMobile()) {
- $itemspage_network = DI::pConfig()->get(local_user(), 'system', 'itemspage_mobile_network');
- $itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 20);
+ $itemspage_network = DI::pConfig()->get(local_user(), 'system', 'itemspage_mobile_network',
+ DI::config()->get('system', 'itemspage_network_mobile'));
} else {
- $itemspage_network = DI::pConfig()->get(local_user(), 'system', 'itemspage_network');
- $itemspage_network = ((intval($itemspage_network)) ? $itemspage_network : 40);
+ $itemspage_network = DI::pConfig()->get(local_user(), 'system', 'itemspage_network',
+ DI::config()->get('system', 'itemspage_network'));
}
// now that we have the user settings, see if the theme forces
$items = [];
}
- $o = conversation($a, $items, $pager, $mode, $update, false, $ordering, local_user());
+ $o = conversation($a, $items, $mode, $update, false, $ordering, local_user());
if (!$update) {
if (DI::pConfig()->get(local_user(), 'system', 'infinite_scroll')) {
}
}
- $pager = new Pager(DI::args()->getQueryString());
+ $pager = new Pager(DI::l10n(), DI::args()->getQueryString());
networkPager($a, $pager, $update);
$tabs = network_tabs($a);
$o .= $tabs;
- if ($gid && ($t = Contact::getOStatusCountByGroupId($gid)) && !DI::pConfig()->get(local_user(), 'system', 'nowarn_insecure')) {
- notice(DI::l10n()->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) . EOL);
- notice(DI::l10n()->t("Messages in this group won't be send to these receivers.").EOL);
- }
-
Nav::setSelected('network');
$content = '';
'contacts' => $entries,
'id' => 'network',
]) . $o;
-
- if ($contact['network'] === Protocol::OSTATUS && $contact['writable'] && !DI::pConfig()->get(local_user(),'system','nowarn_insecure')) {
- notice(DI::l10n()->t('Private messages to this person are at risk of public disclosure.') . EOL);
- }
} else {
notice(DI::l10n()->t('Invalid contact.') . EOL);
DI::baseUrl()->redirect('network');
$sql_range = '';
}
- $pager = new Pager(DI::args()->getQueryString());
+ $pager = new Pager(DI::l10n(), DI::args()->getQueryString());
$pager_sql = networkPager($a, $pager, $update);
{
// item filter tabs
/// @TODO fix this logic, reduce duplication
- /// $a->page['content'] .= '<div class="tabs-wrapper">';
+ /// DI::page()['content'] .= '<div class="tabs-wrapper">';
list($no_active, $all_active, $post_active, $conv_active, $new_active, $starred_active, $bookmarked_active) = network_query_get_sel_tab($a);
// if no tabs are selected, defaults to activitys