Move theme determination after full module run

This commit is contained in:
Hypolite Petovan
2019-10-06 11:18:51 -04:00
parent cb4950a3be
commit 4a5dfefacc
3 changed files with 20 additions and 17 deletions

View File

@@ -587,7 +587,11 @@ class App
*
* This probably should change to limit the size of this monster method.
*
* @param App\Module $module The determined module
* @param App\Module $module The determined module
* @param App\Router $router
* @param PConfiguration $pconfig
* @throws HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
public function runFrontend(App\Module $module, App\Router $router, PConfiguration $pconfig)
{
@@ -733,8 +737,7 @@ class App
$module = $module->determineClass($this->args, $router, $this->config);
// Let the module run it's internal process (init, get, post, ...)
$module->run($this->l10n, $this, $this->logger, $this->getCurrentTheme(), $_SERVER, $_POST);
$module->run($this->l10n, $this, $this->logger, $_SERVER, $_POST);
} catch (HTTPException $e) {
ModuleHTTPException::rawContent($e);
}