Sfoglia il codice sorgente

change location of install.lock, change strings

1Day 3 anni fa
parent
commit
3d9e463b72

+ 1 - 1
app/Providers/AppServiceProvider.php

@@ -51,7 +51,7 @@ class AppServiceProvider extends ServiceProvider
         });
 
         //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();
             // Set all configs from database
             foreach ($settings as $setting) {

+ 1 - 0
install.lock

@@ -0,0 +1 @@
+locked

+ 2 - 2
public/install/index.php

@@ -1,7 +1,7 @@
 <?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");
 }
 ?>
@@ -449,7 +449,7 @@ echo $cardheader;
                         <?php
                         }
                         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");
                             fclose($lockfile);
 

+ 4 - 3
resources/views/admin/settings/index.blade.php

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

+ 3 - 3
resources/views/home.blade.php

@@ -18,11 +18,11 @@
     </section>
     <!-- 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">
             <h4>{{ __('The installer is not locked!') }}</h4>
-            <p>{{ __('please create a file called "install.lock" in your "dashboard/public/installer" directory!') }}</p>
-            <p>{{ __('otherwise no settings will be loaded!') }}</p>
+            <p>{{ __('please create a file called "install.lock" in your dashboard Root directory. Otherwise no settings will be loaded!') }}</p>
+            <a href="/install?step=7"><button class="btn btn-outline-danger">{{__('or click here')}}</button></a>
 
         </div>
     @endif