Minor changes for installer
This commit is contained in:
parent
18c3dff627
commit
f8f532c9b4
@ -9,4 +9,5 @@ $force_install_databasepass='WAMPMYSQLNEWPASSWORD';
|
|||||||
$force_install_databaserootlogin='root';
|
$force_install_databaserootlogin='root';
|
||||||
$force_install_databaserootpass='WAMPMYSQLNEWPASSWORD';
|
$force_install_databaserootpass='WAMPMYSQLNEWPASSWORD';
|
||||||
$force_install_dolibarrlogin='admin';
|
$force_install_dolibarrlogin='admin';
|
||||||
|
$force_install_renamedir='1';
|
||||||
?>
|
?>
|
||||||
@ -35,6 +35,19 @@ $langs->load("install");
|
|||||||
|
|
||||||
$success=0;
|
$success=0;
|
||||||
|
|
||||||
|
// Init "forced values" to nothing. "forced values" are used after an doliwamp install wizard.
|
||||||
|
if (! isset($force_install_type)) $force_install_type='';
|
||||||
|
if (! isset($force_install_port)) $force_install_port='';
|
||||||
|
if (! isset($force_install_database)) $force_install_database='';
|
||||||
|
if (! isset($force_install_createdatabase)) $force_install_createdatabase='';
|
||||||
|
if (! isset($force_install_databaselogin)) $force_install_databaselogin='';
|
||||||
|
if (! isset($force_install_databasepass)) $force_install_databasepass='';
|
||||||
|
if (! isset($force_install_databaserootlogin)) $force_install_databaserootlogin='';
|
||||||
|
if (! isset($force_install_databaserootpass)) $force_install_databaserootpass='';
|
||||||
|
if (! isset($force_install_renamedir)) $force_install_renamedir='';
|
||||||
|
if (file_exists("./install.forced.php")) include_once("./install.forced.php");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dolibarr_install_syslog("etape5: Entering etape5.php page", LOG_INFO);
|
dolibarr_install_syslog("etape5: Entering etape5.php page", LOG_INFO);
|
||||||
|
|
||||||
@ -176,7 +189,17 @@ if ($_POST["action"] == "set")
|
|||||||
{
|
{
|
||||||
// Fin install
|
// Fin install
|
||||||
print $langs->trans("SystemIsInstalled")."<br>";
|
print $langs->trans("SystemIsInstalled")."<br>";
|
||||||
print '<div class="warning">'.$langs->trans("WarningRemoveInstallDir")."</div>";
|
if (empty($force_install_renamedir))
|
||||||
|
{
|
||||||
|
print '<div class="warning">'.$langs->trans("WarningRemoveInstallDir")."</div>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Open the file and erase the contents if any
|
||||||
|
$fp = fopen("../../install.lock", "w");
|
||||||
|
fwrite($fp, "This is a lock file to prevent use of install pages");
|
||||||
|
fclose($fp);
|
||||||
|
}
|
||||||
|
|
||||||
print "<br>";
|
print "<br>";
|
||||||
|
|
||||||
@ -188,7 +211,17 @@ if ($_POST["action"] == "upgrade")
|
|||||||
{
|
{
|
||||||
// Fin install
|
// Fin install
|
||||||
print $langs->trans("SystemIsUpgraded")."<br>";
|
print $langs->trans("SystemIsUpgraded")."<br>";
|
||||||
print '<div class="warning">'.$langs->trans("WarningRemoveInstallDir")."</div>";
|
if (empty($force_install_renamedir))
|
||||||
|
{
|
||||||
|
print '<div class="warning">'.$langs->trans("WarningRemoveInstallDir")."</div>";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Open the file and erase the contents if any
|
||||||
|
$fp = fopen("../../install.lock", "w");
|
||||||
|
fwrite($fp, "This is a lock file to prevent use of install pages");
|
||||||
|
fclose($fp);
|
||||||
|
}
|
||||||
|
|
||||||
print "<br>";
|
print "<br>";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -30,13 +30,6 @@ require_once('../lib/admin.lib.php');
|
|||||||
|
|
||||||
// DOL_DOCUMENT_ROOT has been defined in function.inc.php to '..'
|
// DOL_DOCUMENT_ROOT has been defined in function.inc.php to '..'
|
||||||
|
|
||||||
// Security check
|
|
||||||
if (eregi('install.norun',$_SERVER["SCRIPT_FILENAME"]))
|
|
||||||
{
|
|
||||||
dolibarr_print_error('','Install pages have been disabled for security reason.');
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Correction PHP_SELF (ex pour apache via caudium) car PHP_SELF doit valoir URL relative
|
// Correction PHP_SELF (ex pour apache via caudium) car PHP_SELF doit valoir URL relative
|
||||||
// et non path absolu.
|
// et non path absolu.
|
||||||
if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
|
if (isset($_SERVER["DOCUMENT_URI"]) && $_SERVER["DOCUMENT_URI"])
|
||||||
@ -114,7 +107,24 @@ define('DOL_DATA_ROOT',(isset($dolibarr_main_data_root)?$dolibarr_main_data_root
|
|||||||
if (! isset($conf->character_set_client)) $conf->character_set_client='iso-8859-1';
|
if (! isset($conf->character_set_client)) $conf->character_set_client='iso-8859-1';
|
||||||
if (! isset($conf->db->dolibarr_main_db_collation)) $conf->db->dolibarr_main_db_collation='latin1_swedish_ci';
|
if (! isset($conf->db->dolibarr_main_db_collation)) $conf->db->dolibarr_main_db_collation='latin1_swedish_ci';
|
||||||
if (! isset($conf->db->user)) $conf->db->user='';
|
if (! isset($conf->db->user)) $conf->db->user='';
|
||||||
|
|
||||||
|
|
||||||
|
// Security check
|
||||||
|
if (eregi('install.norun',$_SERVER["SCRIPT_FILENAME"]))
|
||||||
|
{
|
||||||
|
print 'Install pages have been disabled for security reason (directory renamed with .norun).';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
if (file_exists('../../install.lock'))
|
||||||
|
{
|
||||||
|
print 'Install pages have been disabled for security reason (by lock file install.lock).<br>';
|
||||||
|
print '<a href="'.$dolibarr_main_url_root .'/admin/index.php?mainmenu=home&leftmenu=setup'.(isset($_POST["login"])?'&username='.urlencode($_POST["login"]):'').'">';
|
||||||
|
print 'Click here to go to Dolibarr';
|
||||||
|
print '</a>';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Forcage constante LOG
|
// Forcage constante LOG
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user