Don't display additional content when the output mode is "raw"
This commit is contained in:
parent
bb97539a28
commit
405db86750
|
@ -103,7 +103,7 @@ class Channel extends Timeline
|
||||||
$o .= Renderer::replaceMacros($tpl, ['$reload_uri' => $this->args->getQueryString()]);
|
$o .= Renderer::replaceMacros($tpl, ['$reload_uri' => $this->args->getQueryString()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($request['mode']) || ($request['mode'] != 'raw')) {
|
if (!$this->raw) {
|
||||||
$tabs = $this->getTabArray($this->channel->getTimelines($this->session->getLocalUserId()), 'channel');
|
$tabs = $this->getTabArray($this->channel->getTimelines($this->session->getLocalUserId()), 'channel');
|
||||||
$tabs = array_merge($tabs, $this->getTabArray($this->channelRepository->selectByUid($this->session->getLocalUserId()), 'channel'));
|
$tabs = array_merge($tabs, $this->getTabArray($this->channelRepository->selectByUid($this->session->getLocalUserId()), 'channel'));
|
||||||
$tabs = array_merge($tabs, $this->getTabArray($this->community->getTimelines(true), 'channel'));
|
$tabs = array_merge($tabs, $this->getTabArray($this->community->getTimelines(true), 'channel'));
|
||||||
|
|
|
@ -97,7 +97,7 @@ class Community extends Timeline
|
||||||
$o .= Renderer::replaceMacros($tpl, ['$reload_uri' => $this->args->getQueryString()]);
|
$o .= Renderer::replaceMacros($tpl, ['$reload_uri' => $this->args->getQueryString()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($request['mode']) || ($request['mode'] != 'raw')) {
|
if (!$this->raw) {
|
||||||
$tabs = $this->getTabArray($this->community->getTimelines($this->session->isAuthenticated()), 'community');
|
$tabs = $this->getTabArray($this->community->getTimelines($this->session->isAuthenticated()), 'community');
|
||||||
$tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
|
$tab_tpl = Renderer::getMarkupTemplate('common_tabs.tpl');
|
||||||
$o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]);
|
$o .= Renderer::replaceMacros($tab_tpl, ['$tabs' => $tabs]);
|
||||||
|
|
|
@ -157,7 +157,7 @@ class Network extends Timeline
|
||||||
$o .= Renderer::replaceMacros($tpl, ['$reload_uri' => $this->args->getQueryString()]);
|
$o .= Renderer::replaceMacros($tpl, ['$reload_uri' => $this->args->getQueryString()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(isset($_GET['mode']) and ($_GET['mode'] == 'raw'))) {
|
if (!$this->raw) {
|
||||||
$o .= $this->getTabsHTML();
|
$o .= $this->getTabsHTML();
|
||||||
|
|
||||||
Nav::setSelected($this->args->get(0));
|
Nav::setSelected($this->args->get(0));
|
||||||
|
@ -210,7 +210,6 @@ class Network extends Timeline
|
||||||
];
|
];
|
||||||
|
|
||||||
$o .= $this->conversation->statusEditor($x);
|
$o .= $this->conversation->statusEditor($x);
|
||||||
}
|
|
||||||
|
|
||||||
if ($this->circleId) {
|
if ($this->circleId) {
|
||||||
$circle = $this->database->selectFirst('group', ['name'], ['id' => $this->circleId, 'uid' => $this->session->getLocalUserId()]);
|
$circle = $this->database->selectFirst('group', ['name'], ['id' => $this->circleId, 'uid' => $this->session->getLocalUserId()]);
|
||||||
|
@ -235,6 +234,7 @@ class Network extends Timeline
|
||||||
$o .= Profile::getBirthdays($this->session->getLocalUserId());
|
$o .= Profile::getBirthdays($this->session->getLocalUserId());
|
||||||
$o .= Profile::getEventsReminderHTML($this->session->getLocalUserId(), $this->session->getPublicContactId());
|
$o .= Profile::getEventsReminderHTML($this->session->getLocalUserId(), $this->session->getPublicContactId());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ($this->channel->isTimeline($this->selectedTab) || $this->userDefinedChannel->isTimeline($this->selectedTab, $this->session->getLocalUserId())) {
|
if ($this->channel->isTimeline($this->selectedTab) || $this->userDefinedChannel->isTimeline($this->selectedTab, $this->session->getLocalUserId())) {
|
||||||
|
|
|
@ -68,6 +68,8 @@ class Timeline extends BaseModule
|
||||||
protected $force;
|
protected $force;
|
||||||
/** @var bool */
|
/** @var bool */
|
||||||
protected $update;
|
protected $update;
|
||||||
|
/** @var bool */
|
||||||
|
protected $raw;
|
||||||
|
|
||||||
/** @var App\Mode $mode */
|
/** @var App\Mode $mode */
|
||||||
protected $mode;
|
protected $mode;
|
||||||
|
@ -140,6 +142,7 @@ class Timeline extends BaseModule
|
||||||
$this->noSharer = !empty($request['no_sharer']);
|
$this->noSharer = !empty($request['no_sharer']);
|
||||||
$this->force = !empty($request['force']) && !empty($request['item']);
|
$this->force = !empty($request['force']) && !empty($request['item']);
|
||||||
$this->update = !empty($request['force']) && !empty($request['first_received']) && !empty($request['first_created']) && !empty($request['first_uriid']) && !empty($request['first_commented']);
|
$this->update = !empty($request['force']) && !empty($request['first_received']) && !empty($request['first_created']) && !empty($request['first_uriid']) && !empty($request['first_commented']);
|
||||||
|
$this->raw = !empty($request['mode']) && ($request['mode'] == 'raw');
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function getNoSharerWidget(string $base): string
|
protected function getNoSharerWidget(string $base): string
|
||||||
|
|
Loading…
Reference in a new issue