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
LemonLDAP NG
lemonldap-ng
Commits
9caab590
Commit
9caab590
authored
Jan 12, 2017
by
Yadd
Browse files
Avoid some warnings
parent
60707051
Changes
3
Hide whitespace changes
Inline
Side-by-side
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Jail.pm
View file @
9caab590
...
...
@@ -24,9 +24,13 @@ sub build_jail {
my
(
$self
,
$api
)
=
@_
;
return
$self
->
jail
if
(
$self
->
jail
&&
$self
->
jail
->
useSafeJail
==
$self
->
useSafeJail
&&
$self
->
jail
->
customFunctions
==
$self
->
customFunctions
);
if
(
$self
->
jail
and
$self
->
jail
->
useSafeJail
and
$self
->
jail
->
customFunctions
and
$self
->
useSafeJail
and
$self
->
customFunctions
and
$self
->
jail
->
useSafeJail
==
$self
->
useSafeJail
and
$self
->
jail
->
customFunctions
==
$self
->
customFunctions
);
$self
->
useSafeJail
(
1
)
unless
defined
$self
->
useSafeJail
;
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Main/Reload.pm
View file @
9caab590
...
...
@@ -205,9 +205,13 @@ sub defaultValuesInit {
my
$name
=
'
vhost
'
.
ucfirst
(
$opt
);
foreach
my
$vhost
(
keys
%
{
$conf
->
{
vhostOptions
}
}
)
{
my
$val
=
$conf
->
{
vhostOptions
}
->
{
$vhost
}
->
{
$name
};
$class
->
lmLog
(
"
Options
$opt
for vhost
$vhost
:
$val
",
'
debug
'
);
$class
->
tsv
->
{
$opt
}
->
{
$vhost
}
=
$val
if
(
$val
>=
0
);
# Keep default value if $val is negative
# Keep default value if $val is negative
if
(
defined
$val
and
$val
>=
0
)
{
$class
->
lmLog
(
"
Options
$opt
for vhost
$vhost
:
$val
",
'
debug
'
);
$class
->
tsv
->
{
$opt
}
->
{
$vhost
}
=
$val
;
}
}
}
}
...
...
@@ -332,7 +336,7 @@ sub headersInit {
foreach
my
$vhost
(
keys
%
{
$conf
->
{
exportedHeaders
}
}
)
{
my
%headers
=
%
{
$conf
->
{
exportedHeaders
}
->
{
$vhost
}
};
$class
->
tsv
->
{
headerList
}
->
{
$vhost
}
=
[
keys
%headers
];
my
$sub
;
my
$sub
=
''
;
foreach
(
keys
%headers
)
{
my
$val
=
$class
->
substitute
(
$headers
{
$_
}
);
$sub
.=
"
('
$_
' =>
$val
),
";
...
...
lemonldap-ng-manager/t/12-save-changed-conf.t
View file @
9caab590
...
...
@@ -66,12 +66,12 @@ count(7);
# TODO: check result of this
ok
(
$res
=
&client
->
jsonResponse
('
/diff/1/2
'),
'
Diff called
'
);
my
(
@c1
,
@c2
);
ok
(
@c1
=
sort
(
keys
%
{
$res
->
[
0
]
}
),
'
diff() detects changes in conf 1
'
);
ok
(
@c2
=
sort
(
keys
%
{
$res
->
[
1
]
}
),
'
diff() detects changes in conf 2
'
);
ok
(
(
@c1
=
sort
keys
%
{
$res
->
[
0
]
}
),
'
diff() detects changes in conf 1
'
);
ok
(
(
@c2
=
sort
keys
%
{
$res
->
[
1
]
}
),
'
diff() detects changes in conf 2
'
);
ok
(
@c1
==
12
,
'
12 keys changed in conf 1
'
)
or
print
STDERR
"
Expect: 11, get:
"
.
@c1
.
"
\n
";
or
print
STDERR
"
Expect: 11
keys
, get:
"
.
join
(
'
,
',
@c1
)
.
"
\n
";
ok
(
@c2
==
13
,
'
13 keys changed or created in conf 2
'
)
or
print
STDERR
"
Expect: 14, get:
"
.
@c2
.
"
\n
";
or
print
STDERR
"
Expect: 14
keys
, get:
"
.
join
(
'
,
',
@c2
)
.
"
\n
";
count
(
5
);
...
...
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