Merge pull request #9582 from grandoc/new_branch_21_09_2018
Standardize and update code from New branch 21 09 2018
This commit is contained in:
commit
60c74a6255
@ -622,8 +622,9 @@ if (empty($reshook))
|
||||
// Set output language
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
// Get email content fro mtemplae
|
||||
// Get email content from template
|
||||
$arraydefaultmessage=null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_MEMBER_VALIDATION;
|
||||
|
||||
@ -693,8 +694,9 @@ if (empty($reshook))
|
||||
// Set output language
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
// Get email content fro mtemplae
|
||||
// Get email content from template
|
||||
$arraydefaultmessage=null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_CANCELATION;
|
||||
|
||||
@ -1384,6 +1386,7 @@ else
|
||||
// Set output language
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
// Get email content from template
|
||||
$arraydefaultmessage=null;
|
||||
@ -1444,8 +1447,9 @@ else
|
||||
// Set output language
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
// Get email content fro mtemplae
|
||||
// Get email content from template
|
||||
$arraydefaultmessage=null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_CANCELATION;
|
||||
|
||||
|
||||
@ -2628,6 +2628,7 @@ class Adherent extends CommonObject
|
||||
// Send reminder email
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($adherent->thirdparty->default_lang) ? $mysoc->default_lang : $adherent->thirdparty->default_lang);
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
dol_syslog("sendReminderForExpiredSubscription Language set to ".$outputlangs->defaultlang);
|
||||
|
||||
|
||||
@ -359,8 +359,9 @@ if ($user->rights->adherent->cotisation->creer && $action == 'subscription' && !
|
||||
// Set output language
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
// Get email content fro mtemplae
|
||||
// Get email content from template
|
||||
$arraydefaultmessage=null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION;
|
||||
|
||||
@ -1053,8 +1054,9 @@ if ($rowid > 0)
|
||||
// Set output language
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
// Get email content fro mtemplae
|
||||
// Get email content from template
|
||||
$arraydefaultmessage=null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION;
|
||||
|
||||
|
||||
@ -114,7 +114,7 @@ class pdf_sepamandate extends ModeleBankAccountDoc
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "withdrawals", "companies", "projects", "bills"));
|
||||
|
||||
if (! empty($conf->bank->dir_output))
|
||||
|
||||
@ -224,7 +224,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
// Translations
|
||||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "orders", "deliveries"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
@ -1239,7 +1239,7 @@ class pdf_einstein extends ModelePDFCommandes
|
||||
{
|
||||
global $conf,$langs,$hookmanager;
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "propal", "orders", "companies"));
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@ -216,6 +216,7 @@ class doc_generic_contract_odt extends ModelePDFContract
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
$outputlangs->charset_output='UTF-8';
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||
|
||||
if ($conf->contrat->dir_output)
|
||||
|
||||
@ -180,7 +180,7 @@ class pdf_strato extends ModelePDFContract
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "contracts"));
|
||||
|
||||
if ($conf->contrat->dir_output)
|
||||
@ -542,7 +542,7 @@ class pdf_strato extends ModelePDFContract
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "contract", "companies"));
|
||||
|
||||
pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
|
||||
|
||||
@ -83,6 +83,7 @@ class html_cerfafr extends ModeleDon
|
||||
|
||||
if (! is_object($outputlangs)) $outputlangs=$langs;
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "donations"));
|
||||
|
||||
$currency = !empty($currency) ? $currency : $conf->currency;
|
||||
|
||||
@ -227,6 +227,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
$outputlangs->charset_output='UTF-8';
|
||||
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||
|
||||
if ($conf->expedition->dir_output."/sending")
|
||||
|
||||
@ -165,7 +165,7 @@ class pdf_merou extends ModelePdfExpedition
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
|
||||
|
||||
if ($conf->expedition->dir_output)
|
||||
|
||||
@ -196,7 +196,7 @@ class pdf_rouget extends ModelePdfExpedition
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
|
||||
@ -211,7 +211,7 @@ class pdf_standard extends ModeleExpenseReport
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "trips", "projects", "dict"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
@ -568,9 +568,9 @@ class pdf_standard extends ModeleExpenseReport
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $conf,$langs,$hookmanager;
|
||||
global $conf, $langs, $hookmanager;
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "trips", "companies"));
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@ -239,7 +239,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
@ -1574,7 +1574,7 @@ class pdf_crabe extends ModelePDFFactures
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "propal", "companies"));
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@ -172,7 +172,7 @@ class pdf_soleil extends ModelePDFFicheinter
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "interventions", "dict", "companies"));
|
||||
|
||||
if ($conf->ficheinter->dir_output)
|
||||
|
||||
@ -195,7 +195,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
// Translations
|
||||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "sendings", "deliveries"));
|
||||
|
||||
if ($conf->expedition->dir_output)
|
||||
|
||||
@ -240,6 +240,7 @@ class doc_generic_product_odt extends ModelePDFProduct
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
$outputlangs->charset_output='UTF-8';
|
||||
|
||||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills"));
|
||||
|
||||
if ($conf->produit->dir_output)
|
||||
|
||||
@ -445,6 +445,7 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
$outputlangs->charset_output='UTF-8';
|
||||
|
||||
// Load translation files required by the page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "projects"));
|
||||
|
||||
if ($conf->projet->dir_output)
|
||||
|
||||
@ -214,7 +214,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
// For backward compatibility with FPDF, force output charset to ISO, because FPDF expect text to be encoded in ISO
|
||||
if (! empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output='ISO-8859-1';
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "dict", "companies", "bills", "products", "supplier_proposal"));
|
||||
|
||||
$nblignes = count($object->lines);
|
||||
@ -1280,9 +1280,9 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
||||
*/
|
||||
function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $conf,$langs;
|
||||
global $conf, $langs;
|
||||
|
||||
// Translations
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "supplier_proposal", "companies"));
|
||||
|
||||
$default_font_size = pdf_getPDFFontSize($outputlangs);
|
||||
|
||||
@ -33,12 +33,12 @@ class mod_ticket_universal extends ModeleNumRefTicket
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* @var string Nom du modele
|
||||
|
||||
@ -48,9 +48,9 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -50,9 +50,9 @@ class doc_generic_usergroup_odt extends ModelePDFUserGroup
|
||||
public $phpmin = array(5, 4);
|
||||
|
||||
/**
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
* Dolibarr version of the loaded document
|
||||
* @public string
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
|
||||
|
||||
@ -74,6 +74,7 @@ if ($action == 'presend')
|
||||
{
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang($newlang);
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array('commercial','bills','orders','contracts','members','propal','products','supplier_proposal','interventions'));
|
||||
}
|
||||
|
||||
|
||||
@ -277,8 +277,9 @@ if ($action == 'add')
|
||||
// Set output language
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
// Get email content fro mtemplae
|
||||
// Get email content from template
|
||||
$arraydefaultmessage=null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_AUTOREGISTER;
|
||||
|
||||
|
||||
@ -500,8 +500,9 @@ if ($ispaymentok)
|
||||
// Set output language
|
||||
$outputlangs = new Translate('', $conf);
|
||||
$outputlangs->setDefaultLang(empty($object->thirdparty->default_lang) ? $mysoc->default_lang : $object->thirdparty->default_lang);
|
||||
// Load traductions files requiredby by page
|
||||
$outputlangs->loadLangs(array("main", "members"));
|
||||
// Get email content from templae
|
||||
// Get email content from template
|
||||
$arraydefaultmessage=null;
|
||||
$labeltouse = $conf->global->ADHERENT_EMAIL_TEMPLATE_SUBSCRIPTION;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user