Fix static call to Plugins and Themes objects

This commit is contained in:
Matias Griese
2014-08-29 15:05:58 +03:00
parent 8241d8fe41
commit bc3753a693
2 changed files with 3 additions and 3 deletions

View File

@@ -175,7 +175,7 @@ class AdminPlugin extends Plugin
switch ($this->template) { switch ($this->template) {
case 'plugins': case 'plugins':
$twig->twig_vars['plugins'] = \Grav\Common\Plugins::all(); $twig->twig_vars['plugins'] = $this->grav['plugins']->all();
break; break;
case 'pages': case 'pages':
$twig->twig_vars['file'] = File\General::instance($this->admin->page(true)->filePath()); $twig->twig_vars['file'] = File\General::instance($this->admin->page(true)->filePath());

View File

@@ -254,12 +254,12 @@ class Admin
default: default:
if (preg_match('|plugins/|', $type)) { if (preg_match('|plugins/|', $type)) {
$obj = Plugins::get(preg_replace('|plugins/|', '', $type)); $obj = $this->grav['plugins']->get(preg_replace('|plugins/|', '', $type));
$obj->merge($post); $obj->merge($post);
$data[$type] = $obj; $data[$type] = $obj;
} elseif (preg_match('|themes/|', $type)) { } elseif (preg_match('|themes/|', $type)) {
$obj = Themes::get(preg_replace('|themes/|', '', $type)); $obj = $this->grav['themes']->get(preg_replace('|themes/|', '', $type));
$obj->merge($post); $obj->merge($post);
$data[$type] = $obj; $data[$type] = $obj;