Fix: Wrong path of mysqldump command. Another try to fix this.

This commit is contained in:
Laurent Destailleur
2009-11-29 19:32:16 +00:00
parent afebd7c1cf
commit 6596e42118
6 changed files with 137 additions and 29 deletions

View File

@@ -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;
}
}
?>