mirror of
https://github.com/friendica/friendica
synced 2025-04-29 01:04:28 +02:00
Fix codestyle
This commit is contained in:
parent
c978c8e027
commit
c0723e3d48
10 changed files with 339 additions and 303 deletions
|
@ -31,35 +31,35 @@ class BaseProfile extends BaseModule
|
|||
|
||||
$tabs = [
|
||||
[
|
||||
'label' => DI::l10n()->t('Profile'),
|
||||
'url' => $baseProfileUrl . '/profile',
|
||||
'sel' => $current == 'profile' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Profile Details'),
|
||||
'id' => 'profile-tab',
|
||||
'label' => DI::l10n()->t('Profile'),
|
||||
'url' => $baseProfileUrl . '/profile',
|
||||
'sel' => $current == 'profile' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Profile Details'),
|
||||
'id' => 'profile-tab',
|
||||
'accesskey' => 'r',
|
||||
],
|
||||
[
|
||||
'label' => DI::l10n()->t('Conversations'),
|
||||
'url' => $baseProfileUrl . '/conversations',
|
||||
'sel' => $current == 'status' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Conversations started'),
|
||||
'id' => 'status-tab',
|
||||
'label' => DI::l10n()->t('Conversations'),
|
||||
'url' => $baseProfileUrl . '/conversations',
|
||||
'sel' => $current == 'status' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Conversations started'),
|
||||
'id' => 'status-tab',
|
||||
'accesskey' => 'm',
|
||||
],
|
||||
[
|
||||
'label' => DI::l10n()->t('Photos'),
|
||||
'url' => $baseProfileUrl . '/photos',
|
||||
'sel' => $current == 'photos' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Photo Albums'),
|
||||
'id' => 'photo-tab',
|
||||
'label' => DI::l10n()->t('Photos'),
|
||||
'url' => $baseProfileUrl . '/photos',
|
||||
'sel' => $current == 'photos' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Photo Albums'),
|
||||
'id' => 'photo-tab',
|
||||
'accesskey' => 'h',
|
||||
],
|
||||
[
|
||||
'label' => DI::l10n()->t('Media'),
|
||||
'url' => $baseProfileUrl . '/media',
|
||||
'sel' => $current == 'media' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Media'),
|
||||
'id' => 'media-tab',
|
||||
'label' => DI::l10n()->t('Media'),
|
||||
'url' => $baseProfileUrl . '/media',
|
||||
'sel' => $current == 'media' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Media'),
|
||||
'id' => 'media-tab',
|
||||
'accesskey' => 'd',
|
||||
],
|
||||
];
|
||||
|
@ -67,22 +67,22 @@ class BaseProfile extends BaseModule
|
|||
// the calendar link for the full-featured events calendar
|
||||
if ($is_owner) {
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Calendar'),
|
||||
'url' => DI::baseUrl() . '/calendar',
|
||||
'sel' => $current == 'calendar' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Calendar'),
|
||||
'id' => 'calendar-tab',
|
||||
'label' => DI::l10n()->t('Calendar'),
|
||||
'url' => DI::baseUrl() . '/calendar',
|
||||
'sel' => $current == 'calendar' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Calendar'),
|
||||
'id' => 'calendar-tab',
|
||||
'accesskey' => 'c',
|
||||
];
|
||||
} else {
|
||||
$owner = User::getByNickname($nickname, ['uid']);
|
||||
if(DI::userSession()->isAuthenticated() || $owner && Feature::isEnabled($owner['uid'], Feature::PUBLIC_CALENDAR)) {
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Calendar'),
|
||||
'url' => DI::baseUrl() . '/calendar/show/' . $nickname,
|
||||
'sel' => $current == 'calendar' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Calendar'),
|
||||
'id' => 'calendar-tab',
|
||||
'label' => DI::l10n()->t('Calendar'),
|
||||
'url' => DI::baseUrl() . '/calendar/show/' . $nickname,
|
||||
'sel' => $current == 'calendar' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Calendar'),
|
||||
'id' => 'calendar-tab',
|
||||
'accesskey' => 'c',
|
||||
];
|
||||
}
|
||||
|
@ -90,30 +90,30 @@ class BaseProfile extends BaseModule
|
|||
|
||||
if ($is_owner) {
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Personal Notes'),
|
||||
'url' => DI::baseUrl() . '/notes',
|
||||
'sel' => $current == 'notes' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Only You Can See This'),
|
||||
'id' => 'notes-tab',
|
||||
'label' => DI::l10n()->t('Personal Notes'),
|
||||
'url' => DI::baseUrl() . '/notes',
|
||||
'sel' => $current == 'notes' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Only You Can See This'),
|
||||
'id' => 'notes-tab',
|
||||
'accesskey' => 't',
|
||||
];
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Scheduled Posts'),
|
||||
'url' => $baseProfileUrl . '/schedule',
|
||||
'sel' => $current == 'schedule' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Posts that are scheduled for publishing'),
|
||||
'id' => 'schedule-tab',
|
||||
'label' => DI::l10n()->t('Scheduled Posts'),
|
||||
'url' => $baseProfileUrl . '/schedule',
|
||||
'sel' => $current == 'schedule' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Posts that are scheduled for publishing'),
|
||||
'id' => 'schedule-tab',
|
||||
'accesskey' => 'o',
|
||||
];
|
||||
}
|
||||
|
||||
if (!$hide_friends) {
|
||||
$tabs[] = [
|
||||
'label' => DI::l10n()->t('Contacts'),
|
||||
'url' => $baseProfileUrl . '/contacts',
|
||||
'sel' => $current == 'contacts' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Contacts'),
|
||||
'id' => 'viewcontacts-tab',
|
||||
'label' => DI::l10n()->t('Contacts'),
|
||||
'url' => $baseProfileUrl . '/contacts',
|
||||
'sel' => $current == 'contacts' ? 'active' : '',
|
||||
'title' => DI::l10n()->t('Contacts'),
|
||||
'id' => 'viewcontacts-tab',
|
||||
'accesskey' => 'k',
|
||||
];
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ use Friendica\Core\Session\Capability\IHandleUserSessions;
|
|||
use Friendica\Core\Theme;
|
||||
use Friendica\Model\Event;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Model\User;
|
||||
use Friendica\Module\BaseProfile;
|
||||
use Friendica\Module\Response;
|
||||
use Friendica\Module\Security\Login;
|
||||
|
|
|
@ -163,7 +163,7 @@ class Channel extends Timeline
|
|||
throw new HTTPException\BadRequestException($this->l10n->t('Channel not available.'));
|
||||
}
|
||||
|
||||
$this->maxId = $request['last_created'] ?? $this->maxId;
|
||||
$this->maxId = $request['last_created'] ?? $this->maxId;
|
||||
$this->minId = $request['first_created'] ?? $this->minId;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,10 +74,10 @@ class Community extends Timeline
|
|||
|
||||
$t = Renderer::getMarkupTemplate("community.tpl");
|
||||
$o = Renderer::replaceMacros($t, [
|
||||
'$content' => '',
|
||||
'$header' => '',
|
||||
'$content' => '',
|
||||
'$header' => '',
|
||||
'$show_global_community_hint' => ($this->selectedTab == CommunityEntity::GLOBAL) && $this->config->get('system', 'show_global_community_hint'),
|
||||
'$global_community_hint' => $this->l10n->t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.")
|
||||
'$global_community_hint' => $this->l10n->t("This community stream shows all public posts received by this node. They may not reflect the opinions of this node’s users.")
|
||||
]);
|
||||
|
||||
if ($this->pConfig->get($this->session->getLocalUserId(), 'system', 'infinite_scroll')) {
|
||||
|
@ -185,7 +185,7 @@ class Community extends Timeline
|
|||
}
|
||||
}
|
||||
|
||||
$this->maxId = $request['last_received'] ?? $this->maxId;
|
||||
$this->maxId = $request['last_received'] ?? $this->maxId;
|
||||
$this->minId = $request['first_received'] ?? $this->minId;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -192,9 +192,9 @@ class Network extends Timeline
|
|||
|
||||
$x = [
|
||||
'lockstate' => $this->circleId || $this->network || ACL::getLockstateForUserId($this->session->getLocalUserId()) ? 'lock' : 'unlock',
|
||||
'acl' => ACL::getFullSelectorHTML($this->page, $this->session->getLocalUserId(), true, $default_permissions),
|
||||
'bang' => (($this->circleId || $this->network) ? '!' : ''),
|
||||
'content' => '',
|
||||
'acl' => ACL::getFullSelectorHTML($this->page, $this->session->getLocalUserId(), true, $default_permissions),
|
||||
'bang' => (($this->circleId || $this->network) ? '!' : ''),
|
||||
'content' => '',
|
||||
];
|
||||
|
||||
$o .= $this->conversation->statusEditor($x);
|
||||
|
@ -236,7 +236,7 @@ class Network extends Timeline
|
|||
$pager = new BoundariesPager(
|
||||
$this->l10n,
|
||||
$this->args->getQueryString(),
|
||||
$items[0][$this->order] ?? null,
|
||||
$items[0][$this->order] ?? null,
|
||||
$items[count($items) - 1][$this->order] ?? null,
|
||||
$this->itemsPerPage
|
||||
);
|
||||
|
@ -313,23 +313,23 @@ class Network extends Timeline
|
|||
|
||||
if (!empty($request['star'])) {
|
||||
$this->selectedTab = NetworkEntity::STAR;
|
||||
$this->star = true;
|
||||
$this->star = true;
|
||||
} else {
|
||||
$this->star = $this->selectedTab == NetworkEntity::STAR;
|
||||
}
|
||||
|
||||
if (!empty($request['mention'])) {
|
||||
$this->selectedTab = NetworkEntity::MENTION;
|
||||
$this->mention = true;
|
||||
$this->mention = true;
|
||||
} else {
|
||||
$this->mention = $this->selectedTab == NetworkEntity::MENTION;
|
||||
}
|
||||
|
||||
if (!empty($request['order'])) {
|
||||
$this->selectedTab = $request['order'];
|
||||
$this->order = $request['order'];
|
||||
$this->star = false;
|
||||
$this->mention = false;
|
||||
$this->order = $request['order'];
|
||||
$this->star = false;
|
||||
$this->mention = false;
|
||||
} elseif (in_array($this->selectedTab, [NetworkEntity::RECEIVED, NetworkEntity::STAR]) || $this->community->isTimeline($this->selectedTab)) {
|
||||
$this->order = 'received';
|
||||
} elseif (($this->selectedTab == NetworkEntity::CREATED) || $this->channel->isTimeline($this->selectedTab) || $this->userDefinedChannel->isTimeline($this->selectedTab, $this->session->getLocalUserId())) {
|
||||
|
@ -344,7 +344,8 @@ class Network extends Timeline
|
|||
// since otherwise the feed will optically jump, when some already visible thread has been updated.
|
||||
if ($this->update && ($this->selectedTab == NetworkEntity::COMMENTED)) {
|
||||
$this->order = 'received';
|
||||
$request['last_received'] = $request['last_commented'] ?? null;
|
||||
|
||||
$request['last_received'] = $request['last_commented'] ?? null;
|
||||
$request['first_received'] = $request['first_commented'] ?? null;
|
||||
}
|
||||
|
||||
|
@ -361,7 +362,7 @@ class Network extends Timeline
|
|||
$this->network = $request['nets'] ?? '';
|
||||
|
||||
$this->dateFrom = $this->parameters['from'] ?? '';
|
||||
$this->dateTo = $this->parameters['to'] ?? '';
|
||||
$this->dateTo = $this->parameters['to'] ?? '';
|
||||
|
||||
$this->setMaxMinByOrder($request);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue