szurubooru/src/Messenger.php

19 lines
388 B
PHP
Raw Normal View History

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