| @@ -15,10 +15,10 @@ | ||
| 15 | 15 | $tagClass = new TagClass(); |
| 16 | 16 | $data = []; |
| 17 | 17 | $data['search'] = $this->getVarFiltersListing('string', 'lists_search', ''); |
| 18 | 18 | $data['tag'] = $this->getVarFiltersListing('string', 'lists_tag', ''); |
| 19 | - $data['ordering'] = $this->getVarFiltersListing('string', 'lists_ordering', 'id'); | |
| 20 | - $data['orderingSortOrder'] = $this->getVarFiltersListing('string', 'lists_ordering_sort_order', 'desc'); | |
| 19 | + $data['ordering'] = $this->getVarFiltersListing('cmd', 'lists_ordering', 'id'); | |
| 20 | + $data['orderingSortOrder'] = $this->getVarFiltersListing('cmd', 'lists_ordering_sort_order', 'desc'); | |
| 21 | 21 | $data['status'] = $this->getVarFiltersListing('string', 'lists_status', ''); |
| 22 | 22 | $data['allTags'] = $tagClass->getAllTagsByType(TagClass::TYPE_LIST); |
| 23 | 23 | $data['pagination'] = new PaginationHelper(); |
| 24 | 24 | |
| @@ -53,9 +53,8 @@ | ||
| 53 | 53 | acym_translation('ACYM_EXPORT').' (<span id="acym__lists__listing__number_to_export" data-default="0"></span>)', |
| 54 | 54 | ['data-task' => 'export', 'type' => 'submit', 'data-ctrl' => 'users', 'id' => 'acym__list__export'], |
| 55 | 55 | 'download' |
| 56 | 56 | ); |
| 57 | - $toolbarHelper->addOtherContent('<input type="hidden" name="preselectList" value="1" />'); | |
| 58 | 57 | $toolbarHelper->addButton(acym_translation('ACYM_CREATE'), ['data-task' => 'settings'], 'playlist_add', true); |
| 59 | 58 | |
| 60 | 59 | $data['toolbar'] = $toolbarHelper; |
| 61 | 60 | } |
| @@ -74,11 +73,13 @@ | ||
| 74 | 73 | } |
| 75 | 74 | |
| 76 | 75 | protected function prepareListsListing(array &$data): void |
| 77 | 76 | { |
| 77 | + // Prepare the pagination | |
| 78 | 78 | $listsPerPage = $data['pagination']->getListLimit(); |
| 79 | 79 | $page = $this->getVarFiltersListing('int', 'lists_pagination_page', 1); |
| 80 | 80 | |
| 81 | + // Get the matching lists | |
| 81 | 82 | $matchingLists = $this->getMatchingElementsFromData( |
| 82 | 83 | [ |
| 83 | 84 | 'search' => $data['search'], |
| 84 | 85 | 'tag' => $data['tag'], |