aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-29 16:10:35 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-29 16:10:35 +0000
commit9d8a1ea11a1851958393d8e680424d87aa87472d (patch)
treea548d6fecca06ce09c9fcb9272803ca7f9da4a35
parent9f856937caf1ac2cab02fbe5aa73b0c3bb84f84c (diff)
downloadelgg-9d8a1ea11a1851958393d8e680424d87aa87472d.tar.gz
elgg-9d8a1ea11a1851958393d8e680424d87aa87472d.tar.bz2
Fixed auto-display of system errors in ajax actions. Fixed docs for system_messages(). Blech...that needs cleaned up.
git-svn-id: http://code.elgg.org/elgg/trunk@8879 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/elgglib.php2
-rw-r--r--js/lib/ajax.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 7076ec12d..87866f318 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -496,7 +496,7 @@ function sanitise_filepath($path, $append_slash = TRUE) {
* 'messages') as well as {@link register_error()} messages ($register = 'errors').
*
* @param mixed $message Optionally, a single message or array of messages to add, (default: null)
- * @param string $register Types of message: "errors", "messages" (default: messages)
+ * @param string $register Types of message: "error", "success" (default: success)
* @param bool $count Count the number of messages (default: false)
*
* @return true|false|array Either the array of messages, or a response regarding
diff --git a/js/lib/ajax.js b/js/lib/ajax.js
index 5e290df6f..6f6ae052f 100644
--- a/js/lib/ajax.js
+++ b/js/lib/ajax.js
@@ -194,7 +194,7 @@ elgg.action = function(action, options) {
var custom_success = options.success || elgg.nullFunction;
options.success = function(json, two, three, four) {
if (json && json.system_messages) {
- elgg.register_error(json.system_messages.errors);
+ elgg.register_error(json.system_messages.error);
elgg.system_message(json.system_messages.success);
}