summaryrefslogtreecommitdiff
path: root/app/Helper/App.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2015-11-15 12:50:33 -0500
committerFrederic Guillot <fred@kanboard.net>2015-11-15 12:50:33 -0500
commita675271ad71b7713d1b33bdba3c51b2b04813229 (patch)
treee54d8a95e16ca521193b9fd5a5eb071aa2910823 /app/Helper/App.php
parent2fc402f6733573627ad25394d109b9f848ef04f6 (diff)
Rewrite of session management
Diffstat (limited to 'app/Helper/App.php')
-rw-r--r--app/Helper/App.php19
1 files changed, 9 insertions, 10 deletions
diff --git a/app/Helper/App.php b/app/Helper/App.php
index 19801fa8..33729f2b 100644
--- a/app/Helper/App.php
+++ b/app/Helper/App.php
@@ -62,18 +62,17 @@ class App extends \Kanboard\Core\Base
*/
public function flashMessage()
{
- $html = '';
+ $success_message = $this->flash->getMessage('success');
+ $failure_message = $this->flash->getMessage('failure');
- if (isset($this->session['flash_message'])) {
- $html = '<div class="alert alert-success alert-fade-out">'.$this->helper->e($this->session['flash_message']).'</div>';
- unset($this->session['flash_message']);
- unset($this->session['flash_error_message']);
- } elseif (isset($this->session['flash_error_message'])) {
- $html = '<div class="alert alert-error">'.$this->helper->e($this->session['flash_error_message']).'</div>';
- unset($this->session['flash_message']);
- unset($this->session['flash_error_message']);
+ if (! empty($success_message)) {
+ return '<div class="alert alert-success alert-fade-out">'.$this->helper->e($success_message).'</div>';
}
- return $html;
+ if (! empty($failure_message)) {
+ return '<div class="alert alert-error">'.$this->helper->e($failure_message).'</div>';
+ }
+
+ return '';
}
}