From 5f9f42dc4bb09d85c0a64f3839711a37c3d78f10 Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Mon, 31 Aug 2015 14:25:16 +0930 Subject: [PATCH] Installer: Prevent crash when views directory is not writable Use plain PHP templates instead of Blade templates so there is nothing that needs to be written. closes #376 --- framework/core/src/Install/Actions/IndexAction.php | 2 -- .../core/views/install/{app.blade.php => app.php} | 4 ++-- framework/core/views/install/errors.blade.php | 14 -------------- framework/core/views/install/errors.php | 14 ++++++++++++++ .../install/{install.blade.php => install.php} | 2 +- .../core/views/install/{logo.php => logo.svg} | 2 +- 6 files changed, 18 insertions(+), 20 deletions(-) rename framework/core/views/install/{app.blade.php => app.php} (98%) delete mode 100644 framework/core/views/install/errors.blade.php create mode 100644 framework/core/views/install/errors.php rename framework/core/views/install/{install.blade.php => install.php} (97%) rename framework/core/views/install/{logo.php => logo.svg} (98%) diff --git a/framework/core/src/Install/Actions/IndexAction.php b/framework/core/src/Install/Actions/IndexAction.php index b567ad60a..c5ee8d993 100644 --- a/framework/core/src/Install/Actions/IndexAction.php +++ b/framework/core/src/Install/Actions/IndexAction.php @@ -38,8 +38,6 @@ class IndexAction extends HtmlAction { $view = $this->view->make('flarum.install::app'); - $view->logo = $this->view->make('flarum.install::logo'); - $errors = []; if (version_compare(PHP_VERSION, '5.5.0', '<')) { diff --git a/framework/core/views/install/app.blade.php b/framework/core/views/install/app.php similarity index 98% rename from framework/core/views/install/app.blade.php rename to framework/core/views/install/app.php index ce5033aef..0f57b6146 100644 --- a/framework/core/views/install/app.blade.php +++ b/framework/core/views/install/app.php @@ -162,11 +162,11 @@

- {!! $logo !!} +

- {!! $content !!} +
diff --git a/framework/core/views/install/errors.blade.php b/framework/core/views/install/errors.blade.php deleted file mode 100644 index 3317fa3ff..000000000 --- a/framework/core/views/install/errors.blade.php +++ /dev/null @@ -1,14 +0,0 @@ -

Hold Up!

- -

These errors must be resolved before you can continue the installation. If you're having trouble, get help on the Flarum website.

- -
- @foreach ($errors as $error) -
-

{!! $error['message'] !!}

- @if (! empty($error['detail'])) -

{!! $error['detail'] !!}

- @endif -
- @endforeach -
diff --git a/framework/core/views/install/errors.php b/framework/core/views/install/errors.php new file mode 100644 index 000000000..87a5e0d04 --- /dev/null +++ b/framework/core/views/install/errors.php @@ -0,0 +1,14 @@ +

Hold Up!

+ +

These errors must be resolved before you can continue the installation. If you're having trouble, get help on the Flarum website.

+ +
+ +
+

+ +

+ +
+ +
diff --git a/framework/core/views/install/install.blade.php b/framework/core/views/install/install.php similarity index 97% rename from framework/core/views/install/install.blade.php rename to framework/core/views/install/install.php index 34b5ad644..582286427 100644 --- a/framework/core/views/install/install.blade.php +++ b/framework/core/views/install/install.php @@ -1,6 +1,6 @@

Install Flarum

-

Set up your forum by filling out your details below. If you have any trouble, get help on the Flarum website.

+

Set up your forum by filling out your details below. If you have any trouble, get help on the Flarum website.

diff --git a/framework/core/views/install/logo.php b/framework/core/views/install/logo.svg similarity index 98% rename from framework/core/views/install/logo.php rename to framework/core/views/install/logo.svg index a1efd4cf6..4669a52b3 100644 --- a/framework/core/views/install/logo.php +++ b/framework/core/views/install/logo.svg @@ -1,4 +1,4 @@ -'; ?> + Bottom + Top