mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Fix: Wrong path of mysqldump command. Another try to fix this.
This commit is contained in:
@@ -1097,6 +1097,42 @@ class DoliDb
|
||||
return $liste;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Return full path of dump program
|
||||
* \return string Full path of dump program
|
||||
*/
|
||||
function getPathOfDump()
|
||||
{
|
||||
$fullpathofdump='/pathtomysqldump/mysqldump';
|
||||
|
||||
$resql=$this->query('SHOW VARIABLES LIKE \'basedir\'');
|
||||
if ($resql)
|
||||
{
|
||||
$liste=$this->fetch_array($resql);
|
||||
$basedir=$liste['Value'];
|
||||
$fullpathofdump=$basedir.'bin/mysqldump';
|
||||
}
|
||||
return $fullpathofdump;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Return full path of restore program
|
||||
* \return string Full path of restore program
|
||||
*/
|
||||
function getPathOfRestore()
|
||||
{
|
||||
$fullpathofimport='/pathtomysql/mysql';
|
||||
|
||||
$resql=$this->query('SHOW VARIABLES LIKE \'basedir\'');
|
||||
if ($resql)
|
||||
{
|
||||
$liste=$this->fetch_array($resql);
|
||||
$basedir=$liste['Value'];
|
||||
$fullpathofimport=$basedir.'bin/mysql';
|
||||
}
|
||||
return $fullpathofimport;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user