Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Xavier Bachelot
lemonldap-ng
Commits
4ce57432
Commit
4ce57432
authored
Dec 07, 2009
by
Clément OUDOT
Browse files
Use local configuration to override sessions.pl parameters
parent
3faa9329
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
View file @
4ce57432
...
@@ -8,6 +8,8 @@ package Lemonldap::NG::Manager::Sessions;
...
@@ -8,6 +8,8 @@ package Lemonldap::NG::Manager::Sessions;
use
strict
;
use
strict
;
use
Lemonldap::NG::Handler::
CGI
qw(:globalStorage :locationRules)
;
use
Lemonldap::NG::Handler::
CGI
qw(:globalStorage :locationRules)
;
use
Lemonldap::NG::Common::Apache::
Session
;
#inherits
use
Lemonldap::NG::Common::Apache::
Session
;
#inherits
use
Lemonldap::NG::Common::
Conf
;
#link protected conf Configuration
use
Lemonldap::NG::Common::Conf::
Constants
;
#inherits
#inherits Apache::Session
#inherits Apache::Session
...
@@ -31,6 +33,20 @@ sub new {
...
@@ -31,6 +33,20 @@ sub new {
my
$self
=
$class
->
SUPER::
new
(
$args
)
my
$self
=
$class
->
SUPER::
new
(
$args
)
or
$class
->
abort
(
'
Unable to start
'
.
__PACKAGE__
,
or
$class
->
abort
(
'
Unable to start
'
.
__PACKAGE__
,
'
See Apache logs for more
'
);
'
See Apache logs for more
'
);
# Try to get configuration values from local configuration
my
$config
=
Lemonldap::NG::Common::
Conf
->
new
(
$self
->
{
configStorage
}
);
unless
(
$config
)
{
$self
->
abort
(
"
Unable to start
",
"
Configuration not loaded
\n
"
.
$
Lemonldap::NG::Common::Conf::
msg
);
}
my
$localconf
=
$config
->
getLocalConf
(
MANAGERSECTION
);
if
(
$localconf
)
{
$self
->
{
$_
}
=
$args
->
{
$_
}
||
$localconf
->
{
$_
}
foreach
(
keys
%$localconf
);
}
# Check some paramaters
foreach
(
qw(jqueryUri personnalCss imagePath)
)
{
foreach
(
qw(jqueryUri personnalCss imagePath)
)
{
$self
->
{
$_
}
$self
->
{
$_
}
or
$self
->
lmLog
(
"
$_
is not set, falling to default value
",
'
debug
'
);
or
$self
->
lmLog
(
"
$_
is not set, falling to default value
",
'
debug
'
);
...
...
Write
Preview
Supports
Markdown
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