';
- print '| '.$langs->trans("Description").' | ';
+ print ''.$langs->trans("Description").' | ';
print '';
$text = $langs->trans("Value");
print $form->textwithpicto($text, $helptext, 1, 'help', '', 0, 2, 'idhelptext');
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index c686d5e3904..1cc0c209591 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -1964,7 +1964,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
if ($modulepart == 'medias' && !empty($dolibarr_main_data_root))
{
$accessallowed=1;
- $original_file=$dolibarr_main_data_root.'/medias/'.$original_file;
+ $original_file=$conf->medias->multidir_output[$entity].'/'.$original_file;
}
// Wrapping for *.log files, like when used with url http://.../document.php?modulepart=logs&file=dolibarr.log
elseif ($modulepart == 'logs' && !empty($dolibarr_main_data_root))
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index cb910ef7ae5..54d4022f4bc 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -3593,8 +3593,8 @@ function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $so
// Right
print ' | ';
- if ($sortfield) $options .= "&sortfield=".$sortfield;
- if ($sortorder) $options .= "&sortorder=".$sortorder;
+ if ($sortfield) $options .= "&sortfield=".$sortfield;
+ if ($sortorder) $options .= "&sortorder=".$sortorder;
// Show navigation bar
$pagelist = '';
if ($savlimit != 0 && ($page > 0 || $num > $limit))
diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php
index 550ec6ad534..472c040e450 100644
--- a/htdocs/core/lib/member.lib.php
+++ b/htdocs/core/lib/member.lib.php
@@ -100,7 +100,7 @@ function member_prepare_head(Adherent $object)
$head[$h][2] = 'agenda';
$h++;
}
-
+
complete_head_from_modules($conf,$langs,$object,$head,$h,'member','remove');
return $head;
@@ -152,6 +152,11 @@ function member_admin_prepare_head()
$head[$h][2] = 'general';
$h++;
+ $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/adherent_emails.php';
+ $head[$h][1] = $langs->trans("EMails");
+ $head[$h][2] = 'emails';
+ $h++;
+
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
@@ -168,9 +173,9 @@ function member_admin_prepare_head()
$head[$h][2] = 'attributes_type';
$h++;
- $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/public.php';
+ $head[$h][0] = DOL_URL_ROOT.'/adherents/admin/website.php';
$head[$h][1] = $langs->trans("BlankSubscriptionForm");
- $head[$h][2] = 'public';
+ $head[$h][2] = 'website';
$h++;
complete_head_from_modules($conf,$langs,'',$head,$h,'member_admin','remove');
diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php
index 630011ab3e0..49a1e909d91 100644
--- a/htdocs/core/lib/payments.lib.php
+++ b/htdocs/core/lib/payments.lib.php
@@ -88,6 +88,134 @@ function payment_supplier_prepare_head(Paiement $object) {
}
+/**
+ * Return string with full Url
+ *
+ * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...)
+ * @param string $ref Ref of object
+ * @return string Url string
+ */
+function showOnlinePaymentUrl($type,$ref)
+{
+ global $conf, $langs;
+
+ $langs->load("PAYMENT");
+ $langs->load("paybox");
+ $servicename='Online';
+
+ $out.=img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).' ';
+ $url=getOnlinePaymentUrl(0,$type,$ref);
+ $out.='';
+ $out.=ajax_autoselect("onlinepaymenturl", 0);
+ return $out;
+}
+
+
+/**
+ * Return string with full Url
+ *
+ * @param int $mode 0=True url, 1=Url formated with colors
+ * @param string $type Type of URL ('free', 'order', 'invoice', 'contractline', 'membersubscription' ...)
+ * @param string $ref Ref of object
+ * @param int $amount Amount
+ * @param string $freetag Free tag
+ * @return string Url string
+ */
+function getOnlinePaymentUrl($mode,$type,$ref='',$amount='9.99',$freetag='your_free_tag')
+{
+ global $conf;
+
+ $ref=str_replace(' ','',$ref);
+
+ if ($type == 'free')
+ {
+ $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?amount='.($mode?'':'').$amount.($mode?'':'').'&tag='.($mode?'':'').$freetag.($mode?'':'');
+ if (! empty($conf->global->PAYMENT_SECURITY_TOKEN))
+ {
+ if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
+ else $out.='&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2);
+ }
+ }
+ if ($type == 'order')
+ {
+ $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=order&ref='.($mode?'':'');
+ if ($mode == 1) $out.='order_ref';
+ if ($mode == 0) $out.=urlencode($ref);
+ $out.=($mode?'':'');
+ if (! empty($conf->global->PAYMENT_SECURITY_TOKEN))
+ {
+ if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
+ else
+ {
+ $out.='&securekey='.($mode?'':'');
+ if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + order_ref)";
+ if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2);
+ $out.=($mode?'':'');
+ }
+ }
+ }
+ if ($type == 'invoice')
+ {
+ $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=invoice&ref='.($mode?'':'');
+ if ($mode == 1) $out.='invoice_ref';
+ if ($mode == 0) $out.=urlencode($ref);
+ $out.=($mode?'':'');
+ if (! empty($conf->global->PAYMENT_SECURITY_TOKEN))
+ {
+ if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
+ else
+ {
+ $out.='&securekey='.($mode?'':'');
+ if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + invoice_ref)";
+ if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2);
+ $out.=($mode?'':'');
+ }
+ }
+ }
+ if ($type == 'contractline')
+ {
+ $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=contractline&ref='.($mode?'':'');
+ if ($mode == 1) $out.='contractline_ref';
+ if ($mode == 0) $out.=urlencode($ref);
+ $out.=($mode?'':'');
+ if (! empty($conf->global->PAYMENT_SECURITY_TOKEN))
+ {
+ if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
+ else
+ {
+ $out.='&securekey='.($mode?'':'');
+ if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + contractline_ref)";
+ if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2);
+ $out.=($mode?'':'');
+ }
+ }
+ }
+ if ($type == 'membersubscription')
+ {
+ $out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode?'':'');
+ if ($mode == 1) $out.='member_ref';
+ if ($mode == 0) $out.=urlencode($ref);
+ $out.=($mode?'':'');
+ if (! empty($conf->global->PAYMENT_SECURITY_TOKEN))
+ {
+ if (empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) $out.='&securekey='.$conf->global->PAYMENT_SECURITY_TOKEN;
+ else
+ {
+ $out.='&securekey='.($mode?'':'');
+ if ($mode == 1) $out.="hash('".$conf->global->PAYMENT_SECURITY_TOKEN."' + '".$type."' + member_ref)";
+ if ($mode == 0) $out.= dol_hash($conf->global->PAYMENT_SECURITY_TOKEN . $type . $ref, 2);
+ $out.=($mode?'':'');
+ }
+ }
+ }
+
+ // For multicompany
+ $out.="&entity=".$conf->entity; // Check the entity because He may be the same reference in several entities
+
+ return $out;
+}
+
+
/**
* Show footer of company in HTML pages
diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql
index c7bce6ecf07..e51e6469fe6 100644
--- a/htdocs/core/menus/init_menu_auguria.sql
+++ b/htdocs/core/menus/init_menu_auguria.sql
@@ -250,7 +250,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2435__+MAX_llx_menu__, 'accountancy', 'balance', 2400__+MAX_llx_menu__, '/accountancy/bookkeeping/balance.php?mainmenu=accountancy&leftmenu=accountancy_balance', 'AccountBalance', 1, 'accountancy', '$user->rights->accounting->mouvements->lire', '', 0, 16, __ENTITY__);
-- Reports
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled', __HANDLER__, 'left', 2440__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2400__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'Reportings', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 17, __ENTITY__);
- insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__);
+ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2441__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'MenuReportInOut', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 18, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2443__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2441__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ByPredefinedAccountGroups', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 19, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2442__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2441__+MAX_llx_menu__, '/compta/resultat/result.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ByPersonalizedAccountGroups', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 20, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2444__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2440__+MAX_llx_menu__, '/compta/stats/index.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ReportTurnover', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 21, __ENTITY__);
@@ -259,7 +259,7 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->accounting->enabled && $leftmenu=="accountancy_report"', __HANDLER__, 'left', 2447__+MAX_llx_menu__, 'accountancy', 'accountancy_report', 2444__+MAX_llx_menu__, '/compta/stats/cabyprodserv.php?mainmenu=accountancy&leftmenu=accountancy_report', 'ByProductsAndServices', 3, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 24, __ENTITY__);
-- Accounting simple
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled', __HANDLER__, 'left', 2700__+MAX_llx_menu__, 'accountancy', 'ca', 9__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca&mainmenu=accountancy', 'Reportings', 0, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 11, __ENTITY__);
-insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2711__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'ReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
+insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2711__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/resultat/index.php?leftmenu=ca', 'MenuReportInOut', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2712__+MAX_llx_menu__, 'accountancy', '', 2701__+MAX_llx_menu__, '/compta/resultat/clientfourn.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2713__+MAX_llx_menu__, 'accountancy', '', 2700__+MAX_llx_menu__, '/compta/stats/index.php?leftmenu=ca', 'ReportTurnover', 1, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 1, __ENTITY__);
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->comptabilite->enabled && $leftmenu=="ca"', __HANDLER__, 'left', 2714__+MAX_llx_menu__, 'accountancy', '', 2703__+MAX_llx_menu__, '/compta/stats/casoc.php?leftmenu=ca', 'ByCompanies', 2, 'main', '$user->rights->compta->resultat->lire || $user->rights->accounting->comptarapport->lire', '', 0, 0, __ENTITY__);
diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php
index 56e9039d358..5f9550c9e78 100644
--- a/htdocs/core/menus/standard/eldy.lib.php
+++ b/htdocs/core/menus/standard/eldy.lib.php
@@ -1122,7 +1122,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
$newmenu->add("/compta/resultat/index.php?mainmenu=accountancy&leftmenu=accountancy_report",$langs->trans("Reportings"),1,$user->rights->accounting->comptarapport->lire, '', $mainmenu, 'ca');
- if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report",$langs->trans("ReportInOut"),2,$user->rights->accounting->comptarapport->lire);
+ if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/index.php?leftmenu=accountancy_report",$langs->trans("MenuReportInOut"),2,$user->rights->accounting->comptarapport->lire);
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=accountancy_report",$langs->trans("ByPredefinedAccountGroups"),3,$user->rights->accounting->comptarapport->lire);
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/resultat/result.php?leftmenu=accountancy_report",$langs->trans("ByPersonalizedAccountGroups"),3,$user->rights->accounting->comptarapport->lire);
if ($usemenuhider || empty($leftmenu) || preg_match('/accountancy_report/',$leftmenu)) $newmenu->add("/compta/stats/index.php?leftmenu=accountancy_report",$langs->trans("ReportTurnover"),2,$user->rights->accounting->comptarapport->lire);
@@ -1139,7 +1139,7 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
// Bilan, resultats
$newmenu->add("/compta/resultat/index.php?leftmenu=report&mainmenu=accountancy",$langs->trans("Reportings"),0,$user->rights->compta->resultat->lire, '', $mainmenu, 'ca');
- if ($usemenuhider || empty($leftmenu) || preg_match('/report/',$leftmenu)) $newmenu->add("/compta/resultat/index.php?leftmenu=report",$langs->trans("ReportInOut"),1,$user->rights->compta->resultat->lire);
+ if ($usemenuhider || empty($leftmenu) || preg_match('/report/',$leftmenu)) $newmenu->add("/compta/resultat/index.php?leftmenu=report",$langs->trans("MenuReportInOut"),1,$user->rights->compta->resultat->lire);
if ($usemenuhider || empty($leftmenu) || preg_match('/report/',$leftmenu)) $newmenu->add("/compta/resultat/clientfourn.php?leftmenu=report",$langs->trans("ByCompanies"),2,$user->rights->compta->resultat->lire);
/* On verra ca avec module compabilite expert
if ($usemenuhider || empty($leftmenu) || preg_match('/report/',$leftmenu)) $newmenu->add("/compta/resultat/compteres.php?leftmenu=report","Compte de resultat",2,$user->rights->compta->resultat->lire);
diff --git a/htdocs/core/modules/syslog/mod_syslog_syslog.php b/htdocs/core/modules/syslog/mod_syslog_syslog.php
index e0283ac9a9f..1f2f499fbac 100644
--- a/htdocs/core/modules/syslog/mod_syslog_syslog.php
+++ b/htdocs/core/modules/syslog/mod_syslog_syslog.php
@@ -49,7 +49,7 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
public function isActive()
{
global $conf;
-
+
// This function does not exists on some ISP (Ex: Free in France)
if (!function_exists('openlog')) return 0;
@@ -81,15 +81,15 @@ class mod_syslog_syslog extends LogHandler implements LogHandlerInterface
*/
public function checkConfiguration()
{
- global $langs;
+ global $conf, $langs;
$errors = array();
- $facility = SYSLOG_FACILITY;
+ $facility = constant($conf->global->SYSLOG_FACILITY);
if ($facility)
{
// Only LOG_USER supported on Windows
- if (! empty($_SERVER["WINDIR"])) $facility='LOG_USER';
+ if (! empty($_SERVER["WINDIR"])) $facility=constant('LOG_USER');
dol_syslog("admin/syslog: facility ".$facility);
}
diff --git a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
index 38d9ce62f50..36d71568566 100644
--- a/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
+++ b/htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php
@@ -313,7 +313,7 @@ class doc_generic_user_odt extends ModelePDFUser
{
$socobject=$object->client;
}
-
+
// Open and load template
require_once ODTPHP_PATH.'odf.php';
try {
@@ -332,7 +332,7 @@ class doc_generic_user_odt extends ModelePDFUser
$this->error=$e->getMessage();
return -1;
}
-
+
// Make substitutions into odt
$array_user=$this->get_substitutionarray_user($object,$outputlangs);
$array_soc=$this->get_substitutionarray_mysoc($mysoc,$outputlangs);
@@ -366,7 +366,7 @@ class doc_generic_user_odt extends ModelePDFUser
{
}
}
-
+
// Replace labels translated
$tmparray=$outputlangs->get_translations_for_substitutions();
foreach($tmparray as $key=>$value)
@@ -422,12 +422,13 @@ class doc_generic_user_odt extends ModelePDFUser
return -1;
}
- function get_substitutionarray_object($object,$outputlangs) {
+ function get_substitutionarray_object($object,$outputlangs,$array_key='object') {
+ $array_other=array();
foreach($object as $key => $value) {
- if(!is_array($value) && !is_object($value)) {
- $array_other['object_'.$key] = $value;
+ if (!is_array($value) && !is_object($value)) {
+ $array_other[$array_key.'_'.$key] = $value;
}
- }
+ }
return $array_other;
}
diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php
index d6defba0fa9..c7b3ea7342f 100644
--- a/htdocs/core/tpl/contacts.tpl.php
+++ b/htdocs/core/tpl/contacts.tpl.php
@@ -35,13 +35,13 @@ elseif ($module == 'project') { $permission=$user->rights->projet->creer; }
elseif ($module == 'action') { $permission=$user->rights->agenda->myactions->create; }
elseif ($module == 'shipping') { $permission=$user->rights->expedition->creer; }
elseif ($module == 'project_task') { $permission=$user->rights->projet->creer; }
-elseif (! isset($permission) && isset($user->rights->$module->creer))
-{
- $permission=$user->rights->$module->creer;
+elseif (! isset($permission) && isset($user->rights->$module->creer))
+{
+ $permission=$user->rights->$module->creer;
}
elseif (! isset($permission) && isset($user->rights->$module->write))
{
- $permission=$user->rights->$module->write;
+ $permission=$user->rights->$module->write;
}
$formcompany= new FormCompany($db);
@@ -55,8 +55,8 @@ $userstatic=new User($db);
| ';
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index 1b78d7e399b..fa337bc73ca 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1487,7 +1487,7 @@ if ($action == 'create')
});
';
}
- print ' '.$langs->trans("AddThirdParty").'';
+ print ' '.$langs->trans("AddThirdParty").'';
}
print '
';
diff --git a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql
index 14b1e424469..9a0f30f9a38 100644
--- a/htdocs/install/mysql/migration/6.0.0-7.0.0.sql
+++ b/htdocs/install/mysql/migration/6.0.0-7.0.0.sql
@@ -42,6 +42,11 @@ ALTER TABLE llx_facture_rec ADD COLUMN suspended integer DEFAULT 0;
ALTER TABLE llx_facture_rec MODIFY COLUMN titre VARCHAR(100);
+ALTER TABLE llx_contrat MODIFY COLUMN ref varchar(50);
+ALTER TABLE llx_contrat MODIFY COLUMN ref_customer varchar(50);
+ALTER TABLE llx_contrat MODIFY COLUMN ref_supplier varchar(50);
+ALTER TABLE llx_contrat MODIFY COLUMN ref_ext varchar(50);
+
UPDATE llx_c_email_templates SET position = 0 WHERE position IS NULL;
diff --git a/htdocs/install/mysql/tables/llx_contrat.sql b/htdocs/install/mysql/tables/llx_contrat.sql
index 60a6b574d44..67c535ef6f2 100644
--- a/htdocs/install/mysql/tables/llx_contrat.sql
+++ b/htdocs/install/mysql/tables/llx_contrat.sql
@@ -21,10 +21,10 @@
create table llx_contrat
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
- ref varchar(30), -- contrat reference
- ref_customer varchar(30), -- customer contract ref
- ref_supplier varchar(30), -- supplier contract ref
- ref_ext varchar(30), -- external contract ref
+ ref varchar(50), -- contrat reference
+ ref_customer varchar(50), -- customer contract ref
+ ref_supplier varchar(50), -- supplier contract ref
+ ref_ext varchar(50), -- external contract ref
entity integer DEFAULT 1 NOT NULL, -- multi company id
tms timestamp,
datec datetime, -- creation date
diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php
index 80162f24b5c..135d4b83caa 100644
--- a/htdocs/install/upgrade2.php
+++ b/htdocs/install/upgrade2.php
@@ -375,39 +375,40 @@ if (! GETPOST('action','aZ09') || preg_match('/upgrade/i',GETPOST('action','aZ09
}
}
- // Code executed only if migrate is LAST ONE. Must always be done.
- if (versioncompare($versiontoarray,$versionranarray) >= 0 || versioncompare($versiontoarray,$versionranarray) <= -3)
- {
- // Reload modules (this must be always done and only into last targeted version, because code to reload module may need table structure of last version)
- $listofmodule=array(
- 'MAIN_MODULE_AGENDA'=>'newboxdefonly',
- 'MAIN_MODULE_BARCODE'=>'newboxdefonly',
- 'MAIN_MODULE_CRON'=>'newboxdefonly',
- 'MAIN_MODULE_COMMANDE'=>'newboxdefonly',
- 'MAIN_MODULE_DEPLACEMENT'=>'newboxdefonly',
- 'MAIN_MODULE_DON'=>'newboxdefonly',
- 'MAIN_MODULE_ECM'=>'newboxdefonly',
- 'MAIN_MODULE_FACTURE'=>'newboxdefonly',
- 'MAIN_MODULE_FOURNISSEUR'=>'newboxdefonly',
- 'MAIN_MODULE_HOLIDAY'=>'newboxdefonly',
- 'MAIN_MODULE_OPENSURVEY'=>'newboxdefonly',
- 'MAIN_MODULE_PAYBOX'=>'newboxdefonly',
- 'MAIN_MODULE_PRODUIT'=>'newboxdefonly',
- 'MAIN_MODULE_SOCIETE'=>'newboxdefonly',
- 'MAIN_MODULE_SERVICE'=>'newboxdefonly',
- 'MAIN_MODULE_USER'=>'newboxdefonly',
- 'MAIN_MODULE_ACCOUNTING'=>'newboxdefonly',
- 'MAIN_MODULE_BARCODE'=>'newboxdefonly',
- 'MAIN_MODULE_CRON'=>'newboxdefonly',
- 'MAIN_MODULE_PRINTING'=>'newboxdefonly',
+ // Code executed only if migrate is LAST ONE. Must always be done.
+ if (versioncompare($versiontoarray,$versionranarray) >= 0 || versioncompare($versiontoarray,$versionranarray) <= -3)
+ {
+ // Reload modules (this must be always done and only into last targeted version, because code to reload module may need table structure of last version)
+ $listofmodule=array(
+ 'MAIN_MODULE_AGENDA'=>'newboxdefonly',
+ 'MAIN_MODULE_BARCODE'=>'newboxdefonly',
+ 'MAIN_MODULE_CRON'=>'newboxdefonly',
+ 'MAIN_MODULE_COMMANDE'=>'newboxdefonly',
+ 'MAIN_MODULE_DEPLACEMENT'=>'newboxdefonly',
+ 'MAIN_MODULE_DON'=>'newboxdefonly',
+ 'MAIN_MODULE_ECM'=>'newboxdefonly',
+ 'MAIN_MODULE_FACTURE'=>'newboxdefonly',
+ 'MAIN_MODULE_FOURNISSEUR'=>'newboxdefonly',
+ 'MAIN_MODULE_HOLIDAY'=>'newboxdefonly',
+ 'MAIN_MODULE_OPENSURVEY'=>'newboxdefonly',
+ 'MAIN_MODULE_PAYBOX'=>'newboxdefonly',
+ 'MAIN_MODULE_PRODUIT'=>'newboxdefonly',
+ 'MAIN_MODULE_SOCIETE'=>'newboxdefonly',
+ 'MAIN_MODULE_SERVICE'=>'newboxdefonly',
+ 'MAIN_MODULE_USER'=>'newboxdefonly',
+ 'MAIN_MODULE_ACCOUNTING'=>'newboxdefonly',
+ 'MAIN_MODULE_BARCODE'=>'newboxdefonly',
+ 'MAIN_MODULE_CRON'=>'newboxdefonly',
+ 'MAIN_MODULE_PRINTING'=>'newboxdefonly',
+ 'MAIN_MODULE_SALARIES'=>'newboxdefonly',
- 'MAIN_MODULE_USER'=>'newboxdefonly', //This one must be always done and only into last targeted version)
- );
- migrate_reload_modules($db,$langs,$conf,$listofmodule);
+ 'MAIN_MODULE_USER'=>'newboxdefonly', //This one must be always done and only into last targeted version)
+ );
+ migrate_reload_modules($db,$langs,$conf,$listofmodule);
- // Reload menus (this must be always and only into last targeted version)
- migrate_reload_menu($db,$langs,$conf,$versionto);
- }
+ // Reload menus (this must be always and only into last targeted version)
+ migrate_reload_menu($db,$langs,$conf,$versionto);
+ }
// Can force activation of some module during migration with paramater 'enablemodules=MAIN_MODULE_XXX,MAIN_MODULE_YYY,...'
if (! $error && $enablemodules)
@@ -4117,216 +4118,227 @@ function migrate_delete_old_dir($db,$langs,$conf)
*/
function migrate_reload_modules($db,$langs,$conf,$listofmodule=array(),$force=0)
{
- dolibarr_install_syslog("upgrade2::migrate_reload_modules force=".$force);
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules force=".$force);
- // If no info is provided, we reload all modules with mode newboxdefonly.
- if (count($listofmodule) == 0)
- {
- $listofmodule=array(
- 'MAIN_MODULE_AGENDA'=>'newboxdefonly',
- 'MAIN_MODULE_SOCIETE'=>'newboxdefonly',
- 'MAIN_MODULE_PRODUIT'=>'newboxdefonly',
- 'MAIN_MODULE_SERVICE'=>'newboxdefonly',
- 'MAIN_MODULE_COMMANDE'=>'newboxdefonly',
- 'MAIN_MODULE_FACTURE'=>'newboxdefonly',
- 'MAIN_MODULE_FOURNISSEUR'=>'newboxdefonly',
- 'MAIN_MODULE_HOLIDAY'=>'newboxdefonly',
- 'MAIN_MODULE_USER'=>'newboxdefonly',
- 'MAIN_MODULE_DEPLACEMENT'=>'newboxdefonly',
- 'MAIN_MODULE_DON'=>'newboxdefonly',
- 'MAIN_MODULE_ECM'=>'newboxdefonly',
- 'MAIN_MODULE_PAYBOX'=>'newboxdefonly',
- 'MAIN_MODULE_OPENSURVEY'=>'newboxdefonly'
- );
- }
+ // If no info is provided, we reload all modules with mode newboxdefonly.
+ if (count($listofmodule) == 0)
+ {
+ $listofmodule=array(
+ 'MAIN_MODULE_AGENDA'=>'newboxdefonly',
+ 'MAIN_MODULE_SOCIETE'=>'newboxdefonly',
+ 'MAIN_MODULE_PRODUIT'=>'newboxdefonly',
+ 'MAIN_MODULE_SERVICE'=>'newboxdefonly',
+ 'MAIN_MODULE_COMMANDE'=>'newboxdefonly',
+ 'MAIN_MODULE_FACTURE'=>'newboxdefonly',
+ 'MAIN_MODULE_FOURNISSEUR'=>'newboxdefonly',
+ 'MAIN_MODULE_HOLIDAY'=>'newboxdefonly',
+ 'MAIN_MODULE_USER'=>'newboxdefonly',
+ 'MAIN_MODULE_DEPLACEMENT'=>'newboxdefonly',
+ 'MAIN_MODULE_DON'=>'newboxdefonly',
+ 'MAIN_MODULE_ECM'=>'newboxdefonly',
+ 'MAIN_MODULE_PAYBOX'=>'newboxdefonly',
+ 'MAIN_MODULE_OPENSURVEY'=>'newboxdefonly',
+ 'MAIN_MODULE_SALARIES'=>'newboxdefonly'
+ );
+ }
- foreach($listofmodule as $moduletoreload => $reloadmode)
- {
- if (empty($moduletoreload) || (empty($conf->global->$moduletoreload) && ! $force)) continue; // Discard reload if module not enabled
+ foreach($listofmodule as $moduletoreload => $reloadmode)
+ {
+ if (empty($moduletoreload) || (empty($conf->global->$moduletoreload) && ! $force)) continue; // Discard reload if module not enabled
- $mod=null;
+ $mod=null;
- if ($moduletoreload == 'MAIN_MODULE_AGENDA')
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Agenda module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modAgenda.class.php';
- if ($res) {
- $mod=new modAgenda($db);
- $mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_API')
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Rest API module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modApi.class.php';
- if ($res) {
- $mod=new modApi($db);
- //$mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_BARCODE')
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Barcode module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modBarcode.class.php';
- if ($res) {
- $mod=new modBarcode($db);
- $mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_CRON')
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Cron module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCron.class.php';
- if ($res) {
- $mod=new modCron($db);
- $mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_SOCIETE')
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Societe module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modSociete.class.php';
- if ($res) {
- $mod=new modSociete($db);
- $mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_PRODUIT') // Permission has changed into 2.7
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Produit module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modProduct.class.php';
- if ($res) {
- $mod=new modProduct($db);
- //$mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_SERVICE') // Permission has changed into 2.7
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Service module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php';
- if ($res) {
- $mod=new modService($db);
- //$mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_COMMANDE') // Permission has changed into 2.9
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Commande module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php';
- if ($res) {
- $mod=new modCommande($db);
- //$mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_FACTURE') // Permission has changed into 2.9
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Facture module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php';
- if ($res) {
- $mod=new modFacture($db);
- //$mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_FOURNISSEUR') // Permission has changed into 2.9
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Fournisseur module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
- if ($res) {
- $mod=new modFournisseur($db);
- //$mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_HOLIDAY') // Permission and tabs has changed into 3.8
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Leave Request module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modHoliday.class.php';
- if ($res) {
- $mod=new modHoliday($db);
- $mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_DEPLACEMENT') // Permission has changed into 3.0
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Deplacement module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modDeplacement.class.php';
- if ($res) {
- $mod=new modDeplacement($db);
- //$mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_DON') // Permission has changed into 3.0
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Don module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modDon.class.php';
- if ($res) {
- $mod=new modDon($db);
- //$mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_ECM') // Permission has changed into 3.0 and 3.1
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate ECM module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php';
- if ($res) {
- $mod=new modECM($db);
- $mod->remove('noboxes'); // We need to remove because a permission id has been removed
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_PAYBOX') // Permission has changed into 3.0
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Paybox module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modPaybox.class.php';
- if ($res) {
- $mod=new modPaybox($db);
- $mod->remove('noboxes'); // We need to remove because id of module has changed
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_OPENSURVEY') // Permission has changed into 3.0
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Opensurvey module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modOpenSurvey.class.php';
- if ($res) {
- $mod=new modOpenSurvey($db);
- $mod->remove('noboxes'); // We need to remove because menu entries has changed
- $mod->init($reloadmode);
- }
- }
- if ($moduletoreload == 'MAIN_MODULE_USER') // Permission has changed into 3.0
- {
- dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate User module");
- $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modUser.class.php';
- if ($res) {
- $mod=new modUser($db);
- //$mod->remove('noboxes');
- $mod->init($reloadmode);
- }
- }
+ if ($moduletoreload == 'MAIN_MODULE_AGENDA')
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Agenda module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modAgenda.class.php';
+ if ($res) {
+ $mod=new modAgenda($db);
+ $mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_API')
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Rest API module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modApi.class.php';
+ if ($res) {
+ $mod=new modApi($db);
+ //$mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_BARCODE')
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Barcode module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modBarcode.class.php';
+ if ($res) {
+ $mod=new modBarcode($db);
+ $mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_CRON')
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Cron module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCron.class.php';
+ if ($res) {
+ $mod=new modCron($db);
+ $mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_SOCIETE')
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Societe module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modSociete.class.php';
+ if ($res) {
+ $mod=new modSociete($db);
+ $mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_PRODUIT') // Permission has changed into 2.7
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Produit module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modProduct.class.php';
+ if ($res) {
+ $mod=new modProduct($db);
+ //$mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_SERVICE') // Permission has changed into 2.7
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Service module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php';
+ if ($res) {
+ $mod=new modService($db);
+ //$mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_COMMANDE') // Permission has changed into 2.9
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Commande module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php';
+ if ($res) {
+ $mod=new modCommande($db);
+ //$mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_FACTURE') // Permission has changed into 2.9
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Facture module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFacture.class.php';
+ if ($res) {
+ $mod=new modFacture($db);
+ //$mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_FOURNISSEUR') // Permission has changed into 2.9
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Fournisseur module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modFournisseur.class.php';
+ if ($res) {
+ $mod=new modFournisseur($db);
+ //$mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_HOLIDAY') // Permission and tabs has changed into 3.8
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Leave Request module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modHoliday.class.php';
+ if ($res) {
+ $mod=new modHoliday($db);
+ $mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_DEPLACEMENT') // Permission has changed into 3.0
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Deplacement module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modDeplacement.class.php';
+ if ($res) {
+ $mod=new modDeplacement($db);
+ //$mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_DON') // Permission has changed into 3.0
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Don module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modDon.class.php';
+ if ($res) {
+ $mod=new modDon($db);
+ //$mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_ECM') // Permission has changed into 3.0 and 3.1
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate ECM module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modECM.class.php';
+ if ($res) {
+ $mod=new modECM($db);
+ $mod->remove('noboxes'); // We need to remove because a permission id has been removed
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_PAYBOX') // Permission has changed into 3.0
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Paybox module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modPaybox.class.php';
+ if ($res) {
+ $mod=new modPaybox($db);
+ $mod->remove('noboxes'); // We need to remove because id of module has changed
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_OPENSURVEY') // Permission has changed into 3.0
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Opensurvey module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modOpenSurvey.class.php';
+ if ($res) {
+ $mod=new modOpenSurvey($db);
+ $mod->remove('noboxes'); // We need to remove because menu entries has changed
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_SALARIES') // Permission has changed into 6.0
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Salaries module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modSalaries.class.php';
+ if ($res) {
+ $mod=new modSalaries($db);
+ //$mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
+ if ($moduletoreload == 'MAIN_MODULE_USER') // Permission has changed into 3.0
+ {
+ dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate User module");
+ $res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modUser.class.php';
+ if ($res) {
+ $mod=new modUser($db);
+ //$mod->remove('noboxes');
+ $mod->init($reloadmode);
+ }
+ }
if (! empty($mod) && is_object($mod))
{
- print '