Fix warning
This commit is contained in:
parent
707101b913
commit
79ecc945e9
@ -37,6 +37,7 @@ $toselect = GETPOST('toselect', 'array');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search
|
||||
$id = GETPOST("id", 'int');
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
$mode = GETPOST('mode', 'aZ09');
|
||||
|
||||
// Load variable for pagination
|
||||
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;
|
||||
|
||||
@ -204,7 +204,7 @@ class MenuManager
|
||||
//if ($tmpmainmenu=='accountancy') {
|
||||
//var_dump($submenu->liste); exit;
|
||||
//}
|
||||
$nexturl = dol_buildpath($submenu->liste[0]['url'], 1);
|
||||
$nexturl = dol_buildpath(empty($submenu->liste[0]['url']) ? '' : $submenu->liste[0]['url'], 1);
|
||||
|
||||
$canonrelurl = preg_replace('/\?.*$/', '', $relurl);
|
||||
$canonnexturl = preg_replace('/\?.*$/', '', $nexturl);
|
||||
|
||||
@ -109,8 +109,8 @@ if ($conf->use_javascript_ajax && 1 == 2) { // select2 is not best with smartp
|
||||
$keysearch = 'search_all';
|
||||
|
||||
$accesskey = '';
|
||||
if (!$accesskeyalreadyassigned[$val['label'][0]]) {
|
||||
$accesskey = $val['label'][0];
|
||||
if (empty($accesskeyalreadyassigned[$val['label'][0]])) {
|
||||
$accesskey = $val['label'][0]; // First char of string
|
||||
$accesskeyalreadyassigned[$accesskey] = $accesskey;
|
||||
}
|
||||
|
||||
|
||||
@ -87,7 +87,7 @@ require_once __DIR__.'/class/myobject.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("mymodule@mymodule", "other"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||
$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ...
|
||||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||
$show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk actions ?
|
||||
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
||||
@ -96,7 +96,7 @@ $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
$mode = GETPOST('mode', 'aZ');
|
||||
$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
@ -182,9 +182,9 @@ $arrayfields = dol_sort_array($arrayfields, 'position');
|
||||
// Set $enablepermissioncheck to 1 to enable a minimum low level of checks
|
||||
$enablepermissioncheck = 0;
|
||||
if ($enablepermissioncheck) {
|
||||
$permissiontoread = $user->rights->mymodule->myobject->read;
|
||||
$permissiontoadd = $user->rights->mymodule->myobject->write;
|
||||
$permissiontodelete = $user->rights->mymodule->myobject->delete;
|
||||
$permissiontoread = $user->hasRight('mymodule', 'myobject', 'read');
|
||||
$permissiontoadd = $user->hasRight('mymodule', 'myobject', 'write');
|
||||
$permissiontodelete = $user->hasRight('mymodule', 'myobject', 'delete');
|
||||
} else {
|
||||
$permissiontoread = 1;
|
||||
$permissiontoadd = 1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user