loadlangs

This commit is contained in:
Frédéric FRANCE 2018-05-26 18:41:16 +02:00
parent 58e5715ac3
commit f53f7bbf40
No known key found for this signature in database
GPG Key ID: 06809324E4B2ABC1
89 changed files with 143 additions and 184 deletions

View File

@ -31,8 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
$action=GETPOST('action','aZ09'); $action=GETPOST('action','aZ09');
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'adminaccoutant'; // To manage different context of search $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'adminaccoutant'; // To manage different context of search
$langs->load("admin"); // Load translation files required by the page
$langs->load("companies"); $langs->loadLangs(array('admin', 'companies'));
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -31,9 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array('admin', 'other', 'agenda'));
$langs->load("agenda");
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');
$cancel = GETPOST('cancel','alpha'); $cancel = GETPOST('cancel','alpha');

View File

@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array('admin', 'other', 'agenda'));
$langs->load("agenda");
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$form = new Form($db); $form = new Form($db);

View File

@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();
$langs->load("agenda"); // Load translation files required by the page
$langs->load("admin"); $langs->loadLangs(array('agenda', 'admin', 'other'));
$langs->load("other");
$def = array(); $def = array();
$actiontest=GETPOST('test','alpha'); $actiontest=GETPOST('test','alpha');

View File

@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array('admin', 'other', 'agenda'));
$langs->load("agenda");
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');
$value = GETPOST('value','alpha'); $value = GETPOST('value','alpha');

View File

@ -29,6 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
// Load translation files required by the page
$langs->loadLangs(array("admin","other","agenda")); $langs->loadLangs(array("admin","other","agenda"));
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');

View File

@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/agenda.lib.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
// Load translation files required by the page
$langs->loadLangs(array("admin","other","agenda")); $langs->loadLangs(array("admin","other","agenda"));
$def = array(); $def = array();

View File

@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/lib/bank.lib.php';
require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php'; require_once DOL_DOCUMENT_ROOT . '/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php'; require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin","companies","bills","other","banks")); $langs->loadLangs(array("admin","companies","bills","other","banks"));
if (!$user->admin) if (!$user->admin)

View File

@ -30,8 +30,8 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$langs->load("banks"); // Load translation files required by the page
$langs->load("admin"); $langs->loadLangs(array('banks', 'admin'));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$form = new Form($db); $form = new Form($db);

View File

@ -28,6 +28,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbarcode.class.php';
// Load translation files required by the page
$langs->load("admin"); $langs->load("admin");
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();

View File

@ -28,8 +28,8 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("boxes"); $langs->loadLangs(array('admin', 'boxes'));
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/bank.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/class/remisecheque.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin","companies","bills","other","banks")); $langs->loadLangs(array("admin","companies","bills","other","banks"));
if (!$user->admin) if (!$user->admin)

View File

@ -26,6 +26,7 @@
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
// Load translation files required by the page
$langs->load("admin"); $langs->load("admin");
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();

View File

@ -36,10 +36,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php'; require_once DOL_DOCUMENT_ROOT.'/commande/class/commande.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/order.lib.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('admin', 'errors', 'orders', 'other'));
$langs->load("orders");
$langs->load('other');
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -40,8 +40,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
$action=GETPOST('action','aZ09'); $action=GETPOST('action','aZ09');
$contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'admincompany'; // To manage different context of search $contextpage=GETPOST('contextpage','aZ')?GETPOST('contextpage','aZ'):'admincompany'; // To manage different context of search
$langs->load("admin"); // Load translation files required by the page
$langs->load("companies"); $langs->loadLangs(array('admin', 'companies'));
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -29,9 +29,8 @@
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
$langs->load('admin'); // Load translation files required by the page
$langs->load('compta'); $langs->loadLangs(array('admin', 'compta', 'accountancy'));
$langs->load('accountancy');
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();

View File

@ -29,9 +29,8 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("sendings"); $langs->loadLangs(array('admin', 'sendings', 'deliveries'));
$langs->load("deliveries");
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();

View File

@ -27,6 +27,7 @@
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
// Load translation files required by the page
$langs->load("admin"); $langs->load("admin");
if (! $user->admin) if (! $user->admin)

View File

@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin","errors","contracts")); $langs->loadLangs(array("admin","errors","contracts"));
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();

View File

@ -25,6 +25,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/dav/dav.lib.php'; require_once DOL_DOCUMENT_ROOT.'/dav/dav.lib.php';
// Load translation files required by the page
$langs->loadLangs(array("admin","other","agenda")); $langs->loadLangs(array("admin","other","agenda"));
if (!$user->admin) if (!$user->admin)

View File

@ -26,12 +26,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
$langs->load("companies"); // Load translation files required by the page
$langs->load("products"); $langs->loadLangs(array('companies', 'products', 'admin', 'sms', 'other', 'errors'));
$langs->load("admin");
$langs->load("sms");
$langs->load("other");
$langs->load("errors");
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();

View File

@ -27,6 +27,7 @@
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
// Load translation files required by the page
$langs->load("admin"); $langs->load("admin");
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -41,6 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
// Load translation files required by the page
$langs->loadLangs(array("errors","admin","main","companies","resource","holiday","accountancy","hrm","orders","contracts","projects","propal","bills","interventions")); $langs->loadLangs(array("errors","admin","main","companies","resource","holiday","accountancy","hrm","orders","contracts","projects","propal","bills","interventions"));
$action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; $action=GETPOST('action','alpha')?GETPOST('action','alpha'):'view';

View File

@ -25,6 +25,7 @@
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
// Load translation files required by the page
$langs->load("admin"); $langs->load("admin");
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();
@ -109,4 +110,4 @@ print '</td></tr>';
print '</table>'; print '</table>';
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/events.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("users","admin","other")); $langs->loadLangs(array("users","admin","other"));
$action=GETPOST('action','aZ09'); $action=GETPOST('action','aZ09');

View File

@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php';
require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php'; require_once DOL_DOCUMENT_ROOT.'/expedition/class/expedition.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin", "sendings", "deliveries", "other")); $langs->loadLangs(array("admin", "sendings", "deliveries", "other"));
if (! $user->admin) if (! $user->admin)

View File

@ -35,10 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array('admin', 'other', 'sendings', 'deliveries'));
$langs->load("sendings");
$langs->load("deliveries");
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -37,9 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array('admin', 'other', 'sendings'));
$langs->load("sendings");
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$form = new Form($db); $form = new Form($db);

View File

@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('admin', 'errors', 'trips', 'other'));
$langs->load("trips");
$langs->load('other');
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -33,10 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
$langs->load("admin"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('admin', 'errors', 'trips', 'other'));
$langs->load("trips");
$langs->load('other');
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$form = new Form($db); $form = new Form($db);

View File

@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_ik.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_ik.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin","trips","errors","other","dict")); $langs->loadLangs(array("admin","trips","errors","other","dict"));
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();
@ -181,4 +181,4 @@ echo '</form>';
dol_fiche_end(); dol_fiche_end();
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/expensereport.lib.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport.class.php';
require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_rule.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/expensereport_rule.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin","other","trips","errors","dict")); $langs->loadLangs(array("admin","other","trips","errors","dict"));
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();
@ -356,4 +356,4 @@ echo '<script type="text/javascript"> $(function() {
dol_fiche_end(); dol_fiche_end();
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@ -31,9 +31,8 @@
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
// Load translation files required by the page
$langs->load("admin"); $langs->loadLangs(array('admin', 'exports'));
$langs->load("exports");
$langs->load('other'); $langs->load('other');
@ -100,4 +99,4 @@ print '</table>';
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@ -31,6 +31,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/rssparser.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/rssparser.class.php';
// Load translation files required by the page
$langs->load("admin"); $langs->load("admin");
// Security check // Security check

View File

@ -33,10 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('admin', 'errors', 'other', 'bills'));
$langs->load('other');
$langs->load('bills');
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/doleditor.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/doleditor.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("fckeditor"); $langs->loadLangs(array('admin', 'fckeditor'));
$action = GETPOST('action','alpha'); $action = GETPOST('action','alpha');
// Possible modes are: // Possible modes are:

View File

@ -34,10 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('admin', 'errors', 'interventions', 'other'));
$langs->load("interventions");
$langs->load('other');
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgeoip.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin","errors")); $langs->loadLangs(array("admin","errors"));
$action = GETPOST('action','aZ09'); $action = GETPOST('action','aZ09');

View File

@ -32,16 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("languages"); $langs->loadLangs(array('admin', 'languages', 'other', 'companies', 'products', 'members', 'projects', 'hrm', 'agenda'));
$langs->load("other");
$langs->load("companies");
$langs->load("products");
$langs->load("members");
$langs->load("projects");
$langs->load("hrm");
$langs->load("agenda");
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -24,8 +24,8 @@
require '../main.inc.php'; require '../main.inc.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("companies"); $langs->loadLangs(array('admin', 'companies'));
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();

View File

@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php';
// Load translation files required by the page
$langs->load("admin"); $langs->load("admin");
if (!$user->admin) if (!$user->admin)

View File

@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php';
require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin","errors")); $langs->loadLangs(array("admin","errors"));
if (!$user->admin) if (!$user->admin)

View File

@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin","errors")); $langs->loadLangs(array("admin","errors"));
if (!$user->admin) if (!$user->admin)

View File

@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('admin', 'errors'));
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();

View File

@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('admin', 'errors'));
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();

View File

@ -33,8 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/user/class/usergroup.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/ldap.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/ldap.lib.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("errors"); $langs->loadLangs(array('admin', 'errors'));
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();

View File

@ -26,9 +26,8 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php';
$langs->load("companies"); // Load translation files required by the page
$langs->load("products"); $langs->loadLangs(array('companies', 'products', 'admin'));
$langs->load("admin");
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();
@ -38,8 +37,8 @@ if ($action == 'update')
{ {
$error=0; $error=0;
$MAXDEC=8; $MAXDEC=8;
if ($_POST["MAIN_MAX_DECIMALS_UNIT"] > $MAXDEC if ($_POST["MAIN_MAX_DECIMALS_UNIT"] > $MAXDEC
|| $_POST["MAIN_MAX_DECIMALS_TOT"] > $MAXDEC || $_POST["MAIN_MAX_DECIMALS_TOT"] > $MAXDEC
|| $_POST["MAIN_MAX_DECIMALS_SHOWN"] > $MAXDEC) || $_POST["MAIN_MAX_DECIMALS_SHOWN"] > $MAXDEC)
{ {
$error++; $error++;

View File

@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/expedition.lib.php';
require_once DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php'; require_once DOL_DOCUMENT_ROOT.'/livraison/class/livraison.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin", "sendings", "deliveries", "other")); $langs->loadLangs(array("admin", "sendings", "deliveries", "other"));
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();

View File

@ -35,10 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array('admin', 'other', 'sendings', 'deliveries'));
$langs->load("sendings");
$langs->load("deliveries");
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -37,9 +37,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array('admin', 'other', 'sendings'));
$langs->load("sendings");
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$form = new Form($db); $form = new Form($db);

View File

@ -28,8 +28,8 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT . '/core/class/html.formaccounting.class.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("loan"); $langs->loadLangs(array('admin', 'loan'));
// Security check // Security check
if (!$user->admin) if (!$user->admin)
@ -123,4 +123,4 @@ print "</table>\n";
print '<br><div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>'; print '<br><div style="text-align:center"><input type="submit" class="button" value="'.$langs->trans('Modify').'" name="button"></div>';
llxFooter(); llxFooter();
$db->close(); $db->close();

View File

@ -27,7 +27,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin", "mails")); $langs->loadLangs(array("admin", "mails"));
if (!$user->admin) accessforbidden(); if (!$user->admin) accessforbidden();

View File

@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/mailmanspip.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/mailmanspip.lib.php';
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin", "members", "mailmanspip")); $langs->loadLangs(array("admin", "members", "mailmanspip"));
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -27,7 +27,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("companies", "products", "admin", "mails", "other", "errors")); $langs->loadLangs(array("companies", "products", "admin", "mails", "other", "errors"));
$action=GETPOST('action','alpha'); $action=GETPOST('action','alpha');

View File

@ -27,12 +27,8 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
$langs->load("companies"); // Load translation files required by the page
$langs->load("products"); $langs->loadLangs(array('companies', 'products', 'admin', 'mails', 'other', 'errors'));
$langs->load("admin");
$langs->load("mails");
$langs->load("other");
$langs->load("errors");
$action=GETPOST('action','alpha'); $action=GETPOST('action','alpha');

View File

@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/emailsenderprofile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/emailsenderprofile.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("errors","admin","mails","languages")); $langs->loadLangs(array("errors","admin","mails","languages"));
$action = GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $action = GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...

View File

@ -41,7 +41,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("errors","admin","mails","languages")); $langs->loadLangs(array("errors","admin","mails","languages"));
$action = GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; $action = GETPOST('action','alpha')?GETPOST('action','alpha'):'view';

View File

@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
$action=GETPOST('action','aZ09'); $action=GETPOST('action','aZ09');
$cancel=GETPOST('cancel','alpha'); $cancel=GETPOST('cancel','alpha');
// Load translation files required by the page
$langs->loadLangs(array("companies","products","admin","users","other")); $langs->loadLangs(array("companies","products","admin","users","other"));
// Security check // Security check

View File

@ -28,8 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$langs->load("errors"); // Load translation files required by the page
$langs->load("admin"); $langs->loadLangs(array('errors', 'admin'));
$mode=GETPOST('mode', 'alpha'); $mode=GETPOST('mode', 'alpha');
$action=GETPOST('action','alpha'); $action=GETPOST('action','alpha');

View File

@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/admin/dolistore/class/dolistore.class.php'; require_once DOL_DOCUMENT_ROOT.'/admin/dolistore/class/dolistore.class.php';
// Load translation files required by the page
$langs->loadLangs(array("errors","admin","modulebuilder")); $langs->loadLangs(array("errors","admin","modulebuilder"));
$mode=GETPOST('mode', 'alpha'); $mode=GETPOST('mode', 'alpha');

View File

@ -32,9 +32,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/multicurrency.lib.php';
require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php'; require_once DOL_DOCUMENT_ROOT.'/multicurrency/class/multicurrency.class.php';
// Translations // Load translation files required by the page
$langs->load("admin"); $langs->loadLangs(array('admin', 'multicurrency'));
$langs->load("multicurrency");
// Access control // Access control
if (! $user->admin) { if (! $user->admin) {

View File

@ -29,13 +29,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/triggers/interface_50_modNotification_Notification.class.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array('admin', 'other', 'orders', 'propal', 'bills', 'errors', 'mails'));
$langs->load("orders");
$langs->load("propal");
$langs->load("bills");
$langs->load("errors");
$langs->load("mails");
// Security check // Security check
if (!$user->admin) if (!$user->admin)

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2015 Frederic France <frederic.france@free.fr> /* Copyright (C) 2015-2018 Frederic France <frederic.france@netlogic.fr>
* Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -33,9 +33,8 @@ $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($
$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
// Load translation files required by the page
$langs->load("admin"); $langs->loadLangs(array('admin', 'oauth'));
$langs->load("oauth");
// Security check // Security check
if (!$user->admin) if (!$user->admin)

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2013-2016 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014-2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -28,9 +28,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/oauth.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
use OAuth\Common\Storage\DoliStorage; use OAuth\Common\Storage\DoliStorage;
$langs->load("admin"); // Load translation files required by the page
$langs->load("printing"); $langs->loadLangs(array('admin', 'printing', 'oauth'));
$langs->load("oauth");
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -34,9 +34,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadLangs(array('admin', 'other', 'orders'));
$langs->load("orders");
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$form = new Form($db); $form = new Form($db);

View File

@ -35,9 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
if (!$user->admin) if (!$user->admin)
accessforbidden(); accessforbidden();
$langs->load("admin"); // Load translation files required by the page
$langs->load("other"); $langs->loadlangs(array('admin', 'other', 'orders'));
$langs->load("orders");
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$form = new Form($db); $form = new Form($db);

View File

@ -26,7 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("admin", "other", "errors", "bills")); $langs->loadLangs(array("admin", "other", "errors", "bills"));
if (! $user->admin) accessforbidden(); if (! $user->admin) accessforbidden();

View File

@ -31,9 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("languages"); $langs->loadLangs(array('admin', 'languages', 'other'));
$langs->load("other");
$langs->load("companies"); $langs->load("companies");
$langs->load("products"); $langs->load("products");

View File

@ -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/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$langs->load("admin"); // Load translation files required by the page
$langs->load("users"); $langs->loadLangs(array('admin', 'users', 'other'));
$langs->load("other");
$action=GETPOST('action','aZ09'); $action=GETPOST('action','aZ09');

View File

@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php'; require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php';
require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php'; require_once DOL_DOCUMENT_ROOT.'/api/class/api_access.class.php';
// Load translation files required by the page
$langs->load("admin"); $langs->load("admin");

View File

@ -29,6 +29,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
// Load translation files required by the page
$langs->load("admin"); $langs->load("admin");
if (! $user->admin) if (! $user->admin)

View File

@ -26,6 +26,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/assets.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/assets.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
// Load translation files required by the page
$langs->loadLangs(array("assets","admin","companies")); $langs->loadLangs(array("assets","admin","companies"));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);

View File

@ -26,8 +26,8 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/assets.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/assets.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
$langs->load("assets"); // Load translation files required by the page
$langs->load("admin"); $langs->loadLangs(array('assets', 'admin'));
$extrafields = new ExtraFields($db); $extrafields = new ExtraFields($db);
$form = new Form($db); $form = new Form($db);

View File

@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
global $langs, $user; global $langs, $user;
// Translations // Load translation files required by the page
$langs->loadLangs(array("admin", "assets")); $langs->loadLangs(array("admin", "assets"));
// Access control // Access control

View File

@ -28,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php');
include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("asset")); $langs->loadLangs(array("asset"));
// Get parameters // Get parameters

View File

@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("assets","companies")); $langs->loadLangs(array("assets","companies"));

View File

@ -26,6 +26,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
// Load translation files required by the page
$langs->loadLangs(array("asset")); $langs->loadLangs(array("asset"));
$id = GETPOST('id','int'); $id = GETPOST('id','int');

View File

@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("assets")); $langs->loadLangs(array("assets"));
$action = GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... $action = GETPOST('action','alpha')?GETPOST('action','alpha'):'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...

View File

@ -26,7 +26,7 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/asset.lib.php';
require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php'; require_once DOL_DOCUMENT_ROOT.'/asset/class/asset.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("asset","companies")); $langs->loadLangs(array("asset","companies"));
// Get parameters // Get parameters

View File

@ -30,6 +30,7 @@ if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/l
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php'; if (! empty($conf->accounting->enabled)) require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
// Load translation files required by the page
$langs->load("assets"); $langs->load("assets");
$rowid = GETPOST('rowid','int'); $rowid = GETPOST('rowid','int');

View File

@ -42,7 +42,7 @@ if ($user->societe_id > 0)
if (! $user->rights->facture->creer) if (! $user->rights->facture->creer)
accessforbidden(); accessforbidden();
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("companies", "orders")); $langs->loadLangs(array("companies", "orders"));
$limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit; $limit = GETPOST('limit','int')?GETPOST('limit','int'):$conf->liste_limit;

View File

@ -39,7 +39,7 @@ if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formprojet.class.php';
} }
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("orders", "deliveries", "companies")); $langs->loadLangs(array("orders", "deliveries", "companies"));
if (! $user->rights->facture->creer) if (! $user->rights->facture->creer)

View File

@ -35,11 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
// Load traductions files requiredby by page // Load translation files required by the page
$langs->load("resource"); $langs->loadLangs(array('resource', 'companies', 'other', 'main'));
$langs->load("companies");
$langs->load("other");
$langs->load("main");
// Get parameters // Get parameters
$id = GETPOST('id','int'); $id = GETPOST('id','int');

View File

@ -31,9 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
$langs->load("resource"); // Load translation files required by the page
$langs->load("sendings"); $langs->loadLangs(array('resource', 'sendings', 'companies'));
$langs->load("companies");
$id = GETPOST('id','int'); $id = GETPOST('id','int');
$ref = GETPOST('ref','alpha'); $ref = GETPOST('ref','alpha');

View File

@ -35,9 +35,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
$langs->load("other"); // Load translation files required by the page
$langs->load("resource"); $langs->loadLangs(array('other', 'resource', 'companies'));
$langs->load("companies");
$id = GETPOST('id','int'); $id = GETPOST('id','int');
$ref = GETPOST('ref','alpha'); $ref = GETPOST('ref','alpha');

View File

@ -36,10 +36,8 @@ if (! empty($conf->projet->enabled)) {
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php'; require_once DOL_DOCUMENT_ROOT . '/core/class/html.formprojet.class.php';
} }
// Load traductions files requiredby by page // Load translation files required by the page
$langs->load("resource"); $langs->loadLangs(array('resource', 'other', 'interventions'));
$langs->load("other");
$langs->load("interventions");
/* /*
$sortorder = GETPOST('sortorder','alpha'); $sortorder = GETPOST('sortorder','alpha');

View File

@ -25,7 +25,7 @@
require '../main.inc.php'; require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
// Load translations files required by page // Load translation files required by the page
$langs->loadLangs(array("resource","companies","other")); $langs->loadLangs(array("resource","companies","other"));
// Get parameters // Get parameters

View File

@ -29,8 +29,8 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php'; require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php';
$langs->load('companies'); // Load translation files required by the page
$langs->load("interventions"); $langs->loadLangs(array('companies', 'interventions'));
$id = GETPOST('id','int'); $id = GETPOST('id','int');
$ref = GETPOST('ref','alpha'); $ref = GETPOST('ref','alpha');

View File

@ -41,7 +41,7 @@ include_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
include_once(DOL_DOCUMENT_ROOT.'/website/class/websiteaccount.class.php'); include_once(DOL_DOCUMENT_ROOT.'/website/class/websiteaccount.class.php');
include_once(DOL_DOCUMENT_ROOT.'/website/lib/websiteaccount.lib.php'); include_once(DOL_DOCUMENT_ROOT.'/website/lib/websiteaccount.lib.php');
// Load traductions files requiredby by page // Load translation files required by the page
$langs->loadLangs(array("website","other")); $langs->loadLangs(array("website","other"));
// Get parameters // Get parameters