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
SWITCHwayf
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
0
Merge Requests
0
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
Guillaume Rousse
SWITCHwayf
Commits
1239b356
Commit
1239b356
authored
Sep 26, 2013
by
haemmer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed Logo properties
If category 'unkonwn' is the only category, it won't be displayed
parent
17ef5c3e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
19 deletions
+23
-19
readMetadata.php
readMetadata.php
+13
-9
templates.php
templates.php
+10
-10
No files found.
readMetadata.php
View file @
1239b356
...
...
@@ -337,16 +337,20 @@ function processIDPRoleDescriptor($IDPRoleDescriptorNode){
$MDUILogos
=
getMDUILogos
(
$IDPRoleDescriptorNode
);
foreach
(
$MDUILogos
as
$Logo
){
// Skip non-favicon logos
if
(
$Logo
[
'
height'
]
!=
16
||
$Logo
[
'w
idth'
]
!=
16
){
if
(
$Logo
[
'
Height'
]
!=
16
||
$Logo
[
'W
idth'
]
!=
16
){
continue
;
}
if
(
$Logo
[
'lang'
]
==
''
){
unset
(
$Logo
[
'lang'
]);
// Strip height and width
unset
(
$Logo
[
'Height'
]);
unset
(
$Logo
[
'Width'
]);
if
(
$Logo
[
'Lang'
]
==
''
){
unset
(
$Logo
[
'Lang'
]);
$IDP
[
'Logo'
]
=
$Logo
;
}
else
{
$lang
=
$Logo
[
'
l
ang'
];
unset
(
$Logo
[
'
l
ang'
]);
$lang
=
$Logo
[
'
L
ang'
];
unset
(
$Logo
[
'
L
ang'
]);
$IDP
[
$lang
][
'Logo'
]
=
$Logo
;
}
}
...
...
@@ -556,10 +560,10 @@ function getMDUILogos($RoleDescriptorNode){
$MDUILogos
=
$RoleDescriptorNode
->
getElementsByTagNameNS
(
'urn:oasis:names:tc:SAML:metadata:ui'
,
'Logo'
);
foreach
(
$MDUILogos
as
$MDUILogoEntry
){
$Logo
=
Array
();
$Logo
[
'
url
'
]
=
trim
(
$MDUILogoEntry
->
nodeValue
);
$Logo
[
'
h
eight'
]
=
(
$MDUILogoEntry
->
getAttribute
(
'height'
)
!=
''
)
?
trim
(
$MDUILogoEntry
->
getAttribute
(
'height'
))
:
'16'
;
$Logo
[
'
w
idth'
]
=
(
$MDUILogoEntry
->
getAttribute
(
'width'
)
!=
''
)
?
trim
(
$MDUILogoEntry
->
getAttribute
(
'width'
))
:
'16'
;
$Logo
[
'
l
ang'
]
=
(
$MDUILogoEntry
->
getAttribute
(
'lang'
)
!=
''
)
?
trim
(
$MDUILogoEntry
->
getAttribute
(
'lang'
))
:
''
;
$Logo
[
'
URL
'
]
=
trim
(
$MDUILogoEntry
->
nodeValue
);
$Logo
[
'
H
eight'
]
=
(
$MDUILogoEntry
->
getAttribute
(
'height'
)
!=
''
)
?
trim
(
$MDUILogoEntry
->
getAttribute
(
'height'
))
:
'16'
;
$Logo
[
'
W
idth'
]
=
(
$MDUILogoEntry
->
getAttribute
(
'width'
)
!=
''
)
?
trim
(
$MDUILogoEntry
->
getAttribute
(
'width'
))
:
'16'
;
$Logo
[
'
L
ang'
]
=
(
$MDUILogoEntry
->
getAttribute
(
'lang'
)
!=
''
)
?
trim
(
$MDUILogoEntry
->
getAttribute
(
'lang'
))
:
''
;
$Logos
[]
=
$Logo
;
}
...
...
templates.php
View file @
1239b356
...
...
@@ -136,10 +136,12 @@ function printDropDownList($IDProviders, $selectedIDP = ''){
</optgroup>'
;
}
// Add another category
echo
'
<optgroup label="'
.
$IdPName
.
'">'
;
// Add another category unless first (and probably only) category is unknown
if
(
!
empty
(
$optgroup
)
&&
$key
!=
'unknown'
){
echo
'
<optgroup label="'
.
$IdPName
.
'">'
;
$optgroup
=
$key
;
}
}
continue
;
...
...
@@ -152,12 +154,10 @@ function printDropDownList($IDProviders, $selectedIDP = ''){
$selected
=
''
;
}
// Add logo to extension string
// Add logo
(which is assumed to be 16x16px)
to extension string
$logo
=
''
;
if
(
isset
(
$values
[
'Logo'
])){
if
(
$values
[
'Logo'
][
'height'
]
==
16
&&
$values
[
'Logo'
][
'width'
]
==
16
){
$logo
=
'logo="'
.
$values
[
'Logo'
][
'url'
]
.
'"'
;
}
$logo
=
'logo="'
.
$values
[
'Logo'
][
'URL'
]
.
'"'
;
}
echo
'
...
...
@@ -203,7 +203,7 @@ function printNotice(){
if
(
$permanentUserIdP
!=
''
){
$hiddenUserIdPInput
=
'<input type="hidden" name="user_idp" value="'
.
$permanentUserIdP
.
'">'
;
$permanentUserIdPName
=
$IDProviders
[
$permanentUserIdP
][
'Name'
];
$permanentUserIdPLogo
=
$IDProviders
[
$permanentUserIdP
][
'Logo'
][
'
url
'
];
$permanentUserIdPLogo
=
$IDProviders
[
$permanentUserIdP
][
'Logo'
][
'
URL
'
];
}
// Check if footer template exists
...
...
@@ -293,8 +293,8 @@ function printEmbeddedWAYFScript(){
}
// Logo URL
if
(
isset
(
$IDProvider
[
'Logo'
][
'
url
'
])){
$IdPLogoURL
=
$IDProvider
[
'Logo'
][
'
url
'
];
if
(
isset
(
$IDProvider
[
'Logo'
][
'
URL
'
])){
$IdPLogoURL
=
$IDProvider
[
'Logo'
][
'
URL
'
];
}
else
{
$IdPLogoURL
=
''
;
}
...
...
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