From bc3753a693850a92365ba788ab7be61da7ec850c Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Fri, 29 Aug 2014 15:05:58 +0300 Subject: [PATCH] Fix static call to Plugins and Themes objects --- admin.php | 2 +- classes/admin.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/admin.php b/admin.php index 3995ac07..190350e0 100644 --- a/admin.php +++ b/admin.php @@ -175,7 +175,7 @@ class AdminPlugin extends Plugin switch ($this->template) { case 'plugins': - $twig->twig_vars['plugins'] = \Grav\Common\Plugins::all(); + $twig->twig_vars['plugins'] = $this->grav['plugins']->all(); break; case 'pages': $twig->twig_vars['file'] = File\General::instance($this->admin->page(true)->filePath()); diff --git a/classes/admin.php b/classes/admin.php index f752c52d..75ec53f0 100644 --- a/classes/admin.php +++ b/classes/admin.php @@ -254,12 +254,12 @@ class Admin default: if (preg_match('|plugins/|', $type)) { - $obj = Plugins::get(preg_replace('|plugins/|', '', $type)); + $obj = $this->grav['plugins']->get(preg_replace('|plugins/|', '', $type)); $obj->merge($post); $data[$type] = $obj; } elseif (preg_match('|themes/|', $type)) { - $obj = Themes::get(preg_replace('|themes/|', '', $type)); + $obj = $this->grav['themes']->get(preg_replace('|themes/|', '', $type)); $obj->merge($post); $data[$type] = $obj;