Merge pull request #9461 from grandoc/new_branch_11_09_2018
New branch 11 09 2018
This commit is contained in:
commit
81f4bae159
@ -34,12 +34,12 @@ class box_project extends ModeleBoxes
|
||||
var $boximg="object_projectpub";
|
||||
var $boxlabel;
|
||||
//var $depends = array("projet");
|
||||
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
|
||||
var $param;
|
||||
|
||||
var $info_box_head = array();
|
||||
@ -54,8 +54,9 @@ class box_project extends ModeleBoxes
|
||||
function __construct($db,$param='')
|
||||
{
|
||||
global $user, $langs;
|
||||
$langs->load("boxes");
|
||||
$langs->load("projects");
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('boxes', 'projects'));
|
||||
|
||||
$this->db = $db;
|
||||
$this->boxlabel="Projects";
|
||||
|
||||
@ -271,9 +271,8 @@ class FormMail extends Form
|
||||
|
||||
if (! is_object($form)) $form=new Form($this->db);
|
||||
|
||||
$langs->load("other");
|
||||
$langs->load("mails");
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('other', 'mails'));
|
||||
|
||||
// Clear temp files. Must be done at beginning, before call of triggers
|
||||
if (GETPOST('mode','alpha') == 'init' || (GETPOST('modelmailselected','alpha') && GETPOST('modelmailselected','alpha') != '-1'))
|
||||
|
||||
@ -126,9 +126,8 @@ class FormTicket
|
||||
{
|
||||
global $conf, $langs, $user, $hookmanager;
|
||||
|
||||
$langs->load("other");
|
||||
$langs->load("mails");
|
||||
$langs->load("ticket");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('other', 'mails', 'ticket'));
|
||||
|
||||
$form = new Form($this->db);
|
||||
$formcompany = new FormCompany($this->db);
|
||||
|
||||
@ -33,8 +33,8 @@ function categories_prepare_head($object,$type)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
$langs->load("categories");
|
||||
$langs->load("products");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('categories', 'products'));
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
@ -48,7 +48,7 @@ function categories_prepare_head($object,$type)
|
||||
$head[$h][1] = $langs->trans("Photos");
|
||||
$head[$h][2] = 'photos';
|
||||
$h++;
|
||||
|
||||
|
||||
if (! empty($conf->global->MAIN_MULTILANGS))
|
||||
{
|
||||
$head[$h][0] = DOL_URL_ROOT.'/categories/traduction.php?id='.$object->id.'&type='.$type;
|
||||
@ -56,7 +56,7 @@ function categories_prepare_head($object,$type)
|
||||
$head[$h][2] = 'translation';
|
||||
$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
|
||||
@ -87,7 +87,7 @@ function categoriesadmin_prepare_head()
|
||||
$head[$h][1] = $langs->trans("Setup");
|
||||
$head[$h][2] = 'setup';
|
||||
$h++;
|
||||
|
||||
|
||||
$head[$h][0] = DOL_URL_ROOT.'/categories/admin/categorie_extrafields.php';
|
||||
$head[$h][1] = $langs->trans("ExtraFieldsCategories");
|
||||
$head[$h][2] = 'attributes_categories';
|
||||
|
||||
@ -194,9 +194,10 @@ function dol_print_file($langs,$filename,$searchalt=0)
|
||||
*/
|
||||
function dol_print_object_info($object, $usetable=0)
|
||||
{
|
||||
global $langs,$db;
|
||||
$langs->load("other");
|
||||
$langs->load("admin");
|
||||
global $langs, $db;
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('other', 'admin'));
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||
|
||||
|
||||
@ -62,7 +62,6 @@ function payment_prepare_head(Paiement $object)
|
||||
*/
|
||||
function payment_supplier_prepare_head(Paiement $object)
|
||||
{
|
||||
|
||||
global $langs, $conf;
|
||||
|
||||
$h = 0;
|
||||
@ -127,8 +126,9 @@ function showOnlinePaymentUrl($type,$ref)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("payment");
|
||||
$langs->load("paybox");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('payment', 'paybox'));
|
||||
|
||||
$servicename='Online';
|
||||
|
||||
$out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
|
||||
|
||||
@ -190,8 +190,9 @@ function product_prepare_head($object)
|
||||
function productlot_prepare_head($object)
|
||||
{
|
||||
global $db, $langs, $conf, $user;
|
||||
$langs->load("products");
|
||||
$langs->load("productbatch");
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("products","productbatch"));
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
@ -200,7 +201,7 @@ function productlot_prepare_head($object)
|
||||
$head[$h][1] = $langs->trans("Card");
|
||||
$head[$h][2] = 'card';
|
||||
$h++;
|
||||
|
||||
|
||||
// Attachments
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
||||
|
||||
@ -36,8 +36,8 @@ function shipping_prepare_head($object)
|
||||
{
|
||||
global $db, $langs, $conf, $user;
|
||||
|
||||
$langs->load("sendings");
|
||||
$langs->load("deliveries");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("sendings","deliveries"));
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
@ -121,8 +121,8 @@ function delivery_prepare_head($object)
|
||||
{
|
||||
global $langs, $conf, $user;
|
||||
|
||||
$langs->load("sendings");
|
||||
$langs->load("deliveries");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("sendings","deliveries"));
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
@ -28,8 +28,9 @@ function showOnlineSignatureUrl($type,$ref)
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
$langs->load("payment");
|
||||
$langs->load("paybox");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("payment","paybox"));
|
||||
|
||||
$servicename='Online';
|
||||
|
||||
$out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlineSignature",$servicename).'<br>';
|
||||
|
||||
@ -32,8 +32,9 @@
|
||||
function supplier_proposal_prepare_head($object)
|
||||
{
|
||||
global $db, $langs, $conf, $user;
|
||||
$langs->load("supplier_proposal");
|
||||
$langs->load("compta");
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("supplier_proposal","compta"));
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
|
||||
@ -80,8 +80,8 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
||||
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
||||
if ($showmode)
|
||||
{
|
||||
$langs->load("companies");
|
||||
$langs->load("suppliers");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies","suppliers"));
|
||||
|
||||
$classname="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "companies") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
|
||||
@ -174,8 +174,8 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0,$mode
|
||||
$showmode=isVisibleToUserType($type_user, $tmpentry, $listofmodulesforexternal);
|
||||
if ($showmode)
|
||||
{
|
||||
$langs->load("compta");
|
||||
$langs->load("banks");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("compta","banks"));
|
||||
|
||||
$classname="";
|
||||
if ($_SESSION["mainmenu"] && $_SESSION["mainmenu"] == "bank") { $classname='class="tmenusel"'; $_SESSION['idmenu']=''; }
|
||||
@ -528,8 +528,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu=="setup")
|
||||
{
|
||||
$langs->load("admin");
|
||||
$langs->load("help");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin","help"));
|
||||
|
||||
$warnpicto='';
|
||||
if (empty($conf->global->MAIN_INFO_SOCIETE_NOM) || empty($conf->global->MAIN_INFO_SOCIETE_COUNTRY))
|
||||
@ -1176,10 +1176,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
*/
|
||||
if ($mainmenu == 'bank')
|
||||
{
|
||||
$langs->load("withdrawals");
|
||||
$langs->load("banks");
|
||||
$langs->load("bills");
|
||||
$langs->load('categories');
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("withdrawals","banks","bills","categories"));
|
||||
|
||||
// Bank-Caisse
|
||||
if (! empty($conf->banque->enabled))
|
||||
@ -1402,8 +1400,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
// Leave/Holiday/Vacation module
|
||||
if (! empty($conf->holiday->enabled))
|
||||
{
|
||||
$langs->load("holiday");
|
||||
$langs->load("trips");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("holiday","trips"));
|
||||
|
||||
$newmenu->add("/holiday/list.php?leftmenu=hrm", $langs->trans("CPTitreMenu"), 0, $user->rights->holiday->read, '', $mainmenu, 'hrm');
|
||||
$newmenu->add("/holiday/card.php?action=request", $langs->trans("New"), 1,$user->rights->holiday->write);
|
||||
@ -1499,8 +1497,8 @@ function print_left_eldy_menu($db,$menu_array_before,$menu_array_after,&$tabMenu
|
||||
{
|
||||
if (! empty($conf->adherent->enabled))
|
||||
{
|
||||
$langs->load("members");
|
||||
$langs->load("compta");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("members","compta"));
|
||||
|
||||
$newmenu->add("/adherents/index.php?leftmenu=members&mainmenu=members",$langs->trans("Members"),0,$user->rights->adherent->lire, '', $mainmenu, 'members');
|
||||
$newmenu->add("/adherents/card.php?leftmenu=members&action=create",$langs->trans("NewMember"),1,$user->rights->adherent->creer);
|
||||
|
||||
@ -68,8 +68,9 @@ class CommActionRapport
|
||||
function __construct($db, $month, $year)
|
||||
{
|
||||
global $conf,$langs;
|
||||
$langs->load("commercial");
|
||||
$langs->load("projects");
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("commercial","projects"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->description = "";
|
||||
|
||||
@ -47,10 +47,8 @@ class pdf_ban extends ModeleBankAccountDoc
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bank");
|
||||
$langs->load("withdrawals");
|
||||
$langs->load("companies");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","bank","withdrawals","companies"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "ban";
|
||||
|
||||
@ -53,8 +53,8 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("companies");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","companies"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "ODT templates";
|
||||
@ -98,8 +98,8 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("errors");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("errors","companies"));
|
||||
|
||||
$form = new Form($this->db);
|
||||
|
||||
|
||||
@ -52,8 +52,8 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("companies");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","companies"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "ODT templates";
|
||||
|
||||
@ -54,8 +54,8 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
{
|
||||
global $conf,$langs,$mysoc;
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("companies");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","companies"));
|
||||
|
||||
$this->db = $db;
|
||||
$this->name = "ODT templates";
|
||||
@ -99,8 +99,8 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
{
|
||||
global $conf,$langs;
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("errors");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("errors","companies"));
|
||||
|
||||
$form = new Form($this->db);
|
||||
|
||||
|
||||
@ -116,10 +116,9 @@ class mailing_contacts1 extends MailingTargets
|
||||
function formFilter()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("companies");
|
||||
$langs->load("commercial");
|
||||
$langs->load("suppliers");
|
||||
$langs->load("categories");
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("commercial","companies","suppliers","categories"));
|
||||
|
||||
$s='';
|
||||
|
||||
|
||||
@ -109,9 +109,9 @@ class mailing_fraise extends MailingTargets
|
||||
function formFilter()
|
||||
{
|
||||
global $conf, $langs;
|
||||
$langs->load("members");
|
||||
$langs->load("categories");
|
||||
$langs->load("companies");
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("members","companies","categories"));
|
||||
|
||||
$form=new Form($this->db);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user