Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
switch-wayf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GIP RENATER
switch-wayf
Commits
b63211b3
Commit
b63211b3
authored
Mar 15, 2019
by
Geoffroy ARNOUD
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regression on optgroups display
parent
268ebc26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
lib/idpApiObjects.php
lib/idpApiObjects.php
+10
-2
No files found.
lib/idpApiObjects.php
View file @
b63211b3
...
...
@@ -154,7 +154,8 @@ final class IdpRepository
$firstGroup
=
true
;
$firstGroupName
=
''
;
if
(
!
empty
(
$array
))
{
$array
[
0
]
->
type
;
$firstGroupName
=
$array
[
0
]
->
type
;
// logInfo(sprintf("firstGroupName = %s", $firstGroupName));
}
foreach
(
$array
as
$key
=>
$idpObject
)
{
...
...
@@ -164,6 +165,12 @@ final class IdpRepository
$group
=
new
IdpGroup
();
$group
->
text
=
$type
;
$tmp
[
$type
]
=
$group
;
// logInfo(sprintf(
// "hideFirstGroup = %s, type = %s, firstGroupName = %s",
// $hideFirstGroup?"true":"false",
// $type,
// $firstGroupName
// ));
$group
->
hide
=
$hideFirstGroup
&&
(
$type
==
$firstGroupName
);
}
$tmp
[
$type
]
->
children
[]
=
$idpObject
;
...
...
@@ -209,8 +216,9 @@ final class IdpRepository
$lastPageLastGroup
=
$this
->
idpObjects
[
$pageNumber
*
$pageSize
-
1
]
->
type
;
$thisPageFirstGroup
=
$this
->
idpObjects
[
$pageNumber
*
$pageSize
]
->
type
;
$hideFirstGroup
=
(
$lastPageLastGroup
==
$thisPageFirstGroup
);
// logInfo(sprintf("lastPageLastGroup = %s / thisPageFirstGroup = %s", $lastPageLastGroup, $thisPageFirstGroup));
}
// logInfo(sprintf("hideFirstGroup = %s", $hideFirstGroup?"true":"false"));
$result
{
"results"
}
=
$this
->
toGroups
(
$idpPage
,
$hideFirstGroup
);
$result
{
"pagination"
}{
"more"
}
=
((
$pageNumber
+
1
)
*
$pageSize
<=
sizeof
(
$array
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment