get("messages"); $status[] = array($msg, $severity); $session->set("messages", $status); } /** * 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. * @return html text */ static function get() { $buf = array(); $messages = Session::instance()->get_once("messages", array()); foreach ($messages as $msg) { $buf[] = "
  • $msg[0]
  • "; } if ($buf) { return ""; } } /** * Convert a message severity to a CSS class * @param integer $severity * @return string */ static function severity_class($severity) { switch($severity) { case self::SUCCESS: return "gSuccess"; case self::INFO: return "gInfo"; case self::WARNING: return "gWarning"; case self::ERROR: return "gError"; } } }