Пример #1
0
 /**
  * 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()
 {
     if (!identity::active_user()->admin) {
         return;
     }
     $buf = array();
     foreach (ORM::factory("message")->find_all() as $msg) {
         $value = str_replace("__CSRF__", access::csrf_token(), $msg->value);
         $buf[] = "<li class=\"" . site_status::severity_class($msg->severity) . "\">{$value}</li>";
     }
     if ($buf) {
         return "<ul id=\"g-site-status\">" . implode("", $buf) . "</ul>";
     }
 }