Pass theme flag into Installer::install() so it knows to use copyInstall()

This commit is contained in:
Andy Miller
2015-09-15 16:07:05 -06:00
parent 92614fc2ed
commit 36e741bc7a
2 changed files with 7 additions and 4 deletions

View File

@@ -779,7 +779,7 @@ class AdminController
$package = $this->route;
$result = \Grav\Plugin\Admin\Gpm::install($package, []);
$result = \Grav\Plugin\Admin\Gpm::install($package, ['theme' => ($type == 'themes')]);
if ($result) {
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.INSTALLATION_SUCCESSFUL'), 'info');
@@ -828,6 +828,8 @@ class AdminController
$package = $this->route;
$permissions = [];
$type = $this->view === 'plugins' ? 'plugins' : 'themes';
// Update multi mode
if (!$package) {
$package = [];
@@ -849,7 +851,7 @@ class AdminController
}
}
$result = \Grav\Plugin\Admin\Gpm::update($package, []);
$result = \Grav\Plugin\Admin\Gpm::update($package, ['theme' => ($type == 'themes')]);
if ($this->view === 'update') {