- added persistent map size for non "Chrome" browsers, fixed #585

- added notification to /admin/maps page if there are no maps found
This commit is contained in:
Mark Friedrich
2018-03-30 12:47:55 +02:00
parent 240f2b27cd
commit 5b9f939137
7 changed files with 164 additions and 34 deletions

View File

@@ -25,6 +25,7 @@ class Controller {
const ERROR_SESSION_SUSPECT = 'id: [%45s], ip: [%45s], User-Agent: [%s]';
const ERROR_TEMP_CHARACTER_ID = 'Invalid temp characterId: %s';
const NOTIFICATION_TYPES = ['danger', 'warning', 'info', 'success'];
/**
* @var \Base
*/
@@ -542,6 +543,20 @@ class Controller {
return $object;
}
/**
* @param string $title
* @param string $message
* @param string $type
* @return \stdClass
*/
protected function getNotificationObject(string $title, $message = '', $type = 'danger') : \stdClass {
$notification = (object) [];
$notification->type = in_array($type, self::NOTIFICATION_TYPES) ? $type : 'danger';
$notification->title = $title;
$notification->message = $message;
return $notification;
}
/**
* get a program URL by alias
* -> if no $alias given -> get "default" route (index.php)