Fixes https://github.com/getgrav/grav/issues/476, replace default themes service with admin own theme service to avoid loading the default theme

This commit is contained in:
Flavio Copes
2015-11-25 18:31:25 +01:00
parent df6c589806
commit 970d77219e
2 changed files with 24 additions and 0 deletions

View File

@@ -111,6 +111,12 @@ class AdminPlugin extends Plugin
// Disable Asset pipelining
$this->config->set('system.assets.css_pipeline', false);
$this->config->set('system.assets.js_pipeline', false);
// Replace themes service with admin.
$this->grav['themes'] = function ($c) {
require_once __DIR__ . '/classes/themes.php';
return new Themes($this->grav);
};
}
// We need popularity no matter what