| ' . $langs->trans("LinkedObject") . ' | ';
print '';
@@ -1974,7 +1974,7 @@ function selectremindertype() {
$result5 = $object->fetch_optionals();
if ($listUserAssignedUpdated || $donotclearsession) {
- $percentage = in_array(GETPOST('status'), array(-1, 100)) ? GETPOST('status') : (in_array($complete, array(-1, 100)) ? $complete : GETPOSTINT("percentage")); // If status is -1 or 100, percentage is not defined and we must use status
+ $percentage = in_array(GETPOST('status'), [-1, 100]) ? GETPOST('status') : (in_array($complete, [-1, 100]) ? $complete : GETPOSTINT("percentage")); // If status is -1 or 100, percentage is not defined and we must use status
$datep = dol_mktime($fulldayevent ? 0 : $aphour, $fulldayevent ? 0 : $apmin, 0, GETPOSTINT("apmonth"), GETPOSTINT("apday"), GETPOSTINT("apyear"), 'tzuserrel');
$datef = dol_mktime($fulldayevent ? 23 : $p2hour, $fulldayevent ? 59 : $p2min, $fulldayevent ? 59 : 0, GETPOSTINT("p2month"), GETPOSTINT("p2day"), GETPOSTINT("p2year"), 'tzuserrel');
@@ -1990,7 +1990,7 @@ function selectremindertype() {
$object->socid = GETPOSTINT("socid");
$socpeopleassigned = GETPOST("socpeopleassigned", 'array');
foreach ($socpeopleassigned as $tmpid) {
- $object->socpeopleassigned[$id] = array('id' => $tmpid);
+ $object->socpeopleassigned[$id] = ['id' => $tmpid];
}
$object->contact_id = GETPOSTINT("contactid");
$object->fk_project = GETPOSTINT("projectid");
@@ -2200,14 +2200,14 @@ function setdatefields()
$listofuserid = []; // User assigned
if (empty($donotclearsession)) {
if ($object->userownerid > 0) {
- $listofuserid[$object->userownerid] = array(
+ $listofuserid[$object->userownerid] = [
'id' => $object->userownerid,
'type' => 'user',
//'transparency'=>$object->userassigned[$user->id]['transparency'],
'transparency' => $object->transparency, // Force transparency on ownerfrom event
'answer_status' => (isset($object->userassigned[$object->userownerid]['answer_status']) ? $object->userassigned[$object->userownerid]['answer_status'] : null),
'mandatory' => (isset($object->userassigned[$object->userownerid]['mandatory']) ? $object->userassigned[$object->userownerid]['mandatory'] : null)
- );
+ ];
}
if (!empty($object->userassigned)) { // Now concat assigned users
// Restore array with key with same value than param 'id'
@@ -2272,7 +2272,7 @@ function setdatefields()
print ' | ';
print '';
$events = []; // 'method'=parameter action of url, 'url'=url to call that return new list of contacts
- $events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1&token=' . currentToken(), 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
+ $events[] = ['method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php?showempty=1&token=' . currentToken(), 1), 'htmlname' => 'contactid', 'params' => ['add-customer-contact' => 'disabled']];
// TODO Refresh also list of project if conf PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY not defined with list linked to socid ?
// FIXME If we change company, we may get a project that does not match
print img_picto('', 'company', 'class="pictofixedwidth"') . $form->select_company($object->socid, 'socid', '', 'SelectThirdParty', 1, 0, $events, 0, 'minwidth300');
@@ -2713,12 +2713,12 @@ function setdatefields()
$listofuserid = [];
if (empty($donotclearsession)) {
if ($object->userownerid > 0) {
- $listofuserid[$object->userownerid] = array(
+ $listofuserid[$object->userownerid] = [
'id' => $object->userownerid,
'transparency' => $object->transparency, // Force transparency on owner from property of event
'answer_status' => $object->userassigned[$object->userownerid]['answer_status'],
'mandatory' => $object->userassigned[$object->userownerid]['mandatory']
- );
+ ];
}
if (!empty($object->userassigned)) { // Now concat assigned users
// Restore array with key with same value than param 'id'
@@ -2816,7 +2816,7 @@ function setdatefields()
// Object linked (if link is for thirdparty, contact, project it is a recording error. We should not have links in link table
// for such objects because there is already a dedicated field into table llx_actioncomm.
- if (!empty($object->elementid) && !empty($object->elementtype) && !in_array($object->elementtype, array('societe', 'contact', 'project'))) {
+ if (!empty($object->elementid) && !empty($object->elementtype) && !in_array($object->elementtype, ['societe', 'contact', 'project'])) {
include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
print ' | ' . $langs->trans("LinkedObject") . ' | ';
$link = dolGetElementUrl($object->elementid, $object->elementtype, ($object->elementtype == 'user' ? -1 : 1));
@@ -2958,7 +2958,7 @@ function setdatefields()
if (getDolGlobalString('AGENDA_ENABLE_LINKED_ELEMENTS')) {
// Show links to link elements
- $tmparray = $form->showLinkToObjectBlock($object, [], array('myobject'), 1);
+ $tmparray = $form->showLinkToObjectBlock($object, [], ['myobject'], 1);
if (is_array($tmparray)) {
$linktoelem = $tmparray['linktoelem'];
$htmltoenteralink = $tmparray['htmltoenteralink'];
diff --git a/tabs/googleapi_emails.php b/tabs/googleapi_emails.php
index b502c4b..c44253c 100644
--- a/tabs/googleapi_emails.php
+++ b/tabs/googleapi_emails.php
@@ -53,7 +53,7 @@
$rowid = (int) GETPOST('rowid', 'int');
$ref = GETPOST('ref', 'alpha');
// Note that conf->hooks_modules contains array
-$hookmanager->initHooks(array('googleapiemaillist', 'globalcard'));
+$hookmanager->initHooks(['googleapiemaillist', 'globalcard']);
$linkback = '';
// Initialize technical objects
@@ -205,15 +205,15 @@
//$socid = $user->socid;
accessforbidden();
}
-$arrayofjs = array(
+$arrayofjs = [
'https://uicdn.toast.com/tui.code-snippet/latest/tui-code-snippet.js',
'https://uicdn.toast.com/tui.pagination/latest/tui-pagination.js',
'https://uicdn.toast.com/tui-grid/latest/tui-grid.js',
-);
-$arrayofcss = array(
+];
+$arrayofcss = [
'https://uicdn.toast.com/tui-grid/latest/tui-grid.css',
'https://uicdn.toast.com/tui.pagination/latest/tui-pagination.css',
-);
+];
llxHeader('', $pagetitle, '', '', 0, 0, $arrayofjs, $arrayofcss);
@@ -241,24 +241,24 @@
print ' ';
- $arrayfields = array(
- 'rowid' => array(
+ $arrayfields = [
+ 'rowid' => [
'label' => $langs->transnoentities("Id"),
'checked' => 1
- ),
- 'userid' => array(
+ ],
+ 'userid' => [
'label' => $langs->transnoentities("GoogleApiUserId"),
'checked' => 1
- ),
- 'fk_object' => array(
+ ],
+ 'fk_object' => [
'label' => $langs->transnoentities("ObjectId"),
'checked' => 1,
- ),
- 'messageid' => array(
+ ],
+ 'messageid' => [
'label' => $langs->transnoentities("GoogleApiMessageId"),
'checked' => 1,
- ),
- );
+ ],
+ ];
print '';
print " |