Merge pull request #22132 from dolibit-ut/patch-534

Update list.php
This commit is contained in:
Laurent Destailleur 2022-09-09 17:11:46 +02:00 committed by GitHub
commit d8000a0364
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,9 +16,9 @@
*/ */
/** /**
* \file htdocs/bookmarks/list.php * \file htdocs/bookmarks/list.php
* \brief Page to display list of bookmarks * \ingroup bookmark
* \ingroup bookmark * \brief Page to display list of bookmarks
*/ */
// Load Dolibarr environment // Load Dolibarr environment
@ -28,17 +28,14 @@ require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php';
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array('bookmarks', 'admin')); $langs->loadLangs(array('bookmarks', 'admin'));
// Get Parameters
$action = GETPOST('action', 'aZ09'); $action = GETPOST('action', 'aZ09');
$massaction = GETPOST('massaction', 'alpha'); $massaction = GETPOST('massaction', 'alpha');
$show_files = GETPOST('show_files', 'int'); $show_files = GETPOST('show_files', 'int');
$confirm = GETPOST('confirm', 'alpha'); $confirm = GETPOST('confirm', 'alpha');
$toselect = GETPOST('toselect', 'array'); $toselect = GETPOST('toselect', 'array');
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search $contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search
$id = GETPOST("id", 'int');
// Security check
if (empty($user->rights->bookmark->lire)) {
restrictedArea($user, 'bookmarks');
}
$optioncss = GETPOST('optioncss', 'alpha'); $optioncss = GETPOST('optioncss', 'alpha');
// Load variable for pagination // Load variable for pagination
@ -59,10 +56,13 @@ if (!$sortorder) {
$sortorder = 'ASC'; $sortorder = 'ASC';
} }
$id = GETPOST("id", 'int'); // Initialize Objects
$object = new Bookmark($db); $object = new Bookmark($db);
// Security check
restrictedArea($user, 'bookmarks');
// Permissions
$permissiontoread = !empty($user->rights->bookmark->lire); $permissiontoread = !empty($user->rights->bookmark->lire);
$permissiontoadd = !empty($user->rights->bookmark->creer); $permissiontoadd = !empty($user->rights->bookmark->creer);
$permissiontodelete = !empty($user->rights->bookmark->supprimer); $permissiontodelete = !empty($user->rights->bookmark->supprimer);
@ -83,6 +83,7 @@ if ($action == 'delete') {
} }
/* /*
* View * View
*/ */