Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_dashboard
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_dashboard
Commits
af6dbb7a
Commit
af6dbb7a
authored
6 months ago
by
Eric Bremner
Browse files
Options
Downloads
Patches
Plain Diff
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
!38
ISTWCMS-6978: Add code to view all webforms in webform list block on dashboard
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
uw_dashboard.module
+5
-5
5 additions, 5 deletions
uw_dashboard.module
with
5 additions
and
5 deletions
uw_dashboard.module
+
5
−
5
View file @
af6dbb7a
...
...
@@ -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
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment