Refactor Installer due new BaseURL logic
This commit is contained in:
parent
96e12be26b
commit
dbb7022ca5
8 changed files with 39 additions and 75 deletions
41
view/templates/install/01_checks.tpl
Normal file
41
view/templates/install/01_checks.tpl
Normal file
|
@ -0,0 +1,41 @@
|
|||
|
||||
<h1><img width="32" height="32" src="{{$baseurl}}/images/friendica.svg"> {{$title}}</h1>
|
||||
<h2>{{$pass}}</h2>
|
||||
<form action="{{$baseurl}}/install" method="post">
|
||||
<table>
|
||||
{{foreach $checks as $check}}
|
||||
<tr><td>{{$check.title nofilter}} </td><td>
|
||||
{{if $check.status}}
|
||||
<img src="{{$baseurl}}/view/install/green.png" alt="{{$ok}}">
|
||||
{{else}}
|
||||
{{if $check.required}}
|
||||
<img src="{{$baseurl}}/view/install/red.png" alt="{{$requirement_not_satisfied}}">
|
||||
{{else}}
|
||||
<img src="{{$baseurl}}/view/install/yellow.png" alt="{{$optional_requirement_not_satisfied}}">
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</td><td>{{if $check.required}}{{$required}}{{/if}}</td></tr>
|
||||
{{if $check.help}}
|
||||
<tr><td class="help" colspan="3">
|
||||
<blockquote>{{$check.help nofilter}}</blockquote>
|
||||
{{if $check.error_msg}}
|
||||
<div class="error_header"><b>{{$check.error_msg.head}}<br><a href="{{$check.error_msg.url}}">{{$check.error_msg.url}}</a></b></div>
|
||||
<blockquote>{{$check.error_msg.msg}}</blockquote>
|
||||
{{/if}}
|
||||
</td></tr>
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
</table>
|
||||
|
||||
{{if $phpath}}
|
||||
<input type="hidden" name="config-php_path" value="{{$php_path}}">
|
||||
{{/if}}
|
||||
|
||||
{{if $passed}}
|
||||
<input type="hidden" name="pass" value="2">
|
||||
<input type="submit" value="{{$next}}">
|
||||
{{else}}
|
||||
<input type="hidden" name="pass" value="1">
|
||||
<input type="submit" value="{{$reload}}">
|
||||
{{/if}}
|
||||
</form>
|
21
view/templates/install/02_base_config.tpl
Normal file
21
view/templates/install/02_base_config.tpl
Normal file
|
@ -0,0 +1,21 @@
|
|||
<h1><img width="32" height="32" src="{{$baseurl}}/images/friendica.svg"> {{$title}}</h1>
|
||||
<h2>{{$pass}}</h2>
|
||||
|
||||
<p>
|
||||
{{$info_01}}<br>
|
||||
{{$info_02}}<br>
|
||||
{{$info_03}}
|
||||
</p>
|
||||
|
||||
<form id="install-form" action="{{$baseurl}}/install" method="post">
|
||||
|
||||
<input type="hidden" name="config-php_path" value="{{$php_path}}" />
|
||||
<input type="hidden" name="pass" value="3" />
|
||||
|
||||
{{include file="field_input.tpl" field=$basepath}}
|
||||
<br />
|
||||
{{include file="field_input.tpl" field=$system_url}}
|
||||
|
||||
<input id="install-submit" type="submit" name="submit" value="{{$submit}}" />
|
||||
|
||||
</form>
|
36
view/templates/install/03_database_config.tpl
Normal file
36
view/templates/install/03_database_config.tpl
Normal file
|
@ -0,0 +1,36 @@
|
|||
<h1><img width="32" height="32" src="{{$baseurl}}/images/friendica.svg"> {{$title}}</h1>
|
||||
<h2>{{$pass}}</h2>
|
||||
|
||||
<p>
|
||||
{{$info_01}}<br>
|
||||
{{$info_02}}<br>
|
||||
{{$info_03}}
|
||||
</p>
|
||||
|
||||
<table>
|
||||
{{foreach $checks as $check}}
|
||||
<tr>
|
||||
<td>{{$check.title}} </td>
|
||||
<td>
|
||||
{{if ! $check.status}}
|
||||
<img src="{{$baseurl}}/view/install/red.png" alt="{{$requirement_not_satisfied}}">
|
||||
{{/if}}
|
||||
</td>
|
||||
{{/foreach}}
|
||||
</table>
|
||||
|
||||
<form id="install-form" action="{{$baseurl}}/install" method="post">
|
||||
|
||||
<input type="hidden" name="config-php_path" value="{{$php_path}}" />
|
||||
<input type="hidden" name="system-basepath" value="{{$basepath}}" />
|
||||
<input type="hidden" name="system-url" value="{{$system_url}}" />
|
||||
<input type="hidden" name="pass" value="4" />
|
||||
|
||||
{{include file="field_input.tpl" field=$dbhost}}
|
||||
{{include file="field_input.tpl" field=$dbuser}}
|
||||
{{include file="field_password.tpl" field=$dbpass}}
|
||||
{{include file="field_input.tpl" field=$dbdata}}
|
||||
|
||||
<input id="install-submit" type="submit" name="submit" value="{{$submit}}" />
|
||||
|
||||
</form>
|
25
view/templates/install/04_site_settings.tpl
Normal file
25
view/templates/install/04_site_settings.tpl
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
|
||||
<h1><img width="32" height="32" src="{{$baseurl}}/images/friendica.svg"> {{$title}}</h1>
|
||||
<h2>{{$pass}}</h2>
|
||||
|
||||
|
||||
<form id="install-form" action="{{$baseurl}}/install" method="post">
|
||||
|
||||
<input type="hidden" name="config-php_path" value="{{$php_path}}" />
|
||||
<input type="hidden" name="system-basepath" value="{{$basepath}}" />
|
||||
<input type="hidden" name="system-url" value="{{$system_url}}" />
|
||||
<input type="hidden" name="database-hostname" value="{{$dbhost}}" />
|
||||
<input type="hidden" name="database-username" value="{{$dbuser}}" />
|
||||
<input type="hidden" name="database-password" value="{{$dbpass}}" />
|
||||
<input type="hidden" name="database-database" value="{{$dbdata}}" />
|
||||
<input type="hidden" name="pass" value="5" />
|
||||
|
||||
{{include file="field_input.tpl" field=$adminmail}} <br />
|
||||
{{$timezone nofilter}} <br />
|
||||
{{include file="field_select.tpl" field=$language}}
|
||||
|
||||
<input id="install-submit" type="submit" name="submit" value="{{$submit}}" />
|
||||
|
||||
</form>
|
||||
|
10
view/templates/install/05_finished.tpl
Normal file
10
view/templates/install/05_finished.tpl
Normal file
|
@ -0,0 +1,10 @@
|
|||
<h1><img width="32" height="32" src="{{$baseurl}}/images/friendica.svg"> {{$title}}</h1>
|
||||
<h2>{{$pass}}</h2>
|
||||
|
||||
{{foreach $checks as $check}}
|
||||
<img src="{{$baseurl}}/view/install/red.png" alt="{{$requirement_not_satisfied}}">
|
||||
{{$check.title nofilter}}
|
||||
<textarea rows="24" cols="80">{{$check.help nofilter}}</textarea>
|
||||
{{/foreach}}
|
||||
|
||||
{{$text nofilter}}
|
36
view/templates/install/local.config.tpl
Normal file
36
view/templates/install/local.config.tpl
Normal file
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
|
||||
// Local configuration
|
||||
|
||||
// If you're unsure about what any of the config keys below do, please check the static/defaults.config.php for detailed
|
||||
// documentation of their data type and behavior.
|
||||
|
||||
return [
|
||||
'database' => [
|
||||
'hostname' => '{{$dbhost|escape:'quotes' nofilter}}',
|
||||
'username' => '{{$dbuser|escape:'quotes' nofilter}}',
|
||||
'password' => '{{$dbpass|escape:'quotes' nofilter}}',
|
||||
'database' => '{{$dbdata|escape:'quotes' nofilter}}',
|
||||
'charset' => 'utf8mb4',
|
||||
],
|
||||
|
||||
// ****************************************************************
|
||||
// The configuration below will be overruled by the admin panel.
|
||||
// Changes made below will only have an effect if the database does
|
||||
// not contain any configuration for the friendica system.
|
||||
// ****************************************************************
|
||||
|
||||
'config' => [
|
||||
'php_path' => '{{$phpath|escape:'quotes' nofilter}}',
|
||||
'admin_email' => '{{$adminmail|escape:'quotes' nofilter}}',
|
||||
'sitename' => 'Friendica Social Network',
|
||||
'register_policy' => \Friendica\Module\Register::OPEN,
|
||||
'max_import_size' => 200000,
|
||||
],
|
||||
'system' => [
|
||||
'url' => '{{$system_url|escape:'quotes' nofilter}}',
|
||||
'basepath' => '{{$basepath|escape:'quotes' nofilter}}',
|
||||
'default_timezone' => '{{$timezone|escape:'quotes' nofilter}}',
|
||||
'language' => '{{$language|escape:'quotes' nofilter}}',
|
||||
],
|
||||
];
|
Loading…
Add table
Add a link
Reference in a new issue