szurubooru/src/Messenger.php
2014-05-17 00:02:01 +02:00

18 lines
388 B
PHP

<?php
class Messenger
{
public static function message($message, $success = true)
{
if (empty($message))
return;
$context = Core::getContext();
if (!preg_match('/[.?!]$/', $message))
$message .= '.';
$context->transport->success = $success;
$context->transport->message = $message;
$context->transport->messageHtml = TextHelper::parseMarkdown($message, true);
}
}