diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-12-27 03:35:57 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-12-27 03:35:57 +0000 |
commit | f808dd9d01c2c72779177438a8339af9d2544365 (patch) | |
tree | bd711ca289b2233ee6fa2c4973f2ec35afd23929 /core/helpers | |
parent | a26127ae9c44263353159910ba6bf058288c2b75 (diff) |
Add clear_permanent()
Diffstat (limited to 'core/helpers')
-rw-r--r-- | core/helpers/message.php | 11 |
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. |