Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2018-07-15 20:16:54 +02:00
commit 1e42db0641
23 changed files with 323 additions and 175 deletions

View File

@ -356,6 +356,22 @@ class Documents extends DolibarrApi
$upload_dir = $conf->facture->dir_output . "/" . get_exdir(0, 0, 0, 1, $object, 'invoice');
}
else if ($modulepart == 'agenda' || $modulepart == 'action' || $modulepart == 'event')
{
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
if (!DolibarrApiAccess::$user->rights->agenda->myactions->read && !DolibarrApiAccess::$user->rights->agenda->allactions->read) {
throw new RestException(401);
}
$object = new ActionComm($this->db);
$result=$object->fetch($id, $ref);
if ( ! $result ) {
throw new RestException(404, 'Event not found');
}
$upload_dir = $conf->agenda->dir_output.'/'.dol_sanitizeFileName($object->ref);
}
else
{
throw new RestException(500, 'Modulepart '.$modulepart.' not implemented yet.');

View File

@ -573,13 +573,13 @@ class Notify
$mesg = $langs->transnoentitiesnoconv("EMailTextOrderValidated",$link);
break;
case 'PROPAL_VALIDATE':
$link='/comm/propal/card.php?id='.$object->id;
$link='<a href="' . $urlwithroot . '/comm/propal/card.php?id='.$object->id . '">' . $newref . '</a>';
$dir_output = $conf->propal->multidir_output[$object->entity];
$object_type = 'propal';
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalValidated",$link);
break;
case 'PROPAL_CLOSE_SIGNED':
$link='/comm/propal/card.php?id='.$object->id;
$link='<a href="' . $urlwithroot . '/comm/propal/card.php?id='.$object->id . '">' . $newref . '</a>';
$dir_output = $conf->propal->multidir_output[$object->entity];
$object_type = 'propal';
$mesg = $langs->transnoentitiesnoconv("EMailTextProposalClosedSigned",$link);

View File

@ -1484,10 +1484,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$delay_warning=$conf->global->MAIN_DELAY_ACTIONS_TODO*24*60*60;
require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
$formactions=new FormActions($db);
@ -1496,12 +1493,6 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
$userstatic=new User($db);
$contactstatic = new Contact($db);
// TODO mutualize/uniformize
$propalstatic=new Propal($db);
$orderstatic=new Commande($db);
$supplierorderstatic=new CommandeFournisseur($db);
$facturestatic=new Facture($db);
$out.='<form name="listactionsfilter" class="listactionsfilter" action="' . $_SERVER["PHP_SELF"] . '" method="POST">';
if ($objcon && get_class($objcon) == 'Contact' && $filterobj && get_class($filterobj) == 'Societe')
{
@ -1662,45 +1653,10 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon='', $noprint=
//$out.='<td>'.dol_trunc($histo[$key]['note'], 40).'</td>';
// Objet lie
// TODO mutualize/uniformize
$out.='<td>';
//var_dump($histo[$key]['elementtype']);
if (isset($histo[$key]['elementtype']))
if (isset($histo[$key]['elementtype']) && !empty($histo[$key]['fk_element']))
{
if ($histo[$key]['elementtype'] == 'propal' && ! empty($conf->propal->enabled))
{
//$propalstatic->ref=$langs->trans("ProposalShort");
//$propalstatic->id=$histo[$key]['fk_element'];
if ($propalstatic->fetch($histo[$key]['fk_element'])>0) {
$propalstatic->type=$histo[$key]['ftype'];
$out.=$propalstatic->getNomUrl(1);
} else {
//$out.= '<span class="opacitymedium">'.$langs->trans("ProposalDeleted").'</span>';
}
}
elseif (($histo[$key]['elementtype'] == 'order' || $histo[$key]['elementtype'] == 'commande') && ! empty($conf->commande->enabled))
{
//$orderstatic->ref=$langs->trans("Order");
//$orderstatic->id=$histo[$key]['fk_element'];
if ($orderstatic->fetch($histo[$key]['fk_element'])>0) {
$orderstatic->type=$histo[$key]['ftype'];
$out.=$orderstatic->getNomUrl(1);
} else {
//$out.= '<span class="opacitymedium">'.$langs->trans("OrderDeleted").'<span>';
}
}
elseif (($histo[$key]['elementtype'] == 'invoice' || $histo[$key]['elementtype'] == 'facture') && ! empty($conf->facture->enabled))
{
//$facturestatic->ref=$langs->trans("Invoice");
//$facturestatic->id=$histo[$key]['fk_element'];
if ($facturestatic->fetch($histo[$key]['fk_element'])>0) {
$facturestatic->type=$histo[$key]['ftype'];
$out.=$facturestatic->getNomUrl(1,'compta');
} else {
//$out.= '<span class="opacitymedium">'.$langs->trans("InvoiceDeleted").'</span>';
}
}
else $out.='&nbsp;';
$out.=dolGetElementUrl($histo[$key]['fk_element'],$histo[$key]['elementtype'],1);
}
else $out.='&nbsp;';
$out.='</td>';

View File

@ -7576,7 +7576,7 @@ function getDictvalue($tablename, $field, $id, $checkentity=false, $rowidfield='
{
$dictvalues[$tablename] = array();
$sql = 'SELECT * FROM '.$tablename.' WHERE 1';
if ($checkentity) $sql.= ' entity IN (0,'.getEntity('').')';
if ($checkentity) $sql.= ' AND entity IN (0,'.getEntity('').')';
$resql = $db->query($sql);
if ($resql)

View File

@ -1871,7 +1871,11 @@ function dolGetElementUrl($objectid,$objecttype,$withpicto=0,$option='')
{
$object = new $classname($db);
$res=$object->fetch($objectid);
if ($res > 0) $ret=$object->getNomUrl($withpicto,$option);
if ($res > 0) {
$ret=$object->getNomUrl($withpicto,$option);
} elseif($res==0) {
$ret=$langs->trans('Deleted');
}
unset($object);
}
else dol_syslog("Class with classname ".$classname." is unknown even after the include", LOG_ERR);

View File

@ -337,7 +337,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP 5.3 = array(5, 3)
* e.g.: PHP 5.4 = array(5, 4)
*/
public $phpmin;
@ -464,7 +464,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
}
/**
* Disable function. Deletes the module constant and boxes from the database.
* Disable function. Deletes the module constants and boxes from the database.
*
* @param string[] $array_sql SQL requests to be executed when module is disabled
* @param string $options Options when disabling module:
@ -553,7 +553,7 @@ class DolibarrModules // Can not be abstract, because we need to insta
}
else
{
// If module name translation using it's unique id does not exists, we try to use its name to find translation
// If module name translation using it's unique id does not exist, we try to use its name to find translation
if (is_array($this->langfiles))
{
foreach($this->langfiles as $val)
@ -613,9 +613,9 @@ class DolibarrModules // Can not be abstract, because we need to insta
/**
* Gives the long description of a module. First check README-la_LA.md then README.md
* If not markdown files found, it return translated value of the key ->descriptionlong.
* If no markdown files found, it returns translated value of the key ->descriptionlong.
*
* @return string Long description of a module from README.md of from property.
* @return string Long description of a module from README.md of from property.
*/
function getDescLong()
{

View File

@ -66,8 +66,11 @@ class modSociete extends DolibarrModules
$this->dirs = array("/societe/temp");
// Dependencies
$this->depends = array();
$this->requiredby = array("modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande");
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array("modExpedition","modFacture","modFournisseur","modFicheinter","modPropale","modContrat","modCommande"); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("companies",'bills');
// Constants

View File

@ -65,8 +65,11 @@ class modStock extends DolibarrModules
$this->config_page_url = array("stock.php");
// Dependencies
$this->depends = array("modProduct");
$this->requiredby = array("modProductBatch");
$this->hidden = false; // A condition to hide module
$this->depends = array("modProduct"); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array("modProductBatch"); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("stocks");
// Constants

View File

@ -65,10 +65,11 @@ class modStripe extends DolibarrModules
// Data directories to create when module is enabled.
$this->dirs = array();
// Config pages. Put here list of php page names stored in admmin directory used to setup module.
// Config pages. Put here list of php page names stored in admin directory used to setup module.
$this->config_page_url = array("stripe.php@stripe");
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->phpmin = array(5,4); // Minimum version of PHP required by module

View File

@ -57,13 +57,19 @@ class modSupplierProposal extends DolibarrModules
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
$this->picto='supplier_proposal';
// Data directories to create when module is enabled.
$this->dirs = array();
// Config pages. Put here list of php page names stored in admin directory used to setup module.
$this->config_page_url = array("supplier_proposal.php");
// Dependancies
$this->depends = array('modFournisseur');
$this->requiredby = array();
$this->config_page_url = array("supplier_proposal.php");
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array('modFournisseur'); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("supplier_proposal");
// Constants

View File

@ -67,8 +67,11 @@ class modSyslog extends DolibarrModules
$this->config_page_url = array("syslog.php");
// Dependencies
$this->depends = array();
$this->requiredby = array();
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
// Constants
$this->const = array();

View File

@ -67,9 +67,11 @@ class modTax extends DolibarrModules
$this->config_page_url = array("taxes.php");
// Dependencies
$this->depends = array();
$this->requiredby = array();
$this->conflictwith = array();
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("compta","bills");
// Constants
@ -117,13 +119,10 @@ class modTax extends DolibarrModules
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;
$r++;

View File

@ -95,12 +95,11 @@ class modTicket extends DolibarrModules
$this->config_page_url = array("ticket.php");
// Dependencies
// List of modules id that must be enabled if this module is enabled
$this->depends = array();
// List of modules id to disable if this one is disabled
$this->requiredby = array();
// Minimum version of PHP required by module
$this->phpmin = array(5, 3);
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("ticket");
// Constants
// List of particular constants to add when module is enabled
@ -115,7 +114,7 @@ class modTicket extends DolibarrModules
'project:+ticket:Tickets:@ticket:$user->rights->ticket->read:/ticket/list.php?projectid=__ID__',
);
// Dictionnaries
// Dictionaries
if (! isset($conf->ticket->enabled)) {
$conf->ticket=new stdClass();
$conf->ticket->enabled=0;

View File

@ -63,9 +63,12 @@ class modUser extends DolibarrModules
// Config pages
$this->config_page_url = array("user.php");
// Dependancies
$this->depends = array();
$this->requiredby = array();
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("main","users","companies","members",'salaries');
$this->always_enabled = true; // Can't be disabled
@ -205,13 +208,10 @@ class modUser extends DolibarrModules
// Menus
//-------
$this->menu = 1; // This module add menu entries. They are coded into menu manager.
// Exports
//--------
$r=0;
$r++;
@ -244,7 +244,6 @@ class modUser extends DolibarrModules
$this->export_sql_end[$r] .=' WHERE u.entity IN ('.getEntity('user').')';
// Imports
//--------
$r=0;
// Import list of users attributes

View File

@ -79,12 +79,10 @@ class modVariants extends DolibarrModules
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(
'modProduct'
); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->conflictwith = array(); // List of modules id this module is in conflict with
$this->phpmin = array(5,0); // Minimum version of PHP required by module
$this->depends = array('modProduct'); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3,0); // Minimum version of Dolibarr required by module
$this->langfiles = array("products");

View File

@ -55,30 +55,26 @@ class modWebServices extends DolibarrModules
$this->dirs = array();
// Config pages
//-------------
$this->config_page_url = array("index.php@webservices");
// Dependancies
//-------------
$this->depends = array();
$this->requiredby = array();
//$this->phpmax = array(7,1); // Maximum version of PHP required by module
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("other");
// Constants
//-----------
$this->const = array();
// New pages on tabs
// -----------------
$this->tabs = array();
// Boxes
//------
$this->boxes = array();
// Permissions
//------------
$this->rights = array();
$this->rights_class = 'webservices';
$r=0;

View File

@ -55,29 +55,26 @@ class modWebServicesClient extends DolibarrModules
$this->dirs = array();
// Config pages
//-------------
//$this->config_page_url = array();
// Dependancies
//-------------
$this->depends = array();
$this->requiredby = array();
// Dependencies
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("other");
// Constants
//-----------
$this->const = array();
// New pages on tabs
// -----------------
$this->tabs = array();
// Boxes
//------
$this->boxes = array();
// Permissions
//------------
$this->rights = array();
$this->rights_class = 'syncsupplierwebservices';
$r=0;

View File

@ -61,27 +61,23 @@ class modWebsite extends DolibarrModules
$this->dirs = array("/website/temp");
// Config pages
//-------------
$this->config_page_url = array('website.php');
// Dependancies
//-------------
// Dependencies
$this->hidden = ! empty($conf->global->MODULE_WEBSITE_DISABLED); // A condition to disable module
$this->depends = array('modFckeditor'); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->conflictwith = array(); // List of modules id this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->langfiles = array("website");
// Constants
//-----------
$this->const = array();
// New pages on tabs
// -----------------
//$this->tabs[] = array(); // To add a new tab identified by code tabname1
// Boxes
//------
$this->boxes = array();
// Permissions

View File

@ -68,9 +68,11 @@ class modWorkflow extends DolibarrModules
$this->config_page_url = array('workflow.php');
// Dependencies
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->phpmin = array(5,2); // Minimum version of PHP required by module
$this->hidden = false; // A condition to hide module
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5,4); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(2,8); // Minimum version of Dolibarr required by module
$this->langfiles = array("@workflow");

View File

@ -40,24 +40,83 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
*/
class pdf_azur extends ModelePDFPropales
{
var $db;
var $name;
var $description;
var $update_main_doc_field; // Save the name of generated file as the main doc when generating a doc with this template
var $type;
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
var $version = 'dolibarr';
var $page_largeur;
var $page_hauteur;
var $format;
var $marge_gauche;
var $marge_droite;
var $marge_haute;
var $marge_basse;
var $emetteur; // Objet societe qui emet
/**
* @var DoliDb Database handler
*/
public $db;
/**
* @var string model name
*/
public $name;
/**
* @var string model description (short text)
*/
public $description;
/**
* @var string Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
/**
* @var string document type
*/
public $type;
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
/**
* @var int page_largeur
*/
public $page_largeur;
/**
* @var int page_hauteur
*/
public $page_hauteur;
/**
* @var array format
*/
public $format;
/**
* @var int marge_gauche
*/
public $marge_gauche;
/**
* @var int marge_droite
*/
public $marge_droite;
/**
* @var int marge_haute
*/
public $marge_haute;
/**
* @var int marge_basse
*/
public $marge_basse;
/**
* Issuer
* @var Objet societe qui emet
*/
public $emetteur;
/**

View File

@ -36,23 +36,79 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
*/
class pdf_canelle extends ModelePDFSuppliersInvoices
{
var $db;
var $name;
var $description;
var $type;
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
var $version = 'dolibarr';
var $page_largeur;
var $page_hauteur;
var $format;
var $marge_gauche;
var $marge_droite;
var $marge_haute;
var $marge_basse;
var $emetteur; // Objet societe qui emet
/**
* @var DoliDb Database handler
*/
public $db;
/**
* @var string model name
*/
public $name;
/**
* @var string model description (short text)
*/
public $description;
/**
* @var string document type
*/
public $type;
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
/**
* @var int page_largeur
*/
public $page_largeur;
/**
* @var int page_hauteur
*/
public $page_hauteur;
/**
* @var array format
*/
public $format;
/**
* @var int marge_gauche
*/
public $marge_gauche;
/**
* @var int marge_droite
*/
public $marge_droite;
/**
* @var int marge_haute
*/
public $marge_haute;
/**
* @var int marge_basse
*/
public $marge_basse;
/**
* Issuer
* @var Objet societe qui emet
*/
public $emetteur;
/**

View File

@ -40,23 +40,78 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
*/
class pdf_muscadet extends ModelePDFSuppliersOrders
{
var $db;
var $name;
var $description;
var $type;
/**
* @var DoliDb Database handler
*/
public $db;
/**
* @var string model name
*/
public $name;
/**
* @var string model description (short text)
*/
public $description;
/**
* @var string document type
*/
public $type;
var $phpmin = array(4,3,0); // Minimum version of PHP required by module
var $version = 'dolibarr';
var $page_largeur;
var $page_hauteur;
var $format;
var $marge_gauche;
var $marge_droite;
var $marge_haute;
var $marge_basse;
var $emetteur; // Objet societe qui emet
/**
* @var array() Minimum version of PHP required by module.
* e.g.: PHP 5.4 = array(5, 4)
*/
public $phpmin = array(5, 4);
/**
* Dolibarr version of the loaded document
* @public string
*/
public $version = 'dolibarr';
/**
* @var int page_largeur
*/
public $page_largeur;
/**
* @var int page_hauteur
*/
public $page_hauteur;
/**
* @var array format
*/
public $format;
/**
* @var int marge_gauche
*/
public $marge_gauche;
/**
* @var int marge_droite
*/
public $marge_droite;
/**
* @var int marge_haute
*/
public $marge_haute;
/**
* @var int marge_basse
*/
public $marge_basse;
/**
* Issuer
* @var Objet societe qui emet
*/
public $emetteur;
/**

View File

@ -130,8 +130,8 @@ $dolibarr_main_url_root_alt=(empty($dolibarr_main_url_root_alt)?'':trim($dolibar
$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='mysqli'; // Pour compatibilite avec anciennes configs, si non defini, on prend 'mysql'
if (empty($dolibarr_main_db_port)) $dolibarr_main_db_port=3306; // For compatibility with old configs, if not defined, we take 'mysql' type
if (empty($dolibarr_main_db_type)) $dolibarr_main_db_type='mysqli'; // For compatibility with old configs, if not defined, we take 'mysql' type
// Mysql driver support has been removed in favor of mysqli
if ($dolibarr_main_db_type == 'mysql') $dolibarr_main_db_type = 'mysqli';