mirror of
https://github.com/flarum/framework.git
synced 2024-12-04 00:03:37 +08:00
fixes #800, forgot these controllers
This commit is contained in:
parent
5179d2eb52
commit
ef83a4681b
|
@ -37,7 +37,9 @@ class UninstallExtensionController extends AbstractDeleteController
|
||||||
|
|
||||||
$name = array_get($request->getQueryParams(), 'name');
|
$name = array_get($request->getQueryParams(), 'name');
|
||||||
|
|
||||||
$this->extensions->disable($name);
|
$extension = $this->extensions->getExtension($name);
|
||||||
$this->extensions->uninstall($name);
|
|
||||||
|
$this->extensions->disable($extension);
|
||||||
|
$this->extensions->uninstall($extension);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,10 +42,12 @@ class UpdateExtensionController implements ControllerInterface
|
||||||
$enabled = array_get($request->getParsedBody(), 'enabled');
|
$enabled = array_get($request->getParsedBody(), 'enabled');
|
||||||
$name = array_get($request->getQueryParams(), 'name');
|
$name = array_get($request->getQueryParams(), 'name');
|
||||||
|
|
||||||
|
$extension = $this->extensions->getExtension($name);
|
||||||
|
|
||||||
if ($enabled === true) {
|
if ($enabled === true) {
|
||||||
$this->extensions->enable($name);
|
$this->extensions->enable($extension);
|
||||||
} elseif ($enabled === false) {
|
} elseif ($enabled === false) {
|
||||||
$this->extensions->disable($name);
|
$this->extensions->disable($extension);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user