mirror of
https://github.com/processwire/processwire.git
synced 2025-08-13 02:04:35 +02:00
Fix issue in Lister bookmarks where columns could be lost for a non-superuser owned bookmark when modifying an existing bookmark
This commit is contained in:
@@ -534,7 +534,7 @@ class ProcessPageListerBookmarks extends Wire {
|
||||
$bookmarkSelector = str_replace(', , ', ', ', $bookmarkSelector);
|
||||
$bookmarkSelector = trim($bookmarkSelector, ', ');
|
||||
|
||||
if($bookmarkID) {
|
||||
if($bookmarkID && $this->user->isSuperuser()) {
|
||||
$bookmarkColumns = $input->post('bookmark_columns');
|
||||
foreach($bookmarkColumns as $cnt => $column) {
|
||||
$column = $sanitizer->name($column);
|
||||
@@ -545,6 +545,8 @@ class ProcessPageListerBookmarks extends Wire {
|
||||
}
|
||||
}
|
||||
$bookmarkColumns = array_values($bookmarkColumns);
|
||||
} else if($bookmarkID && $existingBookmark) {
|
||||
$bookmarkColumns = $existingBookmark['columns'];
|
||||
} else {
|
||||
$bookmarkColumns = $this->lister->columns;
|
||||
}
|
||||
|
Reference in New Issue
Block a user