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