LEMONLDAP::NG : little bugs in customFunctions
This commit is contained in:
parent
d88ae29227
commit
e42c8b263f
|
@ -270,8 +270,9 @@ sub safe {
|
|||
$safe->share( '&encode_base64', '$datas', '&lmSetHeaderIn', '$apacheRequest', @t );
|
||||
foreach(@t) {
|
||||
$class->lmLog("Custom function : $_",'debug');
|
||||
$_ = "$class\::$_" unless(/::/);
|
||||
eval "sub $_ {
|
||||
return $class\::$_(\$apacheRequest->uri
|
||||
return $_(\$apacheRequest->uri
|
||||
. ( \$apacheRequest->args ? '?' . \$apacheRequest->args : '' )
|
||||
, \@_)
|
||||
}";
|
||||
|
|
|
@ -23,8 +23,10 @@ sub _safe {
|
|||
$self->{_safe} = new Safe;
|
||||
my @t = split /\s+/, $self->{customFunctions};
|
||||
foreach(@t) {
|
||||
next if(__PACKAGE__->can($_));
|
||||
my $sub = "$self->{caller}::$_" unless(/::/);
|
||||
eval "sub $_ {
|
||||
return $self->{caller}::$_(\$path,\@_);
|
||||
return $sub(\$path,\@_);
|
||||
}";
|
||||
print STDERR "$@\n" if($@);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user