Update agenda.php

$langs->load("companies")    was twice
This commit is contained in:
UT from dolibit 2022-08-26 11:51:35 +02:00 committed by GitHub
parent e5937ef742
commit 95bb6e5ea1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,12 +35,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/resource.lib.php';
require_once DOL_DOCUMENT_ROOT.'/resource/class/dolresource.class.php';
// Load translation files required by the page
$langs->load("companies");
$langs->load('companies');
// Get parameters
$id = GETPOST('id', 'int');
$id = GETPOST('id', 'int');
$ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'aZ09');
$backtopage = GETPOST('backtopage', 'alpha');
@ -52,6 +52,7 @@ if (GETPOST('actioncode', 'array')) {
} else {
$actioncode = GETPOST("actioncode", "alpha", 3) ?GETPOST("actioncode", "alpha", 3) : (GETPOST("actioncode") == '0' ? '0' : (empty($conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_TYPE_FOR_OBJECT));
}
$search_agenda_label = GETPOST('search_agenda_label');
$limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
@ -72,7 +73,7 @@ if (!$sortorder) {
}
// Initialize technical objects
//$object=new MyObject($db);
$extrafields = new ExtraFields($db);
$hookmanager->initHooks(array('agendaresource'));
@ -94,7 +95,7 @@ if (!$user->rights->resource->read) {
*/
$parameters = array('id'=>$id);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
@ -126,7 +127,6 @@ if ($object->id > 0) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
$langs->load("companies");
$picto = 'resource';
$title = $langs->trans("Agenda");