Add a message if installed on Grav < 1.1.0-beta.1

This commit is contained in:
Flavio Copes
2016-04-26 18:53:13 +02:00
parent ed6c4dd481
commit c56c2103aa
2 changed files with 6 additions and 0 deletions

View File

@@ -243,6 +243,11 @@ class AdminPlugin extends Plugin
// Only activate admin if we're inside the admin path.
if ($this->active) {
if (version_compare(GRAV_VERSION, '1.1.0-beta.1', '<')) {
$messages = $this->grav['messages'];
$messages->add($this->grav['language']->translate('PLUGIN_ADMIN.NEEDS_GRAV_1_1'), 'error');
}
// Have a unique Admin-only Cache key
if (method_exists($this->grav['cache'], 'setKey')){
$cache = $this->grav['cache'];