git push origin developMerge branch 'marcosgdf-remove-mysql-driver' into develop

This commit is contained in:
Laurent Destailleur 2016-08-05 13:12:49 +02:00
commit 72e601d30f
11 changed files with 25 additions and 1060 deletions

View File

@ -23,7 +23,7 @@ Following changes may create regression for some external modules, but were nece
Dolibarr better:
- Function delete of class Facture (invoice) need the object $user as first parameter. Also you must
check you make a fetch on object before calling the delete.
- The old driver of "mysql" has been removed. Dolibarr use the new one (mysqli) by default.

View File

@ -100,9 +100,8 @@ $dolibarr_main_db_pass='';
# This parameter contains the name of the driver used to access your
# Dolibarr database.
# Default value: none
# Possible values: mysql, mysqli, pgsql
# Possible values: mysqli, pgsql
# Examples:
# $dolibarr_main_db_type='mysql';
# $dolibarr_main_db_type='mysqli';
# $dolibarr_main_db_type='pgsql';
#

View File

@ -125,9 +125,8 @@ $dolibarr_main_db_pass='';
// This parameter contains the name of the driver used to access your
// Dolibarr database.
// Default value: none
// Possible values: mysql, mysqli, pgsql
// Possible values: mysqli, pgsql
// Examples:
// $dolibarr_main_db_type='mysql';
// $dolibarr_main_db_type='mysqli';
// $dolibarr_main_db_type='pgsql';
//

File diff suppressed because it is too large Load Diff

View File

@ -143,10 +143,13 @@ $dolibarr_main_document_root=trim($dolibarr_main_document_root);
$dolibarr_main_document_root_alt=(empty($dolibarr_main_document_root_alt)?'':trim($dolibarr_main_document_root_alt));
if (empty($dolibarr_main_db_port)) $dolibarr_main_db_port=0; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql'
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql'
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql'
// Mysql driver support has been removed in favor of mysqli
if ($dolibarr_main_db_type == 'mysql') $dolibarr_main_db_type = 'mysqli';
if (empty($dolibarr_main_db_prefix)) $dolibarr_main_db_prefix='llx_';
if (empty($dolibarr_main_db_character_set)) $dolibarr_main_db_character_set=($dolibarr_main_db_type=='mysql'?'utf8':''); // Old installation
if (empty($dolibarr_main_db_collation)) $dolibarr_main_db_collation=($dolibarr_main_db_type=='mysql'?'utf8_general_ci':''); // Old installation
if (empty($dolibarr_main_db_character_set)) $dolibarr_main_db_character_set=($dolibarr_main_db_type=='mysqli'?'utf8':''); // Old installation
if (empty($dolibarr_main_db_collation)) $dolibarr_main_db_collation=($dolibarr_main_db_type=='mysqli'?'utf8_general_ci':''); // Old installation
if (empty($dolibarr_main_db_encryption)) $dolibarr_main_db_encryption=0;
if (empty($dolibarr_main_db_cryptkey)) $dolibarr_main_db_cryptkey='';
if (empty($dolibarr_main_limit_users)) $dolibarr_main_limit_users=0;
@ -178,7 +181,6 @@ if (empty($dolibarr_main_url_root))
print 'You must add this parameter with your full Dolibarr root Url (Example: http://myvirtualdomain/ or http://mydomain/mydolibarrurl/)'."\n";
die;
}
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql'
if (empty($dolibarr_main_data_root))
{
// Si repertoire documents non defini, on utilise celui par defaut

View File

@ -85,7 +85,13 @@ if (! defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile)
if ($result)
{
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // For backward compatibility
if (empty($dolibarr_main_db_port) && ($dolibarr_main_db_type=='mysqli' || $dolibarr_main_db_type=='mysql')) $dolibarr_main_db_port='3306'; // For backward compatibility
//Mysql driver support has been removed in favor of mysqli
if ($dolibarr_main_db_type == 'mysql') {
$dolibarr_main_db_type = 'mysqli';
}
if (empty($dolibarr_main_db_port) && ($dolibarr_main_db_type=='mysqli')) $dolibarr_main_db_port='3306'; // For backward compatibility
// Clean parameters
$dolibarr_main_data_root =isset($dolibarr_main_data_root)?trim($dolibarr_main_data_root):DOL_DOCUMENT_ROOT . '/../documents';

View File

@ -50,7 +50,6 @@ $langs->load("admin");
$langs->load("install");
$langs->load("other");
if ($dolibarr_main_db_type == "mysql") $choix=1;
if ($dolibarr_main_db_type == "mysqli") $choix=1;
if ($dolibarr_main_db_type == "pgsql") $choix=2;
if ($dolibarr_main_db_type == "mssql") $choix=3;

View File

@ -50,7 +50,6 @@ $langs->load("admin");
$langs->load("install");
$choix=0;
if ($dolibarr_main_db_type == "mysql") $choix=1;
if ($dolibarr_main_db_type == "mysqli") $choix=1;
if ($dolibarr_main_db_type == "pgsql") $choix=2;
if ($dolibarr_main_db_type == "mssql") $choix=3;

View File

@ -38,7 +38,7 @@ if (! file_exists($conffile))
{
print 'Error: Dolibarr config file was not found. This may means that Dolibarr is not installed yet. Please call the page "/install/index.php" instead of "/install/upgrade.php").';
}
require_once $conffile; if (! isset($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // For backward compatibility
require_once $conffile;
require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php';
global $langs;
@ -68,7 +68,6 @@ $langs->load("install");
$langs->load("other");
$langs->load("errors");
if ($dolibarr_main_db_type == "mysql") $choix=1;
if ($dolibarr_main_db_type == "mysqli") $choix=1;
if ($dolibarr_main_db_type == "pgsql") $choix=2;
if ($dolibarr_main_db_type == "mssql") $choix=3;

View File

@ -37,7 +37,7 @@ if (! file_exists($conffile))
{
print 'Error: Dolibarr config file was not found. This may means that Dolibarr is not installed yet. Please call the page "/install/index.php" instead of "/install/upgrade.php").';
}
require_once $conffile; if (! isset($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // For backward compatibility
require_once $conffile;
require_once $dolibarr_main_document_root . '/compta/facture/class/facture.class.php';
require_once $dolibarr_main_document_root . '/comm/propal/class/propal.class.php';
require_once $dolibarr_main_document_root . '/contrat/class/contrat.class.php';
@ -72,7 +72,6 @@ $langs->load('install');
$langs->load("bills");
$langs->load("suppliers");
if ($dolibarr_main_db_type == 'mysql') $choix=1;
if ($dolibarr_main_db_type == 'mysqli') $choix=1;
if ($dolibarr_main_db_type == 'pgsql') $choix=2;
if ($dolibarr_main_db_type == 'mssql') $choix=3;

View File

@ -71,6 +71,13 @@ if (! defined('DONOTLOADCONF') && file_exists($conffile) && filesize($conffile)
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysql'; // For backward compatibility
//Mysql driver support has been removed in favor of mysqli
if ($dolibarr_main_db_type == 'mysql') {
$dolibarr_main_db_type = 'mysqli';
}
if (empty($dolibarr_main_db_port) && ($dolibarr_main_db_type=='mysqli')) $dolibarr_main_db_port='3306'; // For backward compatibility
// Clean parameters
$dolibarr_main_data_root =isset($dolibarr_main_data_root)?trim($dolibarr_main_data_root):'';
$dolibarr_main_url_root =isset($dolibarr_main_url_root)?trim($dolibarr_main_url_root):'';