aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/elgglib.php10
-rw-r--r--engine/lib/views.php8
2 files changed, 9 insertions, 9 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index dcc468cd7..e6bbb3c01 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -608,7 +608,7 @@ function get_register($register_name) {
* whether the message addition was successful.
* @todo Clean up. Separate registering messages and retrieving them.
*/
-function system_messages($message = null, $register = "messages", $count = false) {
+function system_messages($message = null, $register = "success", $count = false) {
if (!isset($_SESSION['msg'])) {
$_SESSION['msg'] = array();
}
@@ -665,10 +665,10 @@ function count_messages($register = "") {
*
* @param string|array $message Message or messages to add
*
- * @return Bool
+ * @return bool
*/
function system_message($message) {
- return system_messages($message, "messages");
+ return system_messages($message, "success");
}
/**
@@ -678,10 +678,10 @@ function system_message($message) {
*
* @param string|array $error Error or errors to add
*
- * @return true|false Success response
+ * @return bool
*/
function register_error($error) {
- return system_messages($error, "errors");
+ return system_messages($error, "error");
}
/**
diff --git a/engine/lib/views.php b/engine/lib/views.php
index d2e63d1a5..17b93926c 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -563,10 +563,10 @@ function elgg_view_page($title, $body, $page_shell = 'default', $vars = array())
if (count_messages()) {
// get messages - try for errors first
- $sysmessages = system_messages(NULL, "errors");
- if (count($sysmessages["errors"]) == 0) {
+ $messages = system_messages(NULL, "error");
+ if (count($messages["error"]) == 0) {
// no errors so grab rest of messages
- $sysmessages = system_messages(null, "");
+ $messages = system_messages(null, "");
} else {
// we have errors - clear out remaining messages
system_messages(null, "");
@@ -575,7 +575,7 @@ function elgg_view_page($title, $body, $page_shell = 'default', $vars = array())
$vars['title'] = $title;
$vars['body'] = $body;
- $vars['sysmessages'] = $sysmessages;
+ $vars['sysmessages'] = $messages;
// Draw the page
$output = elgg_view("page_shells/$page_shell", $vars);