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