aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorFabio Comuni <fabrix.xm@gmail.com>2011-05-23 11:39:57 +0200
committerFabio Comuni <fabrix.xm@gmail.com>2011-05-23 11:39:57 +0200
commite1107b55c6715d131ca808890ce51c6301e56ccc (patch)
treefe082a84a1b20b68141e3b1ffdac697051ae73b6 /index.php
parent3ea145fae7defaf959b04797afc8482bd0190352 (diff)
downloadvolse-hubzilla-e1107b55c6715d131ca808890ce51c6301e56ccc.tar.gz
volse-hubzilla-e1107b55c6715d131ca808890ce51c6301e56ccc.tar.bz2
volse-hubzilla-e1107b55c6715d131ca808890ce51c6301e56ccc.zip
add info() function. Works like notice() but show messages in a div with class info-message.
update code to use info() instead of notice() when appropriate (non-error message) add info-message class style in themes
Diffstat (limited to 'index.php')
-rw-r--r--index.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/index.php b/index.php
index 05eef6c6e..dc149436c 100644
--- a/index.php
+++ b/index.php
@@ -124,6 +124,9 @@ if(! x($_SESSION,'authenticated'))
if(! x($_SESSION,'sysmsg'))
$_SESSION['sysmsg'] = '';
+if(! x($_SESSION,'sysmsg_info'))
+ $_SESSION['sysmsg_info'] = '';
+
/*
* check_config() is responsible for running update scripts. These automatically
* update the DB schema whenever we push a new one out. It also checks to see if
@@ -276,8 +279,16 @@ if(stristr($_SESSION['sysmsg'], t('Permission denied'))) {
if(x($_SESSION,'sysmsg')) {
$a->page['content'] = "<div id=\"sysmsg\" class=\"error-message\">{$_SESSION['sysmsg']}</div>\r\n"
. ((x($a->page,'content')) ? $a->page['content'] : '');
+ $_SESSION['sysmsg']="";
unset($_SESSION['sysmsg']);
}
+if(x($_SESSION,'sysmsg_info')) {
+ $a->page['content'] = "<div id=\"sysmsg_info\" class=\"info-message\">{$_SESSION['sysmsg_info']}</div>\r\n"
+ . ((x($a->page,'content')) ? $a->page['content'] : '');
+ $_SESSION['sysmsg_info']="";
+ unset($_SESSION['sysmsg_info']);
+}
+
call_hooks('page_end', $a->page['content']);