change location of install.lock, change strings

This commit is contained in:
1Day 2022-01-26 12:48:32 +01:00
parent f7c777596e
commit 3d9e463b72
5 changed files with 11 additions and 9 deletions

View file

@ -51,7 +51,7 @@ class AppServiceProvider extends ServiceProvider
}); });
//only run if the installer has been executed //only run if the installer has been executed
if (file_exists(public_path()."/install/install.lock")) { if (file_exists(base_path()."/install.lock")) {
$settings = Settings::all(); $settings = Settings::all();
// Set all configs from database // Set all configs from database
foreach ($settings as $setting) { foreach ($settings as $setting) {

1
install.lock Normal file
View file

@ -0,0 +1 @@
locked

View file

@ -1,7 +1,7 @@
<?php <?php
include("functions.php"); include("functions.php");
if (file_exists("install.lock")) { if (file_exists("../../install.lock")) {
die("The installation has been completed already. Please delete the File 'install.lock' to re-run"); die("The installation has been completed already. Please delete the File 'install.lock' to re-run");
} }
?> ?>
@ -449,7 +449,7 @@ echo $cardheader;
<?php <?php
} }
if (isset($_GET['step']) && $_GET['step'] == 7) { if (isset($_GET['step']) && $_GET['step'] == 7) {
$lockfile = fopen("install.lock", "w") or die("Unable to open file!"); $lockfile = fopen("../../install.lock", "w") or die("Unable to open file!");
fwrite($lockfile, "locked"); fwrite($lockfile, "locked");
fclose($lockfile); fclose($lockfile);

View file

@ -19,11 +19,12 @@
</div> </div>
</section> </section>
<!-- END CONTENT HEADER --> <!-- END CONTENT HEADER -->
@if(!file_exists(public_path()."/install/install.lock")) @if(!file_exists(base_path()."/install.lock"))
<div class="callout callout-danger"> <div class="callout callout-danger">
<h4>{{ __('The installer is not locked!') }}</h4> <h4>{{ __('The installer is not locked!') }}</h4>
<p>{{ __('please create a file called "install.lock" in your "dashboard/public/installer" directory!') }}</p> <p>{{ __('please create a file called "install.lock" in your dashboard Root directory. Otherwise no settings will be loaded!') }}</p>
<p>{{ __('otherwise no settings will be loaded!') }}</p> <a href="/install?step=7"><button class="btn btn-outline-danger">{{__('or click here')}}</button></a>
</div> </div>
@endif @endif
<!-- MAIN CONTENT --> <!-- MAIN CONTENT -->

View file

@ -18,11 +18,11 @@
</section> </section>
<!-- END CONTENT HEADER --> <!-- END CONTENT HEADER -->
@if(!file_exists(public_path()."/install/install.lock") && Auth::User()->role == "admin") @if(!file_exists(base_path()."/install.lock") && Auth::User()->role == "admin")
<div class="callout callout-danger"> <div class="callout callout-danger">
<h4>{{ __('The installer is not locked!') }}</h4> <h4>{{ __('The installer is not locked!') }}</h4>
<p>{{ __('please create a file called "install.lock" in your "dashboard/public/installer" directory!') }}</p> <p>{{ __('please create a file called "install.lock" in your dashboard Root directory. Otherwise no settings will be loaded!') }}</p>
<p>{{ __('otherwise no settings will be loaded!') }}</p> <a href="/install?step=7"><button class="btn btn-outline-danger">{{__('or click here')}}</button></a>
</div> </div>
@endif @endif