Fix: The install log file was not in correct directory
This commit is contained in:
parent
a5513d165e
commit
43a960a322
@ -292,7 +292,7 @@ else
|
||||
$conf->setValues($db);
|
||||
// Current version is $conf->global->MAIN_VERSION_LAST_UPGRADE
|
||||
// Version to install is DOL_VERSION
|
||||
$dolibarrlastupgradeversionarray=preg_split('/[\.-]/',isset($conf->global->MAIN_VERSION_LAST_UPGRADE)?$conf->global->MAIN_VERSION_LAST_UPGRADE:$conf->global->MAIN_VERSION_LAST_INSTALL);
|
||||
$dolibarrlastupgradeversionarray=preg_split('/[\.-]/',isset($conf->global->MAIN_VERSION_LAST_UPGRADE) ? $conf->global->MAIN_VERSION_LAST_UPGRADE : (isset($conf->global->MAIN_VERSION_LAST_INSTALL)?$conf->global->MAIN_VERSION_LAST_INSTALL:''));
|
||||
$dolibarrversiontoinstallarray=versiondolibarrarray();
|
||||
}
|
||||
|
||||
|
||||
@ -176,9 +176,11 @@ if ($_POST["action"] == "set")
|
||||
}
|
||||
|
||||
dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
|
||||
if ($db->query($buffer))
|
||||
$resql=$db->query($buffer);
|
||||
if ($resql)
|
||||
{
|
||||
// print "<td>OK requete ==== $buffer</td></tr>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -312,9 +314,11 @@ if ($_POST["action"] == "set")
|
||||
}
|
||||
|
||||
dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
|
||||
if ($db->query($buffer))
|
||||
$resql=$db->query($buffer);
|
||||
if ($resql)
|
||||
{
|
||||
//print "<td>OK requete ==== $buffer</td></tr>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -399,9 +403,11 @@ if ($_POST["action"] == "set")
|
||||
if ($buffer)
|
||||
{
|
||||
dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
|
||||
if ($db->query($buffer))
|
||||
$resql=$db->query($buffer);
|
||||
if ($resql)
|
||||
{
|
||||
$ok = 1;
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -435,7 +441,7 @@ if ($_POST["action"] == "set")
|
||||
|
||||
/***************************************************************************************
|
||||
*
|
||||
* Chargement fichier data.sql
|
||||
* Load files data/*.sql
|
||||
*
|
||||
***************************************************************************************/
|
||||
if ($ok && $createdata)
|
||||
@ -479,13 +485,15 @@ if ($_POST["action"] == "set")
|
||||
}
|
||||
|
||||
//dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
|
||||
if ($db->query($buffer))
|
||||
$resql=$db->query($buffer);
|
||||
if ($resql)
|
||||
{
|
||||
$ok = 1;
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
|
||||
{
|
||||
//print "<tr><td>Insertion ligne : $buffer</td><td>";
|
||||
}
|
||||
|
||||
@ -66,7 +66,6 @@ else
|
||||
define('LOG_DEBUG',7);
|
||||
}
|
||||
|
||||
|
||||
$includeconferror='';
|
||||
$conffile = "../conf/conf.php";
|
||||
|
||||
@ -240,7 +239,7 @@ function conf($dolibarr_main_document_root)
|
||||
if (@is_writable('/tmp')) define('SYSLOG_FILE','/tmp/dolibarr_install.log');
|
||||
else if (! empty($_ENV["TMP"]) && @is_writable($_ENV["TMP"])) define('SYSLOG_FILE',$_ENV["TMP"].'/dolibarr_install.log');
|
||||
else if (! empty($_ENV["TEMP"]) && @is_writable($_ENV["TEMP"])) define('SYSLOG_FILE',$_ENV["TEMP"].'/dolibarr_install.log');
|
||||
else if (@is_writable('../../../../')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
|
||||
else if (@is_writable('../../../../') && @file_exists('../../../../startdoliwamp.bat')) define('SYSLOG_FILE','../../../../dolibarr_install.log'); // For DoliWamp
|
||||
else if (@is_writable('../../')) define('SYSLOG_FILE','../../dolibarr_install.log'); // For others
|
||||
//print 'SYSLOG_FILE='.SYSLOG_FILE;exit;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user