Fix: Several fixes to avoid PDF lib conflicts.
This commit is contained in:
parent
d69e88435c
commit
11ab579639
@ -778,7 +778,8 @@ print "</table>\n";
|
||||
|
||||
dol_htmloutput_mesg($mesg);
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -24,11 +24,12 @@
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("languages");
|
||||
@ -55,14 +56,14 @@ if ($action == 'update')
|
||||
dolibarr_set_const($db, "MAIN_PROFID3_IN_ADDRESS", $_POST["MAIN_PROFID3_IN_ADDRESS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_PROFID4_IN_ADDRESS", $_POST["MAIN_PROFID4_IN_ADDRESS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT", $_POST["MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT"],'chaine',0,'',$conf->entity);
|
||||
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||
{
|
||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DETAILS"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_DESC", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_DESC"],'chaine',0,'',$conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_GENERATE_DOCUMENTS_HIDE_REF", $_POST["MAIN_GENERATE_DOCUMENTS_HIDE_REF"],'chaine',0,'',$conf->entity);
|
||||
}
|
||||
|
||||
|
||||
header("Location: ".$_SERVER["PHP_SELF"]."?mainmenu=home&leftmenu=setup");
|
||||
exit;
|
||||
}
|
||||
@ -208,7 +209,7 @@ if ($action == 'edit') // Edit
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideAnyVATInformationOnPDF").'</td><td>';
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))?$conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||
{
|
||||
//Desc
|
||||
@ -216,13 +217,13 @@ if ($action == 'edit') // Edit
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideDescOnPDF").'</td><td>';
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_DESC',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
//Ref
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideRefOnPDF").'</td><td>';
|
||||
print $form->selectyesno('MAIN_GENERATE_DOCUMENTS_HIDE_REF',(! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF))?$conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF:0,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
//Details
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideDetailsOnPDF").'</td><td>';
|
||||
@ -372,7 +373,7 @@ else // Show
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideAnyVATInformationOnPDF").'</td><td>';
|
||||
print yn($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
if ($conf->global->MAIN_FEATURES_LEVEL > 1)
|
||||
{
|
||||
//Desc
|
||||
@ -380,13 +381,13 @@ else // Show
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideDescOnPDF").'</td><td>';
|
||||
print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_DESC,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
//Ref
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideRefOnPDF").'</td><td>';
|
||||
print yn($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF,1);
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
//Details
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("HideDetailsOnPDF").'</td><td>';
|
||||
@ -397,6 +398,69 @@ else // Show
|
||||
print '</table>';
|
||||
|
||||
|
||||
/*
|
||||
* Library
|
||||
*/
|
||||
print '<br>';
|
||||
print_titre($langs->trans("Library"));
|
||||
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">'."\n";
|
||||
print '<td>'.$langs->trans("Name").'</td>'."\n";
|
||||
print '<td>'.$langs->trans("Value").'</td>'."\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$var=false;
|
||||
if (! empty($dolibarr_pdf_force_fpdf))
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>'."\n";
|
||||
print '<td>dolibarr_pdf_force_fpdf</td>'."\n";
|
||||
print '<td>';
|
||||
print $dolibarr_pdf_force_fpdf;
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>'."\n";
|
||||
print '<td>'.$langs->trans("LibraryToBuildPDF").'</td>'."\n";
|
||||
print '<td>';
|
||||
$i=0;
|
||||
$pdf=pdf_getInstance('A4');
|
||||
if (class_exists('FPDF') && ! class_exists('TCPDF'))
|
||||
{
|
||||
if ($i) print ' + ';
|
||||
print 'FPDF';
|
||||
print ' ('.@constant('FPDF_PATH').')';
|
||||
$i++;
|
||||
}
|
||||
if (class_exists('TCPDF'))
|
||||
{
|
||||
if ($i) print ' + ';
|
||||
print 'TCPDF';
|
||||
print ' ('.@constant('TCPDF_PATH').')';
|
||||
$i++;
|
||||
}
|
||||
if (class_exists('FPDI'))
|
||||
{
|
||||
if ($i) print ' + ';
|
||||
print 'FPDI';
|
||||
print ' ('.@constant('FPDI_PATH').')';
|
||||
$i++;
|
||||
}
|
||||
print '<!-- $conf->global->MAIN_USE_FPDF = '.$conf->global->MAIN_USE_FPDF.' -->';
|
||||
print '</td>'."\n";
|
||||
print '</tr>'."\n";
|
||||
|
||||
print "</table>\n";
|
||||
|
||||
if (! empty($dolibarr_pdf_force_fpdf))
|
||||
{
|
||||
print info_admin($langs->trans("WarningUsingFPDF")).'<br>';
|
||||
}
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=edit">'.$langs->trans("Modify").'</a>';
|
||||
print '</div>';
|
||||
@ -404,7 +468,7 @@ else // Show
|
||||
}
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter();
|
||||
|
||||
$db->close();
|
||||
?>
|
||||
|
||||
@ -245,6 +245,7 @@ $configfileparameters=array(
|
||||
'separator' => '',
|
||||
'?dolibarr_lib_ADODB_PATH' => 'dolibarr_lib_ADODB_PATH',
|
||||
'?dolibarr_lib_TCPDF_PATH' => 'dolibarr_lib_TCPDF_PATH',
|
||||
'?dolibarr_lib_FPDF_PATH' => 'dolibarr_lib_FPDF_PATH',
|
||||
'?dolibarr_lib_FPDI_PATH' => 'dolibarr_lib_FPDI_PATH',
|
||||
'?dolibarr_lib_NUSOAP_PATH' => 'dolibarr_lib_NUSOAP_PATH',
|
||||
'?dolibarr_lib_PHPEXCEL_PATH' => 'dolibarr_lib_PHPEXCEL_PATH',
|
||||
@ -259,7 +260,8 @@ $configfileparameters=array(
|
||||
'?dolibarr_font_DOL_DEFAULT_TTF_BOLD' => 'dolibarr_font_DOL_DEFAULT_TTF_BOLD',
|
||||
'separator' => '',
|
||||
'?dolibarr_mailing_limit_sendbyweb' => 'Limit nb of email sent by page',
|
||||
'?dolibarr_strict_mode' => 'Strict mode is on/off'
|
||||
'?dolibarr_strict_mode' => 'Strict mode is on/off',
|
||||
'?dolibarr_pdf_force_fpdf' => 'Force fpdf usage to generate PDF'
|
||||
);
|
||||
|
||||
$var=true;
|
||||
|
||||
@ -113,18 +113,15 @@ class Conf
|
||||
|
||||
/**
|
||||
* Load setup values into conf object (read llx_const)
|
||||
* Note that this->db->xxx, this->file->xxx and this->multicompany have been already loaded when setValues is called.
|
||||
*
|
||||
* @param DoliDB $db Handler d'acces base
|
||||
* @param DoliDB $db Database handler
|
||||
* @return int < 0 if KO, >= 0 if OK
|
||||
*/
|
||||
function setValues($db)
|
||||
{
|
||||
dol_syslog(get_class($this)."::setValues");
|
||||
|
||||
// Avoid warning if not defined
|
||||
if (empty($this->db->dolibarr_main_db_encryption)) $this->db->dolibarr_main_db_encryption=0;
|
||||
if (empty($this->db->dolibarr_main_db_cryptkey)) $this->db->dolibarr_main_db_cryptkey='';
|
||||
|
||||
/*
|
||||
* Definition de toutes les constantes globales d'environnement
|
||||
* - En constante php (TODO a virer)
|
||||
@ -164,13 +161,19 @@ class Conf
|
||||
if (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_TABS_/i',$key))
|
||||
{
|
||||
$params=explode(':',$value,2);
|
||||
$this->tabs_modules[$params[0]][]=$value;
|
||||
$this->tabs_modules[$params[0]][]=$value; // Add this module in list of modules that provide tabs
|
||||
}
|
||||
// If this is constant for a sms engine
|
||||
elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_SMS$/i',$key,$reg))
|
||||
{
|
||||
$modulename=strtolower($reg[1]);
|
||||
$this->sms_engine_modules[$modulename]=$modulename; // Add this module in list of modules that provide SMS
|
||||
$this->sms_engine_modules[$modulename]=$modulename; // Add this module in list of modules that provide SMS
|
||||
}
|
||||
// If this is constant for a societe submodule
|
||||
elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_SOCIETE$/i',$key,$reg))
|
||||
{
|
||||
$modulename=strtolower($reg[1]);
|
||||
$this->societe_modules[$modulename]=$modulename; // Add this module in list of modules that provide societe modules
|
||||
}
|
||||
// If this is constant for all generic part activated by a module
|
||||
elseif (preg_match('/^MAIN_MODULE_([0-9A-Z_]+)_([A-Z]+)$/i',$key,$reg))
|
||||
@ -395,7 +398,7 @@ class Conf
|
||||
$this->format_date_hour_text="%d %B %Y %H:%M";
|
||||
|
||||
// Duration of workday
|
||||
if (! isset($conf->global->MAIN_DURATION_OF_WORKDAY)) $this->global->MAIN_DURATION_OF_WORKDAY=86400;
|
||||
if (! isset($this->global->MAIN_DURATION_OF_WORKDAY)) $this->global->MAIN_DURATION_OF_WORKDAY=86400;
|
||||
|
||||
// Limites decimales si non definie (peuvent etre egale a 0)
|
||||
if (! isset($this->global->MAIN_MAX_DECIMALS_UNIT)) $this->global->MAIN_MAX_DECIMALS_UNIT=5;
|
||||
|
||||
@ -91,7 +91,7 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
||||
//$format=array($arrayformat['width'],$arrayformat['height']);
|
||||
//$metric=$arrayformat['unit'];
|
||||
|
||||
// Protection et encryption du pdf
|
||||
// Protection and encryption of pdf
|
||||
if (empty($conf->global->MAIN_USE_FPDF) && ! empty($conf->global->PDF_SECURITY_ENCRYPTION))
|
||||
{
|
||||
/* Permission supported by TCPDF
|
||||
@ -123,7 +123,7 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
||||
// If we use FPDF class, we may need to add method writeHTMLCell
|
||||
if (! empty($conf->global->MAIN_USE_FPDF) && ! method_exists($pdf, 'writeHTMLCell'))
|
||||
{
|
||||
// Declare here a class to overwrite FPDFI to add method writeHTMLCell
|
||||
// Declare here a class to overwrite FPDI to add method writeHTMLCell
|
||||
/**
|
||||
* This class if a enhanced FPDI class that support method writeHTMLCell
|
||||
*/
|
||||
|
||||
@ -105,7 +105,6 @@ 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;
|
||||
if (empty($dolibarr_mailing_limit_sendbyweb)) $dolibarr_mailing_limit_sendbyweb=0;
|
||||
if (empty($force_charset_do_notuse)) $force_charset_do_notuse='UTF-8';
|
||||
if (empty($dolibarr_strict_mode)) $dolibarr_strict_mode=0; // For debug in php strict mode
|
||||
if (empty($multicompany_transverse_mode)) $multicompany_transverse_mode=0;
|
||||
if (empty($multicompany_force_entity)) $multicompany_force_entity=0; // To force entity in login page
|
||||
@ -206,9 +205,9 @@ define('MAIN_DB_PREFIX',$dolibarr_main_db_prefix);
|
||||
*/
|
||||
// Path to root libraries
|
||||
if (! defined('ADODB_PATH')) { define('ADODB_PATH', (!isset($dolibarr_lib_ADODB_PATH))?DOL_DOCUMENT_ROOT.'/includes/adodbtime/':(empty($dolibarr_lib_ADODB_PATH)?'':$dolibarr_lib_ADODB_PATH.'/')); }
|
||||
if (! defined('TCPDF_PATH')) { define('TCPDF_PATH', (!isset($dolibarr_lib_TCPDF_PATH))?DOL_DOCUMENT_ROOT.'/includes/tcpdf/':(empty($dolibarr_lib_TCPDF_PATH)?'':$dolibarr_lib_TCPDF_PATH.'/')); }
|
||||
if (! defined('FPDF_PATH')) { define('FPDF_PATH', (!isset($dolibarr_lib_FPDF_PATH))?DOL_DOCUMENT_ROOT.'/includes/fpdf/':(empty($dolibarr_lib_FPDF_PATH)?'':$dolibarr_lib_FPDF_PATH.'/')); } // Used only for package that can't include tcpdf
|
||||
if (! defined('FPDI_PATH')) { define('FPDI_PATH', (!isset($dolibarr_lib_FPDI_PATH))?DOL_DOCUMENT_ROOT.'/includes/fpdfi/':(empty($dolibarr_lib_FPDI_PATH)?'':$dolibarr_lib_FPDI_PATH.'/')); }
|
||||
if (! defined('TCPDF_PATH')) { define('TCPDF_PATH', (empty($dolibarr_lib_TCPDF_PATH))?DOL_DOCUMENT_ROOT.'/includes/tcpdf/':$dolibarr_lib_TCPDF_PATH.'/'); }
|
||||
if (! defined('FPDF_PATH')) { define('FPDF_PATH', (empty($dolibarr_lib_FPDF_PATH))?DOL_DOCUMENT_ROOT.'/includes/fpdf/':$dolibarr_lib_FPDF_PATH.'/'); } // Used only for package that can't include tcpdf
|
||||
if (! defined('FPDI_PATH')) { define('FPDI_PATH', (empty($dolibarr_lib_FPDI_PATH))?DOL_DOCUMENT_ROOT.'/includes/fpdfi/':$dolibarr_lib_FPDI_PATH.'/'); }
|
||||
if (! defined('NUSOAP_PATH')) { define('NUSOAP_PATH', (!isset($dolibarr_lib_NUSOAP_PATH))?DOL_DOCUMENT_ROOT.'/includes/nusoap/lib/':(empty($dolibarr_lib_NUSOAP_PATH)?'':$dolibarr_lib_NUSOAP_PATH.'/')); }
|
||||
if (! defined('PHPEXCEL_PATH')) { define('PHPEXCEL_PATH', (!isset($dolibarr_lib_PHPEXCEL_PATH))?DOL_DOCUMENT_ROOT.'/includes/phpexcel/':(empty($dolibarr_lib_PHPEXCEL_PATH)?'':$dolibarr_lib_PHPEXCEL_PATH.'/')); }
|
||||
if (! defined('GEOIP_PATH')) { define('GEOIP_PATH', (!isset($dolibarr_lib_GEOIP_PATH))?DOL_DOCUMENT_ROOT.'/includes/geoip/':(empty($dolibarr_lib_GEOIP_PATH)?'':$dolibarr_lib_GEOIP_PATH.'/')); }
|
||||
|
||||
@ -345,6 +345,8 @@ TextLong=Long text
|
||||
Int=Integer
|
||||
Float=Float
|
||||
DateAndTime=Date and hour
|
||||
LibraryToBuildPDF=Library used to build PDF
|
||||
WarningUsingFPDF=Warning: Your <b>conf.php</b> contains directive <b>dolibarr_pdf_force_fpdf=1</b>. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation.<br>To solve this and have a full support of PDF generation, please download <a href="http://www.tcpdf.org/" target="_blank">TCPDF library</a>, then comment or remove the line <b>$dolibarr_pdf_force_fpdf=1</b>, and add instead <b>$dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'</b>
|
||||
|
||||
# Modules
|
||||
Module0Name=Users & groups
|
||||
|
||||
@ -347,6 +347,8 @@ TextLong=Texte long
|
||||
Int=Numérique entier
|
||||
Float=Décimal
|
||||
DateAndTime=Date et heure
|
||||
LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF
|
||||
WarningUsingFPDF=Attention: Votre fichier <b>conf.php</b> contient la directive <b>dolibarr_pdf_force_fpdf=1</b>. Cela signifie que vous utilisez la librairie FPDF pour générer vos fichiers PDF. Cette librairie est ancienne et ne couvre pas de nombreuses fonctionnalitée (Unicode, transparence des images, langues cyrillic, arabes ou asiatiques...), aussi vous pouvez rencontrez des problèmes durant la génération des PDF.<br>Pour résoudre cela et avoir un support complet de PDF, vous pouvez télécharger la <a href="http://www.tcpdf.org/" target="_blank">librairie TCPDF</a> puis commenter ou supprimer la ligne <b>$dolibarr_pdf_force_fpdf=1</b>, et ajouter à la place <b>$dolibarr_lib_TCPDF_PATH='chemin_vers_TCPDF'</b>
|
||||
|
||||
# Modules= undefined
|
||||
Module0Name= Utilisateurs & groupes
|
||||
|
||||
@ -41,7 +41,8 @@ require_once 'filefunc.inc.php'; // May have been already require by main.inc.ph
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/conf.class.php';
|
||||
|
||||
$conf = new Conf();
|
||||
// Identifiant propres au serveur base de donnee
|
||||
|
||||
// Set properties specific to database
|
||||
$conf->db->host = $dolibarr_main_db_host;
|
||||
$conf->db->port = $dolibarr_main_db_port;
|
||||
$conf->db->name = $dolibarr_main_db_name;
|
||||
@ -53,39 +54,36 @@ $conf->db->character_set = $dolibarr_main_db_character_set;
|
||||
$conf->db->dolibarr_main_db_collation = $dolibarr_main_db_collation;
|
||||
$conf->db->dolibarr_main_db_encryption = $dolibarr_main_db_encryption;
|
||||
$conf->db->dolibarr_main_db_cryptkey = $dolibarr_main_db_cryptkey;
|
||||
if (defined('TEST_DB_FORCE_TYPE')) $conf->db->type=constant('TEST_DB_FORCE_TYPE'); // Force db type (for test purpose, by PHP unit for example)
|
||||
|
||||
// Set properties specific to conf file
|
||||
$conf->file->main_limit_users = $dolibarr_main_limit_users;
|
||||
$conf->file->mailing_limit_sendbyweb = $dolibarr_mailing_limit_sendbyweb;
|
||||
// Identification mode
|
||||
$conf->file->main_authentication = empty($dolibarr_main_authentication)?'':$dolibarr_main_authentication;
|
||||
// Force https
|
||||
$conf->file->main_force_https = empty($dolibarr_main_force_https)?'':$dolibarr_main_force_https;
|
||||
// Cookie cryptkey
|
||||
$conf->file->cookie_cryptkey = empty($dolibarr_main_cookie_cryptkey)?'':$dolibarr_main_cookie_cryptkey;
|
||||
// Define array of document root directories
|
||||
$conf->file->dol_document_root = array('main' => DOL_DOCUMENT_ROOT);
|
||||
$conf->file->main_authentication = empty($dolibarr_main_authentication)?'':$dolibarr_main_authentication; // Identification mode
|
||||
$conf->file->main_force_https = empty($dolibarr_main_force_https)?'':$dolibarr_main_force_https; // Force https
|
||||
$conf->file->strict_mode = empty($dolibarr_strict_mode)?'':$dolibarr_strict_mode; // Force php strict mode (for debug)
|
||||
$conf->file->cookie_cryptkey = empty($dolibarr_main_cookie_cryptkey)?'':$dolibarr_main_cookie_cryptkey; // Cookie cryptkey
|
||||
$conf->file->dol_document_root = array('main' => DOL_DOCUMENT_ROOT); // Define array of document root directories
|
||||
if (! empty($dolibarr_main_document_root_alt))
|
||||
{
|
||||
// dolibarr_main_document_root_alt contains several directories
|
||||
// dolibarr_main_document_root_alt can contains several directories
|
||||
$values=preg_split('/[;,]/',$dolibarr_main_document_root_alt);
|
||||
foreach($values as $value)
|
||||
{
|
||||
$conf->file->dol_document_root['alt']=$value;
|
||||
}
|
||||
}
|
||||
// Force db type (for test purpose)
|
||||
if (defined('TEST_DB_FORCE_TYPE')) $conf->db->type=constant('TEST_DB_FORCE_TYPE');
|
||||
// Force php strict mode (for debug)
|
||||
$conf->file->strict_mode = empty($dolibarr_strict_mode)?'':$dolibarr_strict_mode;
|
||||
// Force Multi-Company transverse mode
|
||||
$conf->multicompany->transverse_mode = empty($multicompany_transverse_mode)?'':$multicompany_transverse_mode;
|
||||
// Force entity in login page
|
||||
$conf->multicompany->force_entity = empty($multicompany_force_entity)?'':(int) $multicompany_force_entity;
|
||||
|
||||
// Set properties specific to multicompany
|
||||
$conf->multicompany->transverse_mode = empty($multicompany_transverse_mode)?'':$multicompany_transverse_mode; // Force Multi-Company transverse mode
|
||||
$conf->multicompany->force_entity = empty($multicompany_force_entity)?'':(int) $multicompany_force_entity; // Force entity in login page
|
||||
|
||||
// Chargement des includes principaux de librairies communes
|
||||
if (! defined('NOREQUIREUSER')) require_once DOL_DOCUMENT_ROOT .'/user/class/user.class.php'; // Need 500ko memory
|
||||
if (! defined('NOREQUIRETRAN')) require_once DOL_DOCUMENT_ROOT .'/core/class/translate.class.php';
|
||||
if (! defined('NOREQUIRESOC')) require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php';
|
||||
|
||||
|
||||
/*
|
||||
* Creation objet $langs (must be before all other code)
|
||||
*/
|
||||
@ -214,4 +212,7 @@ if (! defined('MAIN_LABEL_MENTION_NPR') ) define('MAIN_LABEL_MENTION_NPR','NPR')
|
||||
// We force feature to help debug
|
||||
//$conf->global->MAIN_JS_ON_PAYMENT=0;
|
||||
|
||||
// We force FPDF
|
||||
if (! empty($dolibarr_pdf_force_fpdf)) $conf->global->MAIN_USE_FPDF=$dolibarr_pdf_force_fpdf;
|
||||
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user