Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simplesamlphp
Manage
Activity
Members
Labels
Plan
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Perun
Perun ProxyIdP
v1
simplesamlphp
Commits
580be5fe
Commit
580be5fe
authored
8 years ago
by
Hanne Moa
Browse files
Options
Downloads
Patches
Plain Diff
Get rid of the mtype-function
For #454, #455
parent
6cedf278
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/core/templates/frontpage_federation.tpl.php
+3
-33
3 additions, 33 deletions
modules/core/templates/frontpage_federation.tpl.php
modules/core/www/frontpage_federation.php
+16
-2
16 additions, 2 deletions
modules/core/www/frontpage_federation.php
with
19 additions
and
35 deletions
modules/core/templates/frontpage_federation.tpl.php
+
3
−
33
View file @
580be5fe
...
@@ -10,41 +10,11 @@ if ($this->data['isadmin']) {
...
@@ -10,41 +10,11 @@ if ($this->data['isadmin']) {
$this
->
t
(
'{core:frontpage:login_as_admin}'
)
.
'</a></p>'
;
$this
->
t
(
'{core:frontpage:login_as_admin}'
)
.
'</a></p>'
;
}
}
function
mtype
(
$set
)
{
switch
(
$set
)
{
case
'saml20-sp-remote'
:
return
'{admin:metadata_saml20-sp}'
;
case
'saml20-sp-hosted'
:
return
'{admin:metadata_saml20-sp}'
;
case
'saml20-idp-remote'
:
return
'{admin:metadata_saml20-idp}'
;
case
'saml20-idp-hosted'
:
return
'{admin:metadata_saml20-idp}'
;
case
'shib13-sp-remote'
:
return
'{admin:metadata_shib13-sp}'
;
case
'shib13-sp-hosted'
:
return
'{admin:metadata_shib13-sp}'
;
case
'shib13-idp-remote'
:
return
'{admin:metadata_shib13-idp}'
;
case
'shib13-idp-hosted'
:
return
'{admin:metadata_shib13-idp}'
;
case
'adfs-sp-remote'
:
return
'{admin:metadata_adfs-sp}'
;
case
'adfs-sp-hosted'
:
return
'{admin:metadata_adfs-sp}'
;
case
'adfs-idp-remote'
:
return
'{admin:metadata_adfs-idp}'
;
case
'adfs-idp-hosted'
:
return
'{admin:metadata_adfs-idp}'
;
}
}
$now
=
time
();
$now
=
time
();
echo
'<dl>'
;
echo
'<dl>'
;
if
(
is_array
(
$this
->
data
[
'metaentries'
][
'hosted'
])
&&
count
(
$this
->
data
[
'metaentries'
][
'hosted'
])
>
0
)
{
if
(
is_array
(
$this
->
data
[
'metaentries'
][
'hosted'
])
&&
count
(
$this
->
data
[
'metaentries'
][
'hosted'
])
>
0
)
{
foreach
(
$this
->
data
[
'metaentries'
][
'hosted'
]
as
$hm
)
{
foreach
(
$this
->
data
[
'metaentries'
][
'hosted'
]
as
$hm
)
{
echo
'<dt>'
.
$this
->
t
(
mtype
(
$hm
[
'metadata-set'
]
)
)
.
'</dt>'
;
echo
'<dt>'
.
$this
->
t
(
$this
->
data
[
'
mtype
'
][
$hm
[
'metadata-set'
]
]
)
.
'</dt>'
;
echo
'<dd>'
;
echo
'<dd>'
;
echo
'<p>Entity ID: '
.
$hm
[
'entityid'
];
echo
'<p>Entity ID: '
.
$hm
[
'entityid'
];
if
(
isset
(
$hm
[
'deprecated'
])
&&
$hm
[
'deprecated'
])
{
if
(
isset
(
$hm
[
'deprecated'
])
&&
$hm
[
'deprecated'
])
{
...
@@ -74,7 +44,7 @@ echo '</dl>';
...
@@ -74,7 +44,7 @@ echo '</dl>';
if
(
is_array
(
$this
->
data
[
'metaentries'
][
'remote'
])
&&
count
(
$this
->
data
[
'metaentries'
][
'remote'
])
>
0
)
{
if
(
is_array
(
$this
->
data
[
'metaentries'
][
'remote'
])
&&
count
(
$this
->
data
[
'metaentries'
][
'remote'
])
>
0
)
{
foreach
(
$this
->
data
[
'metaentries'
][
'remote'
]
as
$setkey
=>
$set
)
{
foreach
(
$this
->
data
[
'metaentries'
][
'remote'
]
as
$setkey
=>
$set
)
{
echo
'<fieldset class="fancyfieldset"><legend>'
.
$this
->
t
(
mtype
(
$setkey
)
)
.
' (Trusted)</legend>'
;
echo
'<fieldset class="fancyfieldset"><legend>'
.
$this
->
t
(
$this
->
data
[
'
mtype
'
][
$setkey
]
)
.
' (Trusted)</legend>'
;
echo
'<ul>'
;
echo
'<ul>'
;
foreach
(
$set
as
$entry
)
{
foreach
(
$set
as
$entry
)
{
echo
'<li>'
;
echo
'<li>'
;
...
@@ -128,7 +98,7 @@ if (is_array($this->data['metaentries']['remote']) && count($this->data['metaent
...
@@ -128,7 +98,7 @@ if (is_array($this->data['metaentries']['remote']) && count($this->data['metaent
<select
name=
"set"
>
<?php
<select
name=
"set"
>
<?php
if
(
is_array
(
$this
->
data
[
'metaentries'
][
'remote'
])
&&
count
(
$this
->
data
[
'metaentries'
][
'remote'
])
>
0
)
{
if
(
is_array
(
$this
->
data
[
'metaentries'
][
'remote'
])
&&
count
(
$this
->
data
[
'metaentries'
][
'remote'
])
>
0
)
{
foreach
(
$this
->
data
[
'metaentries'
][
'remote'
]
as
$setkey
=>
$set
)
{
foreach
(
$this
->
data
[
'metaentries'
][
'remote'
]
as
$setkey
=>
$set
)
{
echo
'<option value="'
.
htmlspecialchars
(
$setkey
)
.
'">'
.
$this
->
t
(
mtype
(
$setkey
)
)
.
'</option>'
;
echo
'<option value="'
.
htmlspecialchars
(
$setkey
)
.
'">'
.
$this
->
t
(
$this
->
data
[
'
mtype
'
][
$setkey
]
)
.
'</option>'
;
}
}
}
}
?>
?>
...
...
This diff is collapsed.
Click to expand it.
modules/core/www/frontpage_federation.php
+
16
−
2
View file @
580be5fe
...
@@ -109,8 +109,21 @@ foreach ($metaentries['remote'] as $key => $value) {
...
@@ -109,8 +109,21 @@ foreach ($metaentries['remote'] as $key => $value) {
}
}
}
}
# look up translated string
$mtype
=
array
(
'saml20-sp-remote'
=>
$t
->
noop
(
'{admin:metadata_saml20-sp}'
),
'saml20-sp-hosted'
=>
$t
->
noop
(
'{admin:metadata_saml20-sp}'
),
'saml20-idp-remote'
=>
$t
->
noop
(
'{admin:metadata_saml20-idp}'
),
'saml20-idp-hosted'
=>
$t
->
noop
(
'{admin:metadata_saml20-idp}'
),
'shib13-sp-remote'
=>
$t
->
noop
(
'{admin:metadata_shib13-sp}'
),
'shib13-sp-hosted'
=>
$t
->
noop
(
'{admin:metadata_shib13-sp}'
),
'shib13-idp-remote'
=>
$t
->
noop
(
'{admin:metadata_shib13-idp}'
),
'shib13-idp-hosted'
=>
$t
->
noop
(
'{admin:metadata_shib13-idp}'
),
'adfs-sp-remote'
=>
$t
->
noop
(
'{admin:metadata_adfs-sp}'
),
'adfs-sp-hosted'
=>
$t
->
noop
(
'{admin:metadata_adfs-sp}'
),
'adfs-idp-remote'
=>
$t
->
noop
(
'{admin:metadata_adfs-idp}'
),
'adfs-idp-hosted'
=>
$t
->
noop
(
'{admin:metadata_adfs-idp}'
),
);
$t
=
new
SimpleSAML_XHTML_Template
(
$config
,
'core:frontpage_federation.tpl.php'
);
$t
=
new
SimpleSAML_XHTML_Template
(
$config
,
'core:frontpage_federation.tpl.php'
);
$t
->
data
[
'pageid'
]
=
'frontpage_federation'
;
$t
->
data
[
'pageid'
]
=
'frontpage_federation'
;
...
@@ -127,6 +140,7 @@ $t->data['links_federation'] = $links_federation;
...
@@ -127,6 +140,7 @@ $t->data['links_federation'] = $links_federation;
$t
->
data
[
'metaentries'
]
=
$metaentries
;
$t
->
data
[
'metaentries'
]
=
$metaentries
;
$t
->
data
[
'mtype'
]
=
$mtype
;
$t
->
show
();
$t
->
show
();
...
...
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