From d4ee3416e56070dec2874be2037d9129dd4d0e09 Mon Sep 17 00:00:00 2001 From: Frank Bergkemper Date: Fri, 30 Sep 2016 14:07:04 +0200 Subject: [PATCH] update check: topnavbar alert msg Displays an alert in topnavbar in case the update data could not be retrieved. --- .../src/Application/View/Helper/UpdateAlert.php | 14 ++++++++++---- module/Application/view/layout/layout.phtml | 2 +- module/Auth/src/Auth/Controller/AuthController.php | 7 ++++++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/module/Application/src/Application/View/Helper/UpdateAlert.php b/module/Application/src/Application/View/Helper/UpdateAlert.php index 6bc85926..27fd1ce1 100644 --- a/module/Application/src/Application/View/Helper/UpdateAlert.php +++ b/module/Application/src/Application/View/Helper/UpdateAlert.php @@ -32,11 +32,17 @@ class UpdateAlert extends AbstractHelper protected $value; protected $result; - public function __invoke($value) + public function __invoke($a=null,$b=null) { - if($value) { - $this->result = ''; - return $this->result; + if($a) { + if($b) { + $this->result = ''; + return $this->result; + } + } + else { + $this->result = ''; + return $this->result; } } } diff --git a/module/Application/view/layout/layout.phtml b/module/Application/view/layout/layout.phtml index 2efb0947..765b2bcc 100644 --- a/module/Application/view/layout/layout.phtml +++ b/module/Application/view/layout/layout.phtml @@ -81,7 +81,7 @@ echo $this->doctype(); navigation('navigation')->menu()->setMinDepth(0)->setMaxDepth(0)->setUlClass('nav navbar-nav'); ?>