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
This commit is contained in:
Toby Zerner 2015-08-31 14:25:16 +09:30
parent e49ffeea35
commit 5f9f42dc4b
6 changed files with 18 additions and 20 deletions

View File

@ -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', '<')) {

View File

@ -162,11 +162,11 @@
<body>
<div class="container">
<h1>
{!! $logo !!}
<?php include 'logo.svg'; ?>
</h1>
<div class="animated fadeIn">
{!! $content !!}
<?php echo $content; ?>
</div>
</div>
</body>

View File

@ -1,14 +0,0 @@
<h2>Hold Up!</h2>
<p>These errors must be resolved before you can continue the installation. If you're having trouble, get help on the <a href="http://flarum.org/docs/troubleshooting" target="_blank">Flarum website</a>.</p>
<div class="Errors">
@foreach ($errors as $error)
<div class="Error">
<h3 class="Error-message">{!! $error['message'] !!}</h3>
@if (! empty($error['detail']))
<p class="Error-detail">{!! $error['detail'] !!}</p>
@endif
</div>
@endforeach
</div>

View File

@ -0,0 +1,14 @@
<h2>Hold Up!</h2>
<p>These errors must be resolved before you can continue the installation. If you're having trouble, get help on the <a href="http://flarum.org/docs/installation" target="_blank">Flarum website</a>.</p>
<div class="Errors">
<?php foreach ($errors as $error): ?>
<div class="Error">
<h3 class="Error-message"><?php echo $error['message']; ?></h3>
<?php if (! empty($error['detail'])): ?>
<p class="Error-detail"><?php echo $error['detail']; ?></p>
<?php endif; ?>
</div>
<?php endforeach; ?>
</div>

View File

@ -1,6 +1,6 @@
<h2>Install Flarum</h2>
<p>Set up your forum by filling out your details below. If you have any trouble, get help on the <a href="http://flarum.org/docs/troubleshooting" target="_blank">Flarum website</a>.</p>
<p>Set up your forum by filling out your details below. If you have any trouble, get help on the <a href="http://flarum.org/docs/installation" target="_blank">Flarum website</a>.</p>
<form>
<div id="error" style="display:none"></div>

View File

@ -1,4 +1,4 @@
<?php echo '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'; ?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg width="300px" height="80px" viewBox="0 0 300 80" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
<!-- Generator: Sketch 3.3 (11970) - http://www.bohemiancoding.com/sketch -->
<title>Bottom + Top</title>

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB