Merge pull request #375 from 1day2die/development

change location of install.lock, change strings
This commit is contained in:
Dennis 2022-01-26 12:49:02 +01:00 committed by GitHub
commit 9eb470abfe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 10 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) {

View file

@ -4,7 +4,7 @@ use App\Models\Settings;
return [ return [
'version' => '0.6.2', 'version' => '0.7',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Name | Application Name

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