Merge "Throw exception in importDump instead of dumping a random backtrace and erroring"
[lhc/web/wiklou.git] / includes / templates / NoLocalSettings.php
index 3f49ed3..33b2400 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+// @codingStandardsIgnoreFile
 /**
  * Template used when there is no LocalSettings.php file.
  *
@@ -75,16 +76,21 @@ if ( !function_exists( 'session_name' ) ) {
 
                <h1>MediaWiki <?php echo htmlspecialchars( $wgVersion ) ?></h1>
                <div class='error'>
-               <p>LocalSettings.php not found.</p>
-               <p>
-               <?php
-               if ( $installerStarted ) {
-                       echo "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> complete the installation</a> and download LocalSettings.php.";
-               } else {
-                       echo "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> set up the wiki</a> first.";
-               }
-               ?>
-               </p>
+               <?php if ( !file_exists( MW_CONFIG_FILE ) ) { ?>
+                       <p>LocalSettings.php not found.</p>
+                       <p>
+                       <?php
+                       if ( $installerStarted ) {
+                               echo "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> complete the installation</a> and download LocalSettings.php.";
+                       } else {
+                               echo "Please <a href=\"" . htmlspecialchars( $path ) . "mw-config/index." . htmlspecialchars( $ext ) . "\"> set up the wiki</a> first.";
+                       }
+                       ?>
+                       </p>
+               <?php } else { ?>
+                       <p>LocalSettings.php not readable.</p>
+                       <p>Please correct file permissions and try again.</p>
+               <?php } ?>
 
                </div>
        </body>