Skip to content
Snippets Groups Projects
Commit af6dbb7a authored by Eric Bremner's avatar Eric Bremner
Browse files

ISTWCMS-6978: update code that sets paginator id to use straight variable instead of array

parent bd28d341
No related branches found
No related tags found
1 merge request!38ISTWCMS-6978: Add code to view all webforms in webform list block on dashboard
......@@ -129,11 +129,11 @@ function uw_dashboard_entity_type_alter(array &$entity_types) {
function uw_dashboard_views_pre_execute(ViewExecutable $view) {
// Have a variable that can be used "globally".
static $view_instances = [];
static $view_instances_count;
// If there is no count yet, set it to 0.
if (!isset($view_instances['count'])) {
$view_instances['count'] = 0;
if (!isset($view_instances_count)) {
$view_instances_count = 0;
}
// The views that need the pager id adjusted.
......@@ -148,9 +148,9 @@ function uw_dashboard_views_pre_execute(ViewExecutable $view) {
if (in_array($view->id(), $view_ids)) {
// Increment the counter, so we get the correct pager id.
$view_instances['count']++;
$view_instances_count++;
// Set the pager id in the view.
$view->pager->options['id'] = $view_instances['count'];
$view->pager->options['id'] = $view_instances_count;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment