X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FBaseNotifications.php;h=d7319fa4ea37681c1e4fcc135f79bf87a7541669;hb=04505366217b3a9c00710321f4495da03f727d39;hp=8a569e24f16f0295950f778e2d6ec71bc51d10bc;hpb=14988ddf19f5baabef0989f3b888b2200f8e4c9e;p=friendica.git diff --git a/src/Module/BaseNotifications.php b/src/Module/BaseNotifications.php index 8a569e24f1..d7319fa4ea 100644 --- a/src/Module/BaseNotifications.php +++ b/src/Module/BaseNotifications.php @@ -1,6 +1,6 @@ l10n->t('Permission denied.')); + throw new ForbiddenException($this->t('Permission denied.')); } $page = ($_REQUEST['page'] ?? 0) ?: 1; $this->firstItemNum = ($page * self::ITEMS_PER_PAGE) - self::ITEMS_PER_PAGE; $this->showAll = ($_REQUEST['show'] ?? '') === 'all'; - - $this->args = $args; } - public function rawContent() + protected function rawContent(array $request = []) { // If the last argument of the query is NOT json, return if ($this->args->get($this->args->getArgc() - 1) !== 'json') { @@ -144,7 +145,7 @@ abstract class BaseNotifications extends BaseModule $notif_tpl = Renderer::getMarkupTemplate('notifications/notifications.tpl'); return Renderer::replaceMacros($notif_tpl, [ - '$header' => $header ?? $this->l10n->t('Notifications'), + '$header' => $header ?? $this->t('Notifications'), '$tabs' => $tabs, '$notifications' => $notifications, '$noContent' => $noContent, @@ -167,7 +168,7 @@ abstract class BaseNotifications extends BaseModule foreach (self::URL_TYPES as $type => $url) { $tabs[] = [ - 'label' => $this->l10n->t(self::PRINT_TYPES[$type]), + 'label' => $this->t(self::PRINT_TYPES[$type]), 'url' => 'notifications/' . $url, 'sel' => (($selected == $url) ? 'active' : ''), 'id' => $type . '-tab',