summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2003-12-01 13:45:33 +0000
committerDries Buytaert <dries@buytaert.net>2003-12-01 13:45:33 +0000
commit4e2c0b250e4f080d0bc3c4b587c6b2c53a0db7ac (patch)
treef057d6143f516349ba72ca67b4e2f4fc736cc95e /includes
parent4a5dc7e43acac8f2c9f3844035055c609da40370 (diff)
downloadbrdo-4e2c0b250e4f080d0bc3c4b587c6b2c53a0db7ac.tar.gz
brdo-4e2c0b250e4f080d0bc3c4b587c6b2c53a0db7ac.tar.bz2
- Introduced a drupal_set_message() and drupal_get_message() function.
Contributed themes and modules need to be updated: - modules: status() is no more; use drupal_set_message() instead. - themes: use drupal_get_message() to check for status messages and visualize them.
Diffstat (limited to 'includes')
-rw-r--r--includes/common.inc22
1 files changed, 22 insertions, 0 deletions
diff --git a/includes/common.inc b/includes/common.inc
index 04026a81e..337090710 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -28,6 +28,28 @@ function drupal_get_title() {
// @}
/**
+ @name drupal_message
+
+ Functions to get and set the message of the current page.
+ @{
+**/
+function drupal_set_message($message = NULL, $type = "status") {
+ static $stored_message;
+
+ if (isset($message)) {
+ $stored_message->message = $message;
+ $stored_message->type = $type;
+ }
+
+ return $stored_message;
+}
+
+function drupal_get_message() {
+ return drupal_set_message();
+}
+// @}
+
+/**
@name drupal_breadcrumb
Functions to get and set the breadcrumb trail of the current page.