Standardize and update code

This commit is contained in:
Philippe GRAND 2018-09-15 11:15:59 +02:00
parent 7deccb3215
commit 5910e1ddf8
3 changed files with 8 additions and 9 deletions

View File

@ -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("agenda","main"));
$right=($langs->trans("DIRECTION")=='rtl'?'left':'right');
$left=($langs->trans("DIRECTION")=='rtl'?'right':'left');

View File

@ -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');

View File

@ -114,13 +114,12 @@ class InterfaceStripe
*/
public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf)
{
// Put here code you want to execute when a Dolibarr business events occurs.
// Put here code you want to execute when a Dolibarr business event 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);