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
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
2c0733cf
Unverified
Commit
2c0733cf
authored
7 years ago
by
Tim van Dijen
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
PSR-2
parent
eb6e017c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/portal/lib/Portal.php
+30
-22
30 additions, 22 deletions
modules/portal/lib/Portal.php
with
30 additions
and
22 deletions
modules/portal/lib/Portal.php
+
30
−
22
View file @
2c0733cf
<?php
class
sspmod_portal_Portal
{
class
sspmod_portal_Portal
{
private
$pages
;
private
$config
;
function
__construct
(
$pages
,
$config
=
NULL
)
{
public
function
__construct
(
$pages
,
$config
=
null
)
{
$this
->
pages
=
$pages
;
$this
->
config
=
$config
;
}
function
getTabset
(
$thispage
)
{
if
(
!
isset
(
$this
->
config
))
return
NULL
;
foreach
(
$this
->
config
AS
$set
)
{
public
function
getTabset
(
$thispage
)
{
if
(
!
isset
(
$this
->
config
))
{
return
null
;
}
foreach
(
$this
->
config
as
$set
)
{
if
(
in_array
(
$thispage
,
$set
,
true
))
{
return
$set
;
}
}
return
NULL
;
return
null
;
}
function
isPortalized
(
$thispage
)
{
foreach
(
$this
->
config
AS
$set
)
{
public
function
isPortalized
(
$thispage
)
{
foreach
(
$this
->
config
as
$set
)
{
if
(
in_array
(
$thispage
,
$set
,
true
))
{
return
TRUE
;
return
true
;
}
}
return
FALSE
;
return
false
;
}
function
getLoginInfo
(
$translator
,
$thispage
)
{
public
function
getLoginInfo
(
$translator
,
$thispage
)
{
$info
=
array
(
'info'
=>
''
,
'translator'
=>
$translator
,
'thispage'
=>
$thispage
);
SimpleSAML\Module
::
callHooks
(
'portalLoginInfo'
,
$info
);
return
$info
[
'info'
];
}
function
getMenu
(
$thispage
)
{
public
function
getMenu
(
$thispage
)
{
$config
=
SimpleSAML_Configuration
::
getInstance
();
$t
=
new
SimpleSAML\Locale\Translate
(
$config
);
$tabset
=
$this
->
getTabset
(
$thispage
);
$logininfo
=
$this
->
getLoginInfo
(
$t
,
$thispage
);
$text
=
''
;
$text
.
=
'<ul class="tabset_tabs ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">'
;
foreach
(
$this
->
pages
AS
$pageid
=>
$page
)
{
if
(
isset
(
$tabset
)
&&
!
in_array
(
$pageid
,
$tabset
,
TRUE
))
continue
;
foreach
(
$this
->
pages
as
$pageid
=>
$page
)
{
if
(
isset
(
$tabset
)
&&
!
in_array
(
$pageid
,
$tabset
,
true
))
{
continue
;
}
$name
=
'uknown'
;
if
(
isset
(
$page
[
'text'
]))
$name
=
$page
[
'text'
];
if
(
isset
(
$page
[
'shorttext'
]))
$name
=
$page
[
'shorttext'
];
if
(
isset
(
$page
[
'text'
]))
{
$name
=
$page
[
'text'
];
}
if
(
isset
(
$page
[
'shorttext'
]))
{
$name
=
$page
[
'shorttext'
];
}
if
(
!
isset
(
$page
[
'href'
]))
{
$text
.
=
'<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#">'
.
$t
->
t
(
$name
)
.
'</a></li>'
;
}
else
if
(
$pageid
===
$thispage
)
{
...
...
@@ -66,6 +76,4 @@ class sspmod_portal_Portal {
return
$text
;
}
}
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