diff options
Diffstat (limited to 'core/helpers/message.php')
-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. |