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
be4b7941
Commit
be4b7941
authored
5 years ago
by
Tim van Dijen
Browse files
Options
Downloads
Patches
Plain Diff
Make sure that certain modules are always enabled, unless specifically disabled by config
parent
444a946a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/SimpleSAML/Module.php
+15
-3
15 additions, 3 deletions
lib/SimpleSAML/Module.php
with
15 additions
and
3 deletions
lib/SimpleSAML/Module.php
+
15
−
3
View file @
be4b7941
...
...
@@ -69,6 +69,16 @@ class Module
*/
public
static
$modules
=
[];
/**
* A list containing the modules that are enabled by default, unless specifically disabled
*
* @var array
*/
public
static
$core_modules
=
[
'core'
=>
true
,
'saml'
=>
true
];
/**
* A cache containing specific information for modules, like whether they are enabled or not, or their hooks.
*
...
...
@@ -109,7 +119,7 @@ class Module
public
static
function
isModuleEnabled
(
string
$module
):
bool
{
$config
=
Configuration
::
getOptionalConfig
();
return
self
::
isModuleEnabledWithConf
(
$module
,
$config
->
getArray
(
'module.enable'
,
[]
));
return
self
::
isModuleEnabledWithConf
(
$module
,
$config
->
getArray
(
'module.enable'
,
$this
->
core_modules
));
}
...
...
@@ -342,8 +352,10 @@ class Module
throw
new
\Exception
(
"Invalid module.enable value for the '
$module
' module."
);
}
self
::
$module_info
[
$module
][
'enabled'
]
=
false
;
return
false
;
$core_module
=
array_key_exists
(
$module
,
$this
->
core_modules
)
?
true
:
false
;
self
::
$module_info
[
$module
][
'enabled'
]
=
$core_module
?
true
:
false
;
return
$core_module
?
true
:
false
;
}
...
...
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