@@ -10,66 +10,66 @@ |
||
| 10 | 10 | |
| 11 | 11 | class SystemController extends Controller |
| 12 | 12 | { |
| 13 | - public function index() |
|
| 14 | - { |
|
| 15 | - return SystemCore::isInstalled()? redirect('home'): redirect('install'); |
|
| 16 | - } |
|
| 13 | + public function index() |
|
| 14 | + { |
|
| 15 | + return SystemCore::isInstalled()? redirect('home'): redirect('install'); |
|
| 16 | + } |
|
| 17 | 17 | |
| 18 | - public function install(Epesi $epesi) |
|
| 19 | - { |
|
| 20 | - // make sure the installation information is fresh |
|
| 21 | - ModuleManager::clearCache(); |
|
| 18 | + public function install(Epesi $epesi) |
|
| 19 | + { |
|
| 20 | + // make sure the installation information is fresh |
|
| 21 | + ModuleManager::clearCache(); |
|
| 22 | 22 | |
| 23 | - if (SystemCore::isInstalled()) return redirect('home'); |
|
| 23 | + if (SystemCore::isInstalled()) return redirect('home'); |
|
| 24 | 24 | |
| 25 | - $epesi->title = config('epesi.app.title') . ' > ' . __('Installation'); |
|
| 25 | + $epesi->title = config('epesi.app.title') . ' > ' . __('Installation'); |
|
| 26 | 26 | |
| 27 | - $epesi->initLayout('Centered'); |
|
| 27 | + $epesi->initLayout('Centered'); |
|
| 28 | 28 | |
| 29 | - $epesi->layout->set('logo', url('logo')); |
|
| 30 | - $epesi->layout->template->setHTML('copyright', config('epesi.app.copyright')); |
|
| 29 | + $epesi->layout->set('logo', url('logo')); |
|
| 30 | + $epesi->layout->template->setHTML('copyright', config('epesi.app.copyright')); |
|
| 31 | 31 | |
| 32 | - $epesi->add(new \Epesi\Core\System\SystemInstallWizard()); |
|
| 32 | + $epesi->add(new \Epesi\Core\System\SystemInstallWizard()); |
|
| 33 | 33 | |
| 34 | - return $epesi->response(); |
|
| 35 | - } |
|
| 34 | + return $epesi->response(); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - public function home() |
|
| 38 | - { |
|
| 39 | - return redirect(SystemCore::isInstalled()? \Epesi\Core\HomePage\HomePageSettings::getUserHomePagePath(): 'install'); |
|
| 40 | - } |
|
| 37 | + public function home() |
|
| 38 | + { |
|
| 39 | + return redirect(SystemCore::isInstalled()? \Epesi\Core\HomePage\HomePageSettings::getUserHomePagePath(): 'install'); |
|
| 40 | + } |
|
| 41 | 41 | |
| 42 | - public function logo() |
|
| 43 | - { |
|
| 44 | - $meta = \Epesi\Core\System\Logo\LogoSettings::getLogoMeta(); |
|
| 42 | + public function logo() |
|
| 43 | + { |
|
| 44 | + $meta = \Epesi\Core\System\Logo\LogoSettings::getLogoMeta(); |
|
| 45 | 45 | |
| 46 | - return response($meta['contents'], 200, ['Content-type' => $meta['mime']])->setMaxAge(604800)->setPublic(); |
|
| 47 | - } |
|
| 46 | + return response($meta['contents'], 200, ['Content-type' => $meta['mime']])->setMaxAge(604800)->setPublic(); |
|
| 47 | + } |
|
| 48 | 48 | |
| 49 | - public function view(Epesi $epesi, $module, $method = 'body', $args = []) |
|
| 50 | - { |
|
| 51 | - $epesi->initLayout(new LayoutView()); |
|
| 49 | + public function view(Epesi $epesi, $module, $method = 'body', $args = []) |
|
| 50 | + { |
|
| 51 | + $epesi->initLayout(new LayoutView()); |
|
| 52 | 52 | |
| 53 | - $alias = explode(':', $module); |
|
| 53 | + $alias = explode(':', $module); |
|
| 54 | 54 | |
| 55 | - $moduleAlias = $alias[0]; |
|
| 56 | - $viewAlias = $alias[1]?? null; |
|
| 55 | + $moduleAlias = $alias[0]; |
|
| 56 | + $viewAlias = $alias[1]?? null; |
|
| 57 | 57 | |
| 58 | - $view = null; |
|
| 59 | - if ($module = ModuleManager::getClass($moduleAlias, true)) { |
|
| 60 | - $viewClass = $module::view($viewAlias); |
|
| 58 | + $view = null; |
|
| 59 | + if ($module = ModuleManager::getClass($moduleAlias, true)) { |
|
| 60 | + $viewClass = $module::view($viewAlias); |
|
| 61 | 61 | |
| 62 | - if (class_exists($viewClass)) { |
|
| 63 | - $view = new $viewClass(); |
|
| 64 | - } |
|
| 65 | - } |
|
| 62 | + if (class_exists($viewClass)) { |
|
| 63 | + $view = new $viewClass(); |
|
| 64 | + } |
|
| 65 | + } |
|
| 66 | 66 | |
| 67 | - if (! $view) abort(404); |
|
| 67 | + if (! $view) abort(404); |
|
| 68 | 68 | |
| 69 | - $epesi->add($view)->displayModuleContent($method, $args); |
|
| 69 | + $epesi->add($view)->displayModuleContent($method, $args); |
|
| 70 | 70 | |
| 71 | - $epesi->setLocation($view->location()); |
|
| 71 | + $epesi->setLocation($view->location()); |
|
| 72 | 72 | |
| 73 | - return $epesi->response(); |
|
| 74 | - } |
|
| 73 | + return $epesi->response(); |
|
| 74 | + } |
|
| 75 | 75 | } |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | { |
| 13 | 13 | public function index() |
| 14 | 14 | { |
| 15 | - return SystemCore::isInstalled()? redirect('home'): redirect('install'); |
|
| 15 | + return SystemCore::isInstalled() ? redirect('home') : redirect('install'); |
|
| 16 | 16 | } |
| 17 | 17 | |
| 18 | 18 | public function install(Epesi $epesi) |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | |
| 37 | 37 | public function home() |
| 38 | 38 | { |
| 39 | - return redirect(SystemCore::isInstalled()? \Epesi\Core\HomePage\HomePageSettings::getUserHomePagePath(): 'install'); |
|
| 39 | + return redirect(SystemCore::isInstalled() ? \Epesi\Core\HomePage\HomePageSettings::getUserHomePagePath() : 'install'); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | public function logo() |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - if (! $view) abort(404); |
|
| 67 | + if (!$view) abort(404); |
|
| 68 | 68 | |
| 69 | 69 | $epesi->add($view)->displayModuleContent($method, $args); |
| 70 | 70 | |
@@ -20,7 +20,9 @@ discard block |
||
| 20 | 20 | // make sure the installation information is fresh |
| 21 | 21 | ModuleManager::clearCache(); |
| 22 | 22 | |
| 23 | - if (SystemCore::isInstalled()) return redirect('home'); |
|
| 23 | + if (SystemCore::isInstalled()) { |
|
| 24 | + return redirect('home'); |
|
| 25 | + } |
|
| 24 | 26 | |
| 25 | 27 | $epesi->title = config('epesi.app.title') . ' > ' . __('Installation'); |
| 26 | 28 | |
@@ -64,7 +66,9 @@ discard block |
||
| 64 | 66 | } |
| 65 | 67 | } |
| 66 | 68 | |
| 67 | - if (! $view) abort(404); |
|
| 69 | + if (! $view) { |
|
| 70 | + abort(404); |
|
| 71 | + } |
|
| 68 | 72 | |
| 69 | 73 | $epesi->add($view)->displayModuleContent($method, $args); |
| 70 | 74 | |