1
0
Fork 0

Refactor Installer due new BaseURL logic

This commit is contained in:
Philipp Holzer 2023-02-18 20:43:49 +01:00
commit dbb7022ca5
Signed by: nupplaPhil
GPG key ID: 24A7501396EB5432
8 changed files with 39 additions and 75 deletions

View 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>

View 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>

View 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>

View 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>

View 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}}

View 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}}',
],
];