mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Standardize and update code
This commit is contained in:
parent
be3468241f
commit
3da762a59d
|
|
@ -88,7 +88,6 @@ class FormSms
|
|||
return 1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Show the form to input an sms.
|
||||
*
|
||||
|
|
@ -96,16 +95,15 @@ class FormSms
|
|||
* @param int $showform Show form tags and submit button (recommanded is to use with value 0)
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function show_form($morecss='titlefield', $showform=1)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $user, $form;
|
||||
|
||||
if (! is_object($form)) $form=new Form($this->db);
|
||||
|
||||
$langs->load("other");
|
||||
$langs->load("mails");
|
||||
$langs->load("sms");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('other', 'mails', 'sms'));
|
||||
|
||||
$soc=new Societe($this->db);
|
||||
if (!empty($this->withtosocid) && $this->withtosocid > 0)
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||
|
||||
if (GETPOST('lang', 'aZ09')) $langs->setDefaultLang(GETPOST('lang', 'aZ09')); // If language was forced on URL by the main.inc.php
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("agenda");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","agenda"));
|
||||
|
||||
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
|
||||
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ require '../main.inc.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/lib/product.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
|
||||
|
||||
$langs->load("products");
|
||||
$langs->load("other");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("products","other"));
|
||||
|
||||
$id=GETPOST('id','int');
|
||||
$action=GETPOST('action','alpha');
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
require '../main.inc.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("other");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies","other"));
|
||||
|
||||
// Security check
|
||||
$socid=0;
|
||||
|
|
|
|||
|
|
@ -117,10 +117,9 @@ class InterfaceStripe
|
|||
// Put here code you want to execute when a Dolibarr business events occurs.
|
||||
// Data and type of action are stored into $object and $action
|
||||
global $langs, $db, $conf;
|
||||
$langs->load("members");
|
||||
$langs->load("users");
|
||||
$langs->load("mails");
|
||||
$langs->load('other');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("members","other","users","mails"));
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
|
||||
$stripe = new Stripe($db);
|
||||
|
|
|
|||
|
|
@ -40,9 +40,8 @@ if (! empty($conf->projet->enabled))
|
|||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
$langs->load("other");
|
||||
$langs->load("donations");
|
||||
$langs->load("companies");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies","other","donations"));
|
||||
|
||||
$id = GETPOST('id','int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ require '../main.inc.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
if (! empty($conf->projet->enabled)) require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("donations");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies","donations"));
|
||||
|
||||
$sortfield = GETPOST("sortfield",'alpha');
|
||||
$sortorder = GETPOST("sortorder",'alpha');
|
||||
|
|
|
|||
|
|
@ -35,9 +35,8 @@ if (! empty($conf->projet->enabled))
|
|||
require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
||||
}
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("bills");
|
||||
$langs->load("donations");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies","bills","donations"));
|
||||
|
||||
$id=(GETPOST('id','int')?GETPOST('id','int'):GETPOST('facid','int')); // For backward compatibility
|
||||
$ref=GETPOST('ref','alpha');
|
||||
|
|
|
|||
|
|
@ -47,9 +47,8 @@ $year = GETPOST('year')>0?GETPOST('year'):$nowyear;
|
|||
$startyear=$year-1;
|
||||
$endyear=$year;
|
||||
|
||||
$langs->load("sendings");
|
||||
$langs->load("other");
|
||||
$langs->load("companies");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies","other","sendings"));
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user