mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-17 23:11:29 +01:00
Standardize and update code
This commit is contained in:
@@ -54,8 +54,9 @@ class box_project extends ModeleBoxes
|
|||||||
function __construct($db,$param='')
|
function __construct($db,$param='')
|
||||||
{
|
{
|
||||||
global $user, $langs;
|
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->db = $db;
|
||||||
$this->boxlabel="Projects";
|
$this->boxlabel="Projects";
|
||||||
|
|||||||
@@ -271,9 +271,8 @@ class FormMail extends Form
|
|||||||
|
|
||||||
if (! is_object($form)) $form=new Form($this->db);
|
if (! is_object($form)) $form=new Form($this->db);
|
||||||
|
|
||||||
$langs->load("other");
|
// Load translation files required by the page
|
||||||
$langs->load("mails");
|
$langs->loadLangs(array('other', 'mails'));
|
||||||
|
|
||||||
|
|
||||||
// Clear temp files. Must be done at beginning, before call of triggers
|
// Clear temp files. Must be done at beginning, before call of triggers
|
||||||
if (GETPOST('mode','alpha') == 'init' || (GETPOST('modelmailselected','alpha') && GETPOST('modelmailselected','alpha') != '-1'))
|
if (GETPOST('mode','alpha') == 'init' || (GETPOST('modelmailselected','alpha') && GETPOST('modelmailselected','alpha') != '-1'))
|
||||||
|
|||||||
@@ -126,9 +126,8 @@ class FormTicket
|
|||||||
{
|
{
|
||||||
global $conf, $langs, $user, $hookmanager;
|
global $conf, $langs, $user, $hookmanager;
|
||||||
|
|
||||||
$langs->load("other");
|
// Load translation files required by the page
|
||||||
$langs->load("mails");
|
$langs->loadLangs(array('other', 'mails', 'ticket'));
|
||||||
$langs->load("ticket");
|
|
||||||
|
|
||||||
$form = new Form($this->db);
|
$form = new Form($this->db);
|
||||||
$formcompany = new FormCompany($this->db);
|
$formcompany = new FormCompany($this->db);
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ function categories_prepare_head($object,$type)
|
|||||||
{
|
{
|
||||||
global $langs, $conf, $user;
|
global $langs, $conf, $user;
|
||||||
|
|
||||||
$langs->load("categories");
|
// Load translation files required by the page
|
||||||
$langs->load("products");
|
$langs->loadLangs(array('categories', 'products'));
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|||||||
@@ -194,9 +194,10 @@ function dol_print_file($langs,$filename,$searchalt=0)
|
|||||||
*/
|
*/
|
||||||
function dol_print_object_info($object, $usetable=0)
|
function dol_print_object_info($object, $usetable=0)
|
||||||
{
|
{
|
||||||
global $langs,$db;
|
global $langs, $db;
|
||||||
$langs->load("other");
|
|
||||||
$langs->load("admin");
|
// Load translation files required by the page
|
||||||
|
$langs->loadLangs(array('other', 'admin'));
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
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)
|
function payment_supplier_prepare_head(Paiement $object)
|
||||||
{
|
{
|
||||||
|
|
||||||
global $langs, $conf;
|
global $langs, $conf;
|
||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
@@ -127,8 +126,9 @@ function showOnlinePaymentUrl($type,$ref)
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
$langs->load("payment");
|
// Load translation files required by the page
|
||||||
$langs->load("paybox");
|
$langs->loadLangs(array('payment', 'paybox'));
|
||||||
|
|
||||||
$servicename='Online';
|
$servicename='Online';
|
||||||
|
|
||||||
$out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
|
$out = img_picto('','object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePayment",$servicename).'<br>';
|
||||||
|
|||||||
Reference in New Issue
Block a user