diff --git a/lib/Alchemy/Phrasea/Controller/User/Notifications.php b/lib/Alchemy/Phrasea/Controller/User/Notifications.php index e958cf3db5..7be6a2d4a1 100644 --- a/lib/Alchemy/Phrasea/Controller/User/Notifications.php +++ b/lib/Alchemy/Phrasea/Controller/User/Notifications.php @@ -103,9 +103,9 @@ class Notifications implements ControllerProviderInterface $app->abort(400); } - $page = (int) $request->query->get('page', 1); + $page = (int) $request->query->get('page', 0); - return $app->json($app['events-manager']->get_json_notifications(($page < 1 ? 1 : $page))); + return $app->json($app['events-manager']->get_notifications_as_array(($page < 0 ? 0 : $page))); } /** diff --git a/lib/classes/eventsmanager/broker.php b/lib/classes/eventsmanager/broker.php index 86aa458b42..0cec21b9af 100644 --- a/lib/classes/eventsmanager/broker.php +++ b/lib/classes/eventsmanager/broker.php @@ -111,7 +111,7 @@ class eventsmanager_broker return true; } - public function get_json_notifications($page = 0) + public function get_notifications_as_array($page = 0) { $unread = 0; $total = 0; @@ -178,7 +178,7 @@ class eventsmanager_broker $data['next'] = '' . _('charger d\'avantages de notifications') . ''; } - return p4string::jsonencode($data); + return $data; } public function get_unread_notifications_number() diff --git a/templates/web/common/menubar.html.twig b/templates/web/common/menubar.html.twig index 54e015210b..9151141498 100644 --- a/templates/web/common/menubar.html.twig +++ b/templates/web/common/menubar.html.twig @@ -135,11 +135,6 @@ - -
{% endif %}