summaryrefslogtreecommitdiff
path: root/core/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-27 03:35:57 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-27 03:35:57 +0000
commitf808dd9d01c2c72779177438a8339af9d2544365 (patch)
treebd711ca289b2233ee6fa2c4973f2ec35afd23929 /core/helpers
parenta26127ae9c44263353159910ba6bf058288c2b75 (diff)
Add clear_permanent()
Diffstat (limited to 'core/helpers')
-rw-r--r--core/helpers/message.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/helpers/message.php b/core/helpers/message.php
index 4860bea6..25d7c150 100644
--- a/core/helpers/message.php
+++ b/core/helpers/message.php
@@ -85,6 +85,17 @@ class message_Core {
}
/**
+ * Remove any permanent message by key.
+ * @param string $permanent_key
+ */
+ public function clear_permanent($permanent_key) {
+ $message = ORM::factory("message")->where("key", $permanent_key)->find();
+ if ($message->loaded) {
+ $message->delete();
+ }
+ }
+
+ /**
* Get any pending messages. There are two types of messages, transient and permanent.
* Permanent messages are used to let the admin know that there are pending administrative
* issues that need to be resolved. Transient ones are only displayed once.