Update message.php

Add method to retrieve quick (rough) count of alert messages waiting.
This commit is contained in:
Nate
2019-02-19 14:50:03 -07:00
committed by GitHub
parent f4cdf58e65
commit 41cba72be7

View File

@@ -35,6 +35,10 @@ if (!class_exists('message')) {
$_SESSION["messages"][$mood]['delay'][] = $delay;
}
static function count() {
return is_array($_SESSION["messages"]) ? sizeof($_SESSION["messages"]) : 0;
}
static function html($clear_messages = true, $spacer = "") {
$html = "${spacer}//render the messages\n";
$spacer .="\t";