mirror of
https://github.com/flarum/framework.git
synced 2025-04-25 14:14:03 +08:00
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:
parent
c72bdc8238
commit
5e22458014
@ -38,8 +38,6 @@ class IndexAction extends HtmlAction
|
|||||||
{
|
{
|
||||||
$view = $this->view->make('flarum.install::app');
|
$view = $this->view->make('flarum.install::app');
|
||||||
|
|
||||||
$view->logo = $this->view->make('flarum.install::logo');
|
|
||||||
|
|
||||||
$errors = [];
|
$errors = [];
|
||||||
|
|
||||||
if (version_compare(PHP_VERSION, '5.5.0', '<')) {
|
if (version_compare(PHP_VERSION, '5.5.0', '<')) {
|
||||||
|
@ -162,11 +162,11 @@
|
|||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<h1>
|
<h1>
|
||||||
{!! $logo !!}
|
<?php include 'logo.svg'; ?>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="animated fadeIn">
|
<div class="animated fadeIn">
|
||||||
{!! $content !!}
|
<?php echo $content; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
@ -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>
|
|
14
views/install/errors.php
Normal file
14
views/install/errors.php
Normal 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>
|
@ -1,6 +1,6 @@
|
|||||||
<h2>Install Flarum</h2>
|
<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>
|
<form>
|
||||||
<div id="error" style="display:none"></div>
|
<div id="error" style="display:none"></div>
|
@ -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">
|
<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 -->
|
<!-- Generator: Sketch 3.3 (11970) - http://www.bohemiancoding.com/sketch -->
|
||||||
<title>Bottom + Top</title>
|
<title>Bottom + Top</title>
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
Loading…
x
Reference in New Issue
Block a user