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
804badd561
commit
7fcbd0fe42
|
|
@ -36,9 +36,8 @@ if ( $_SESSION['uid'] <= 0 )
|
|||
exit;
|
||||
}
|
||||
|
||||
$langs->load("companies");
|
||||
$langs->load("compta");
|
||||
$langs->load("cashdesk");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("companies","compta","cashdesk"));
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@
|
|||
require_once '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("cashdesk");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin","cashdesk"));
|
||||
|
||||
// Test if user logged
|
||||
if ( $_SESSION['uid'] > 0 )
|
||||
|
|
|
|||
|
|
@ -30,9 +30,8 @@ include '../main.inc.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/include/environnement.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/cashdesk/class/Auth.class.php';
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("admin");
|
||||
$langs->load("cashdesk");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","admin","cashdesk"));
|
||||
|
||||
$username = GETPOST("txtUsername");
|
||||
$password = GETPOST("pwdPassword");
|
||||
|
|
@ -119,7 +118,7 @@ if ( $retour >= 0 )
|
|||
$_SESSION['firstname'] = $tab['firstname'];
|
||||
$_SESSION['CASHDESK_ID_THIRDPARTY'] = ($thirdpartyid > 0 ? $thirdpartyid : '');
|
||||
$_SESSION['CASHDESK_ID_WAREHOUSE'] = ($warehouseid > 0 ? $warehouseid : '');
|
||||
|
||||
|
||||
$_SESSION['CASHDESK_ID_BANKACCOUNT_CASH'] = ($bankid_cash > 0 ? $bankid_cash : '');
|
||||
$_SESSION['CASHDESK_ID_BANKACCOUNT_CHEQUE'] = ($bankid_cheque > 0 ? $bankid_cheque : '');
|
||||
$_SESSION['CASHDESK_ID_BANKACCOUNT_CB'] = ($bankid_cb > 0 ? $bankid_cb : '');
|
||||
|
|
@ -135,8 +134,8 @@ if ( $retour >= 0 )
|
|||
}
|
||||
else
|
||||
{
|
||||
$langs->load("errors");
|
||||
$langs->load("other");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("other","errors"));
|
||||
$retour=$langs->trans("ErrorBadLoginPassword");
|
||||
header('Location: '.DOL_URL_ROOT.'/cashdesk/index.php?err='.urlencode($retour).'&user='.$username.'&socid='.$thirdpartyid.'&warehouseid='.$warehouseid);
|
||||
exit;
|
||||
|
|
|
|||
|
|
@ -26,10 +26,8 @@ if (empty($langs) || ! is_object($langs))
|
|||
exit;
|
||||
}
|
||||
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
$langs->load("cashdesk");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","bills","cashdesk"));
|
||||
|
||||
// Object $form must de defined
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,8 @@ if (empty($langs) || ! is_object($langs))
|
|||
require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
$langs->load("cashdesk");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","bills","cashdesk"));
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -63,9 +63,8 @@ if (!empty($_SESSION["CASHDESK_ID_WAREHOUSE"]) && ! empty($conf->stock->enabled)
|
|||
$warehouseLink = $warehouse->getNomUrl(1);
|
||||
}
|
||||
|
||||
|
||||
$langs->load("cashdesk");
|
||||
$langs->load("main");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","cashdesk"));
|
||||
|
||||
print "\n".'<!-- menu.tpl.php -->'."\n";
|
||||
print '<div class="menu_bloc">';
|
||||
|
|
|
|||
|
|
@ -27,8 +27,8 @@ if (empty($langs) || ! is_object($langs))
|
|||
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load('cashdesk');
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","cashdesk"));
|
||||
|
||||
top_httphead('text/html');
|
||||
|
||||
|
|
|
|||
|
|
@ -23,10 +23,8 @@ if (empty($langs) || ! is_object($langs))
|
|||
exit;
|
||||
}
|
||||
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
$langs->load("banks");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","bills","banks"));
|
||||
|
||||
// Object $form must de defined
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,8 @@ if (empty($langs) || ! is_object($langs))
|
|||
exit;
|
||||
}
|
||||
|
||||
|
||||
$langs->load("main");
|
||||
$langs->load("bills");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","bills"));
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
|||
|
|
@ -28,9 +28,8 @@ require '../main.inc.php';
|
|||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
|
||||
$langs->load("admin");
|
||||
$langs->load("other");
|
||||
$langs->load("website");
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin","other","website"));
|
||||
|
||||
if (! $user->admin) accessforbidden();
|
||||
|
||||
|
|
|
|||
|
|
@ -1003,8 +1003,8 @@ class FactureRec extends CommonInvoice
|
|||
|
||||
$error=0;
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load('main');
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("main","bills"));
|
||||
|
||||
$nb_create=0;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user