diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 1526a26fa2e..1753a82f38c 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -2304,15 +2304,15 @@ if ($action == 'create') { if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; + if (!empty($newlang)) + { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($newlang); + $outputlangs->load('commercial'); + } // Build document if it not exists if (! $file || ! is_readable($file)) { - - if (! empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $result = propale_pdf_create($db, $object, GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db, $result); @@ -2341,9 +2341,9 @@ if ($action == 'create') { $formmail->withtocc = $liste; $formmail->withtoccc = (! empty($conf->global->MAIN_EMAIL_USECCC) ? $conf->global->MAIN_EMAIL_USECCC : false); if (empty($object->ref_client)) { - $formmail->withtopic = $langs->trans('SendPropalRef', '__PROPREF__'); + $formmail->withtopic = $outputlangs->trans('SendPropalRef', '__PROPREF__'); } else if (! empty($object->ref_client)) { - $formmail->withtopic = $langs->trans('SendPropalRef', '__PROPREF__(__REFCLIENT__)'); + $formmail->withtopic = $outputlangs->trans('SendPropalRef', '__PROPREF__(__REFCLIENT__)'); } $formmail->withfile = 2; $formmail->withbody = 1; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index c54e2f187e4..73088fb5ba9 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -2446,14 +2446,15 @@ if ($action == 'create' && $user->rights->commande->creer) { if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; + if (!empty($newlang)) + { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($newlang); + $outputlangs->load('commercial'); + } + // Build document if it not exists if (! $file || ! is_readable($file)) { - - if (! empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $result = commande_pdf_create($db, $object, GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db, $result); @@ -2482,9 +2483,9 @@ if ($action == 'create' && $user->rights->commande->creer) { $formmail->withtocc = $liste; $formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC; if (empty($object->ref_client)) { - $formmail->withtopic = $langs->trans('SendOrderRef', '__ORDERREF__'); + $formmail->withtopic = $outputlangs->trans('SendOrderRef', '__ORDERREF__'); } else if (! empty($object->ref_client)) { - $formmail->withtopic = $langs->trans('SendOrderRef', '__ORDERREF__(__REFCLIENT__)'); + $formmail->withtopic = $outputlangs->trans('SendOrderRef', '__ORDERREF__(__REFCLIENT__)'); } $formmail->withfile = 2; $formmail->withbody = 1; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index f9200f6f984..4693f4ee1fa 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -3672,14 +3672,15 @@ if ($action == 'create') if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; + if (!empty($newlang)) + { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($newlang); + $outputlangs->load('bills'); + } + // Build document if it not exists if (! $file || ! is_readable($file)) { - - if (! empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); - } - $result = facture_pdf_create($db, $object, GETPOST('model') ? GETPOST('model') : $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { dol_print_error($db, $result); @@ -3709,9 +3710,9 @@ if ($action == 'create') $formmail->withtocc = $liste; // List suggested for CC $formmail->withtoccc = $conf->global->MAIN_EMAIL_USECCC; if (empty($object->ref_client)) { - $formmail->withtopic = $langs->transnoentities($topicmail, '__FACREF__'); + $formmail->withtopic = $outputlangs->transnoentities($topicmail, '__FACREF__'); } else if (! empty($object->ref_client)) { - $formmail->withtopic = $langs->transnoentities($topicmail, '__FACREF__(__REFCLIENT__)'); + $formmail->withtopic = $outputlangs->transnoentities($topicmail, '__FACREF__(__REFCLIENT__)'); } $formmail->withfile = 2; $formmail->withbody = 1; diff --git a/htdocs/core/boxes/box_activity.php b/htdocs/core/boxes/box_activity.php index 986b6c2c2b9..f37079fa037 100644 --- a/htdocs/core/boxes/box_activity.php +++ b/htdocs/core/boxes/box_activity.php @@ -283,7 +283,7 @@ class box_activity extends ModeleBoxes // Add the sum in the bottom of the boxes $this->info_box_contents[$i][1] = array('td' => 'align="left" ', 'text' => $langs->trans("Total")." ".$textHead); - $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => price($totalnb,1,$langs,0,0,-1,$conf->currency)); + $this->info_box_contents[$i][2] = array('td' => 'align="right" ', 'text' => $totalnb); $this->info_box_contents[$i][3] = array('td' => 'align="right" ', 'text' => price($totalMnt,1,$langs,0,0,-1,$conf->currency)); $this->info_box_contents[$i][4] = array('td' => 'align="right" ', 'text' => ""); $this->info_box_contents[$i][5] = array('td' => 'align="right"', 'text' => ""); diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index c9aa1405ff7..56b243cd7ec 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -978,7 +978,7 @@ class ExtraFields { foreach ($fields_label as $field_toshow) { - $translabel=$langs->trans($field_toshow); + $translabel=$langs->trans($obj->field_toshow); if ($translabel!=$field_toshow) { $value.=dol_trunc($translabel,18).' '; }else { diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 0622d703b0f..6d9a799bbfa 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -4182,7 +4182,7 @@ class Form $ret.='
| '; } - $ret.=$object->$fieldref; + $ret.=dol_htmlentities($object->$fieldref); if ($morehtmlref) { $ret.=' '.$morehtmlref; diff --git a/htdocs/core/class/html.formmail.class.php b/htdocs/core/class/html.formmail.class.php index 75f6e80c111..fd1d90b1aef 100644 --- a/htdocs/core/class/html.formmail.class.php +++ b/htdocs/core/class/html.formmail.class.php @@ -564,6 +564,7 @@ class FormMail if (! empty($newlang)) { $outputlangs = new Translate("", $conf); $outputlangs->setDefaultLang($newlang); + $outputlangs->load('other'); } diff --git a/htdocs/core/class/MobileDetect.class.php b/htdocs/core/class/mobiledetect.class.php similarity index 98% rename from htdocs/core/class/MobileDetect.class.php rename to htdocs/core/class/mobiledetect.class.php index 1f1795f51ea..107a13f47e3 100644 --- a/htdocs/core/class/MobileDetect.class.php +++ b/htdocs/core/class/mobiledetect.class.php @@ -23,6 +23,9 @@ * @version 2.8.3 */ +/** + * Class to manage detection of type of terminal (classic, tablet, mobile) + */ class MobileDetect { /** @@ -548,10 +551,8 @@ class MobileDetect * @param string $userAgent Inject the User-Agent header. If null, will use HTTP_USER_AGENT * from the $headers array instead. */ - public function __construct( - array $headers = null, - $userAgent = null - ){ + public function __construct(array $headers = null, $userAgent = null) + { $this->setHttpHeaders($headers); $this->setUserAgent($userAgent); } @@ -572,8 +573,9 @@ class MobileDetect /** * Set the HTTP Headers. Must be PHP-flavored. This method will reset existing headers. * - * @param array $httpHeaders The headers to set. If null, then using PHP's _SERVER to extract - * the headers. The default null is left for backwards compatibilty. + * @param array $httpHeaders The headers to set. If null, then using PHP's _SERVER to extract + * the headers. The default null is left for backwards compatibilty. + * @return void */ public function setHttpHeaders($httpHeaders = null) { @@ -691,10 +693,11 @@ class MobileDetect * Set the detection type. Must be one of self::DETECTION_TYPE_MOBILE or * self::DETECTION_TYPE_EXTENDED. Otherwise, nothing is set. * - * @deprecated since version 2.6.9 + * @param string $type The type. Must be a self::DETECTION_TYPE_* constant. The default + * parameter is null which will default to self::DETECTION_TYPE_MOBILE. + * @return void * - * @param string $type The type. Must be a self::DETECTION_TYPE_* constant. The default - * parameter is null which will default to self::DETECTION_TYPE_MOBILE. + * @deprecated since version 2.6.9 */ public function setDetectionType($type = null) { @@ -869,11 +872,12 @@ class MobileDetect /** * Magic overloading method. * - * @method boolean is[...]() - * @param string $name - * @param array $arguments + * @param string $name Name + * @param array $arguments Arguments * @return mixed + * * @throws BadMethodCallException when the method doesn't exist and doesn't start with 'is' + * @method boolean is[...]() */ public function __call($name, $arguments) { @@ -915,9 +919,9 @@ class MobileDetect * If the key is found the try to match the corresponding * regex agains the User-Agent. * - * @param string $key - * @param null $userAgent deprecated - * @return mixed + * @param string $key Key + * @param string $userAgent deprecated + * @return mixed */ protected function matchUAAgainstKey($key, $userAgent = null) { @@ -941,8 +945,9 @@ class MobileDetect /** * Check if the device is mobile. * Returns true if any type of mobile device detected, including special ones - * @param null $userAgent deprecated - * @param null $httpHeaders deprecated + * + * @param string $userAgent deprecated + * @param string $httpHeaders deprecated * @return bool */ public function isMobile($userAgent = null, $httpHeaders = null) @@ -990,12 +995,13 @@ class MobileDetect /** * This method checks for a certain property in the * userAgent. - * @todo: The httpHeaders part is not yet used. * - * @param string $key - * @param string $userAgent deprecated - * @param string $httpHeaders deprecated + * @param string $key key + * @param string $userAgent deprecated + * @param string $httpHeaders deprecated * @return bool|int|null + * + * @todo: The httpHeaders part is not yet used. */ public function is($key, $userAgent = null, $httpHeaders = null) { @@ -1018,13 +1024,12 @@ class MobileDetect * because of the diversity of devices, vendors and * their conventions in representing the User-Agent or * the HTTP headers. - * * This method will be used to check custom regexes against * the User-Agent string. * - * @param $regex - * @param string $userAgent - * @return bool + * @param string $regex Regex + * @param string $userAgent User agent + * @return bool * * @todo: search in the HTTP headers too. */ @@ -1049,11 +1054,10 @@ class MobileDetect /** * Prepare the version number. * - * @todo Remove the error supression from str_replace() call. - * - * @param string $ver The string version, like "2.6.21.2152"; - * + * @param string $ver The string version, like "2.6.21.2152"; * @return float + * + * @todo Remove the error supression from str_replace() call. */ public function prepareVersionNo($ver) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index caa812a82a6..554f29d1f58 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -156,7 +156,7 @@ function getBrowserInfo() $firefox=0; if (in_array($name,array('firefox','iceweasel'))) $firefox=1; - include_once DOL_DOCUMENT_ROOT.'/core/class/MobileDetect.class.php'; + include_once DOL_DOCUMENT_ROOT.'/core/class/mobiledetect.class.php'; $detectmobile=new MobileDetect(); $phone=$detectmobile->isMobile(); $tablet=$detectmobile->isTablet(); diff --git a/htdocs/core/menus/init_menu_auguria.sql b/htdocs/core/menus/init_menu_auguria.sql index 48584247bbc..67d303b0b19 100644 --- a/htdocs/core/menus/init_menu_auguria.sql +++ b/htdocs/core/menus/init_menu_auguria.sql @@ -15,7 +15,7 @@ insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, left insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('comptabilite|accounting|facture|deplacement|don|tax', '$conf->comptabilite->enabled || $conf->accounting->enabled || $conf->facture->enabled || $conf->deplacement->enabled || $conf->don->enabled || $conf->tax->enabled', 6__+MAX_llx_menu__, __HANDLER__, 'top', 'accountancy', '', 0, '/compta/index.php?mainmenu=accountancy&leftmenu=', 'MenuFinancial', -1, 'compta', '$user->rights->compta->resultat->lire || $user->rights->accounting->plancompte->lire || $user->rights->facture->lire|| $user->rights->deplacement->lire || $user->rights->don->lire || $user->rights->tax->charges->lire', '', 2, 50, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('banque|prelevement', '$conf->banque->enabled || $conf->prelevement->enabled', 14__+MAX_llx_menu__, __HANDLER__, 'top', 'bank', '', 0, '/compta/bank/index.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', -1, 'banks', '$user->rights->banque->lire || $user->rights->prelevement->bons->lire', '', 0, 60, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('projet', '$conf->projet->enabled', 7__+MAX_llx_menu__, __HANDLER__, 'top', 'project', '', 0, '/projet/index.php?mainmenu=project&leftmenu=', 'Projects', -1, 'projects', '$user->rights->projet->lire', '', 2, 70, __ENTITY__); -insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('mailing|export|import', '$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run', '', 2, 90, __ENTITY__); +insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('mailing|export|import|opensurvey', '$conf->mailing->enabled || $conf->export->enabled || $conf->import->enabled || $conf->opensurvey->enabled', 8__+MAX_llx_menu__, __HANDLER__, 'top', 'tools', '', 0, '/core/tools.php?mainmenu=tools&leftmenu=', 'Tools', -1, 'other', '$user->rights->mailing->lire || $user->rights->export->lire || $user->rights->import->run || $user->rights->opensurvey->read', '', 2, 90, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('boutique', '! empty($conf->boutique->enabled)', 11__+MAX_llx_menu__, __HANDLER__, 'top', 'shop', '', 0, '/boutique/index.php?mainmenu=shop&leftmenu=', 'OSCommerce', -1, 'shop', '', '', 0, 100, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('adherent', '$conf->adherent->enabled', 13__+MAX_llx_menu__, __HANDLER__, 'top', 'members', '', 0, '/adherents/index.php?mainmenu=members&leftmenu=', 'Members', -1, 'members', '$user->rights->adherent->lire', '', 2, 110, __ENTITY__); insert into llx_menu (module, enabled, rowid, menu_handler, type, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('hrm', '$conf->holiday->enabled || $conf->deplacement->enabled', 15__+MAX_llx_menu__, __HANDLER__, 'top', 'hrm', '', 0, '/compta/hrm.php?mainmenu=hrm&leftmenu=', 'HRM', -1, 'holiday', '$user->rights->holiday->write || $user->rights->deplacement->lire', '', 0, 80, __ENTITY__); diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index 8ea68ea4146..294f1db1ac7 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -217,9 +217,9 @@ function print_eldy_menu($db,$atarget,$type_user,&$tabMenu,&$menu,$noout=0) // Tools - $tmpentry=array('enabled'=>(! empty($conf->mailing->enabled) || ! empty($conf->export->enabled) || ! empty($conf->import->enabled)), - 'perms'=>(! empty($user->rights->mailing->lire) || ! empty($user->rights->export->lire) || ! empty($user->rights->import->run)), - 'module'=>'mailing|export|import'); + $tmpentry=array('enabled'=>(! empty($conf->mailing->enabled) || ! empty($conf->export->enabled) || ! empty($conf->import->enabled) || ! empty($conf->opensurvey->enabled)), + 'perms'=>(! empty($user->rights->mailing->lire) || ! empty($user->rights->export->lire) || ! empty($user->rights->import->run) || ! empty($user->rights->opensurvey->read)), + 'module'=>'mailing|export|import|opensurvey'); $showmode=dol_eldy_showmenu($type_user, $tmpentry, $listofmodulesforexternal); if ($showmode) { diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index c2a2036c25f..406ba0ebc5d 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1590,15 +1590,16 @@ else if ($id || $ref) if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; + if (!empty($newlang)) + { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($newlang); + $outputlangs->load('sendings'); + } + // Build document if it not exists if (! $file || ! is_readable($file)) { - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - $result=expedition_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { @@ -1626,7 +1627,7 @@ else if ($id || $ref) $formmail->withto=GETPOST("sendto")?GETPOST("sendto"):$liste; $formmail->withtocc=$liste; $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; - $formmail->withtopic=$langs->trans('SendShippingRef','__SHIPPINGREF__'); + $formmail->withtopic=$outputlangs->trans('SendShippingRef','__SHIPPINGREF__'); $formmail->withfile=2; $formmail->withbody=1; $formmail->withdeliveryreceipt=1; diff --git a/htdocs/fichinter/fiche.php b/htdocs/fichinter/fiche.php index 637591d0606..d459b20767b 100644 --- a/htdocs/fichinter/fiche.php +++ b/htdocs/fichinter/fiche.php @@ -1645,15 +1645,16 @@ else if ($id > 0 || ! empty($ref)) if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; + if (!empty($newlang)) + { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($newlang); + $outputlangs->load('interventions'); + } + // Build document if it not exists if (! $file || ! is_readable($file)) { - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - $result=fichinter_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { @@ -1681,7 +1682,7 @@ else if ($id > 0 || ! empty($ref)) $formmail->withto=GETPOST("sendto")?GETPOST("sendto"):$liste; $formmail->withtocc=$liste; $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; - $formmail->withtopic=$langs->trans('SendInterventionRef','__FICHINTERREF__'); + $formmail->withtopic=$outputlangs->trans('SendInterventionRef','__FICHINTERREF__'); $formmail->withfile=2; $formmail->withbody=1; $formmail->withdeliveryreceipt=1; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index b576a10b1bb..e536c81f21c 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1998,15 +1998,16 @@ elseif (! empty($object->id)) if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; + if (!empty($newlang)) + { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($newlang); + $outputlangs->load('commercial'); + } + // Build document if it not exists if (! $file || ! is_readable($file)) { - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - $result=supplier_order_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { @@ -2035,7 +2036,7 @@ elseif (! empty($object->id)) $formmail->withto=GETPOST("sendto")?GETPOST("sendto"):$liste; $formmail->withtocc=$liste; $formmail->withtoccc=(! empty($conf->global->MAIN_EMAIL_USECCC)?$conf->global->MAIN_EMAIL_USECCC:false); - $formmail->withtopic=$langs->trans('SendOrderRef','__ORDERREF__'); + $formmail->withtopic=$outputlangs->trans('SendOrderRef','__ORDERREF__'); $formmail->withfile=2; $formmail->withbody=1; $formmail->withdeliveryreceipt=1; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 277d38c3d70..9c862bc5791 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -2264,15 +2264,16 @@ else if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->client->default_lang; + if (!empty($newlang)) + { + $outputlangs = new Translate('', $conf); + $outputlangs->setDefaultLang($newlang); + $outputlangs->load('bills'); + } + // Build document if it not exists if (! $file || ! is_readable($file)) { - if (! empty($newlang)) - { - $outputlangs = new Translate("",$conf); - $outputlangs->setDefaultLang($newlang); - } - $result=supplier_invoice_pdf_create($db, $object, GETPOST('model')?GETPOST('model'):$object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); if ($result <= 0) { @@ -2300,7 +2301,7 @@ else $formmail->withto=GETPOST("sendto")?GETPOST("sendto"):$liste; $formmail->withtocc=$liste; $formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC; - $formmail->withtopic=$langs->trans('SendBillRef','__FACREF__'); + $formmail->withtopic=$outputlangs->trans('SendBillRef','__FACREF__'); $formmail->withfile=2; $formmail->withbody=1; $formmail->withdeliveryreceipt=1; |