Explorar el Código

Better message in installation process

Laurent Destailleur hace 3 años
padre
commit
6b9ed5aa32
Se han modificado 3 ficheros con 17 adiciones y 1 borrados
  1. 7 0
      htdocs/filefunc.inc.php
  2. 9 1
      htdocs/install/index.php
  3. 1 0
      htdocs/langs/en_US/install.lang

+ 7 - 0
htdocs/filefunc.inc.php

@@ -115,6 +115,13 @@ if (!$result && !empty($_SERVER["GATEWAY_INTERFACE"])) {    // If install not do
 	}
 
 	header("Location: ".$path."install/index.php");
+
+	/*
+	print '<br><center>';
+	print 'The conf/conf.php file was not found or is not readable by the web server. If this is your first access, <a href="'.$path.'install/index.php">click here to start the Dolibarr installation process</a> to create it...';
+	print '</center><br>';
+	*/
+
 	exit;
 }
 

+ 9 - 1
htdocs/install/index.php

@@ -49,6 +49,12 @@ $formadmin = new FormAdmin(''); // Note: $db does not exist yet but we don't nee
 pHeader("", "check"); // Next step = check
 
 
+if (!is_readable($conffile)) {
+	print '<br>';
+	print '<span class="opacitymedium">'.$langs->trans("NoReadableConfFileSoStartInstall").'</span>';
+}
+
+
 // Ask installation language
 print '<br><br><div class="center">';
 print '<table>';
@@ -61,7 +67,9 @@ print '</tr>';
 
 print '</table></div>';
 
-print '<br><br><span class="opacitymedium">'.$langs->trans("SomeTranslationAreUncomplete").'</span>';
+
+
+//print '<br><br><span class="opacitymedium">'.$langs->trans("SomeTranslationAreUncomplete").'</span>';
 
 // If there's no error, we display the next step button
 if ($err == 0) {

+ 1 - 0
htdocs/langs/en_US/install.lang

@@ -8,6 +8,7 @@ ConfFileIsNotWritable=Configuration file <b>%s</b> is not writable. Check permis
 ConfFileIsWritable=Configuration file <b>%s</b> is writable.
 ConfFileMustBeAFileNotADir=Configuration file <b>%s</b> must be a file, not a directory.
 ConfFileReload=Reloading parameters from configuration file.
+NoReadableConfFileSoStartInstall=The configuration file <b>conf/conf.php</b> does not exists or is not reabable. We will run the installation process to try to initialize it.
 PHPSupportPOSTGETOk=This PHP supports variables POST and GET.
 PHPSupportPOSTGETKo=It's possible your PHP setup does not support variables POST and/or GET. Check the parameter <b>variables_order</b> in php.ini.
 PHPSupportSessions=This PHP supports sessions.