Just a "make tidy"

environments/ppa-mbqj77/deployments/1
Xavier Guimard 15 years ago
parent 273abab2bb
commit 9001e5f028
  1. 2
      build/lemonldap-ng/Makefile
  2. 388
      build/lemonldap-ng/scripts/CSS/Minifier.pm
  3. 50
      build/lemonldap-ng/scripts/DoxyGen/Filter.pm
  4. 3
      build/lemonldap-ng/scripts/DoxyGen/PerlFilter.pm
  5. 50
      build/lemonldap-ng/scripts/DoxyGen/SQLFilter.pm
  6. 538
      build/lemonldap-ng/scripts/JavaScript/Minifier.pm
  7. 282
      build/lemonldap-ng/scripts/doc.pl
  8. 9
      build/lemonldap-ng/scripts/make_static_example.pl
  9. 13
      modules/lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/SAML/Metadata.pm
  10. 22
      modules/lemonldap-ng-handler/example/MyHandler.pm
  11. 11
      modules/lemonldap-ng-handler/example/autoProtectedCGI.pl
  12. 11
      modules/lemonldap-ng-handler/example/menu.pl
  13. 15
      modules/lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Simple.pm
  14. 19
      modules/lemonldap-ng-manager/example/index.pl
  15. 16
      modules/lemonldap-ng-manager/example/sessions.pl
  16. 11
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager.pm
  17. 2
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Downloader.pm
  18. 4
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Sessions.pm
  19. 52
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Uploader.pm
  20. 88
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_Struct.pm
  21. 354
      modules/lemonldap-ng-manager/lib/Lemonldap/NG/Manager/_i18n.pm
  22. 1
      modules/lemonldap-ng-portal/example/AuthLA/index.pl
  23. 2
      modules/lemonldap-ng-portal/example/PortalStatus.pl
  24. 12
      modules/lemonldap-ng-portal/example/error.pl
  25. 33
      modules/lemonldap-ng-portal/example/index_simple.pl
  26. 48
      modules/lemonldap-ng-portal/example/index_skin.pl
  27. 9
      modules/lemonldap-ng-portal/example/metadata.pl
  28. 1
      modules/lemonldap-ng-portal/example/slavePortal.pl

@ -617,6 +617,6 @@ default-diff:
@$(DIFF) lemonldap-ng-manager/example/sessions.pl $(LMPREFIX)/htdocs/manager/sessions.pl ||true
tidy: clean
find lemon*/ -type f -name '*.pm' -exec perltidy -b {} \;
find lemon*/ -type f \( -name '*.pm' -or -name '*.pl' \) -exec perltidy -b {} \;
find lemon*/ -name '*.bak' -delete

@ -4,7 +4,7 @@ use strict;
use warnings;
require Exporter;
our @ISA = qw(Exporter);
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(minify);
our $VERSION = '0.01';
@ -12,68 +12,68 @@ our $VERSION = '0.01';
# -----------------------------------------------------------------------------
sub isSpace {
my $x = shift;
return ($x eq ' ' || $x eq "\t");
my $x = shift;
return ( $x eq ' ' || $x eq "\t" );
}
sub isEndspace {
my $x = shift;
return ($x eq "\n" || $x eq "\r" || $x eq "\f");
my $x = shift;
return ( $x eq "\n" || $x eq "\r" || $x eq "\f" );
}
sub isWhitespace {
my $x = shift;
return (isSpace($x) || isEndspace($x));
my $x = shift;
return ( isSpace($x) || isEndspace($x) );
}
# whitespace characters before or after these characters can be removed.
sub isInfix {
my $x = shift;
return ($x eq '{' || $x eq '}' || $x eq ';' || $x eq ':');
my $x = shift;
return ( $x eq '{' || $x eq '}' || $x eq ';' || $x eq ':' );
}
# whitespace characters after these characters can be removed.
sub isPrefix {
my $x = shift;
return (isInfix($x));
my $x = shift;
return ( isInfix($x) );
}
# whitespace characters before these characters can removed.
sub isPostfix {
my $x = shift;
return (isInfix($x));
my $x = shift;
return ( isInfix($x) );
}
# -----------------------------------------------------------------------------
sub _get {
my $s = shift;
if ($s->{inputType} eq 'file') {
return getc($s->{input});
}
elsif ($s->{inputType} eq 'string') {
if ($s->{'inputPos'} < length($s->{input})) {
return substr($s->{input}, $s->{inputPos}++, 1);
my $s = shift;
if ( $s->{inputType} eq 'file' ) {
return getc( $s->{input} );
}
else { # Simulate getc() when off the end of the input string.
return undef;
elsif ( $s->{inputType} eq 'string' ) {
if ( $s->{'inputPos'} < length( $s->{input} ) ) {
return substr( $s->{input}, $s->{inputPos}++, 1 );
}
else { # Simulate getc() when off the end of the input string.
return undef;
}
}
else {
die "no input";
}
}
else {
die "no input";
}
}
sub _put {
my $s = shift;
my $x = shift;
my $outfile = ($s->{outfile});
if (defined($s->{outfile})) {
print $outfile $x;
}
else {
$s->{output} .= $x;
}
my $s = shift;
my $x = shift;
my $outfile = ( $s->{outfile} );
if ( defined( $s->{outfile} ) ) {
print $outfile $x;
}
else {
$s->{output} .= $x;
}
}
# -----------------------------------------------------------------------------
@ -82,10 +82,10 @@ sub _put {
#
# i.e. print a and advance
sub action1 {
my $s = shift;
$s->{last} = $s->{a};
_put($s, $s->{a});
action2($s);
my $s = shift;
$s->{last} = $s->{a};
_put( $s, $s->{a} );
action2($s);
}
# move b to a
@ -93,10 +93,10 @@ sub action1 {
#
# i.e. delete a and advance
sub action2 {
my $s = shift;
$s->{a} = $s->{b};
$s->{b} = $s->{c};
$s->{c} = _get($s);
my $s = shift;
$s->{a} = $s->{b};
$s->{b} = $s->{c};
$s->{c} = _get($s);
}
# -----------------------------------------------------------------------------
@ -104,20 +104,26 @@ sub action2 {
# put string literals
# when this sub is called, $s->{a} is on the opening delimiter character
sub putLiteral {
my $s = shift;
my $delimiter = $s->{a}; # ' or "
action1($s);
do {
while (defined($s->{a}) && $s->{a} eq '\\') { # escape character escapes only the next one character
action1($s);
action1($s);
}
my $s = shift;
my $delimiter = $s->{a}; # ' or "
action1($s);
} until ($s->{last} eq $delimiter || !defined($s->{a}));
if ($s->{last} ne $delimiter) { # ran off end of file before printing the closing delimiter
die 'unterminated ' . ($delimiter eq '\'' ? 'single quoted string' : 'double quoted string') . ' literal, stopped';
}
do {
while ( defined( $s->{a} ) && $s->{a} eq '\\' )
{ # escape character escapes only the next one character
action1($s);
action1($s);
}
action1($s);
} until ( $s->{last} eq $delimiter || !defined( $s->{a} ) );
if ( $s->{last} ne $delimiter )
{ # ran off end of file before printing the closing delimiter
die 'unterminated '
. ( $delimiter eq '\''
? 'single quoted string'
: 'double quoted string' )
. ' literal, stopped';
}
}
# -----------------------------------------------------------------------------
@ -126,154 +132,174 @@ sub putLiteral {
# If any of the whitespace is a new line then ensure $s->{a} is a new line
# when this function ends.
sub collapseWhitespace {
my $s = shift;
while (defined($s->{a}) && isWhitespace($s->{a}) &&
defined($s->{b}) && isWhitespace($s->{b})) {
if (isEndspace($s->{a}) || isEndspace($s->{b})) {
$s->{a} = "\n";
my $s = shift;
while (defined( $s->{a} )
&& isWhitespace( $s->{a} )
&& defined( $s->{b} )
&& isWhitespace( $s->{b} ) )
{
if ( isEndspace( $s->{a} ) || isEndspace( $s->{b} ) ) {
$s->{a} = "\n";
}
action2($s); # delete b
}
action2($s); # delete b
}
}
# Advance $s->{a} to non-whitespace or end of file.
# Doesn't print any of this whitespace.
sub skipWhitespace {
my $s = shift;
while (defined($s->{a}) && isWhitespace($s->{a})) {
action2($s);
}
my $s = shift;
while ( defined( $s->{a} ) && isWhitespace( $s->{a} ) ) {
action2($s);
}
}
# #s->{a} should be on whitespace when this function is called
sub preserveWhitespace {
my $s = shift;
collapseWhitespace($s);
if (defined($s->{a}) && defined($s->{b}) && !isPostfix($s->{b})) {
action1($s); # print the whitespace character
}
skipWhitespace($s);
my $s = shift;
collapseWhitespace($s);
if ( defined( $s->{a} ) && defined( $s->{b} ) && !isPostfix( $s->{b} ) ) {
action1($s); # print the whitespace character
}
skipWhitespace($s);
}
# -----------------------------------------------------------------------------
sub minify {
my %h = @_;
# Immediately turn hash into a hash reference so that notation is the same in this function
# as others. Easier refactoring.
my $s = \%h; # hash reference for "state". This module is functional programming and the state is passed between functions.
# determine if the the input is a string or a file handle.
my $ref = \$s->{input};
if (defined($ref) && ref($ref) eq 'SCALAR'){
$s->{inputPos} = 0;
$s->{inputType} = 'string';
}
else {
$s->{inputType} = 'file';
}
# Determine if the output is to a string or a file.
if (!defined($s->{outfile})) {
$s->{output} = '';
}
# Print the copyright notice first
if ($s->{copyright}) {
_put($s, '/* ' . $s->{copyright} . ' */');
}
# Initialize the buffer.
do {
$s->{a} = _get($s);
} while (defined($s->{a}) && isWhitespace($s->{a}));
$s->{b} = _get($s);
$s->{c} = _get($s);
$s->{last} = undef;
# local variables
my $firstCommentSeen=0;
my $macIeCommentHackFlag = 0; # marks if a have recently seen a comment with an escaped close like this /* foo \*/
# and have not yet seen a regular comment to close this like /* bar */
while (defined($s->{a})) { # on this line $s->{a} should always be a non-whitespace character or undef (i.e. end of file)
if (isWhitespace($s->{a})) { # check that this program is running correctly
die 'minifier bug: minify while loop starting with whitespace, stopped';
my %h = @_;
# Immediately turn hash into a hash reference so that notation is the same in this function
# as others. Easier refactoring.
my $s = \%h
; # hash reference for "state". This module is functional programming and the state is passed between functions.
# determine if the the input is a string or a file handle.
my $ref = \$s->{input};
if ( defined($ref) && ref($ref) eq 'SCALAR' ) {
$s->{inputPos} = 0;
$s->{inputType} = 'string';
}
# Each branch handles trailing whitespace and ensures $s->{a} is on non-whitespace or undef when branch finishes
if ($s->{a} eq '/' && defined($s->{b}) && $s->{b} eq '*') { # a comment
do {
if($firstCommentSeen){
action2($s); # advance buffer by one
}
else {
action1($s);
else {
$s->{inputType} = 'file';
}
# Determine if the output is to a string or a file.
if ( !defined( $s->{outfile} ) ) {
$s->{output} = '';
}
# Print the copyright notice first
if ( $s->{copyright} ) {
_put( $s, '/* ' . $s->{copyright} . ' */' );
}
# Initialize the buffer.
do {
$s->{a} = _get($s);
} while ( defined( $s->{a} ) && isWhitespace( $s->{a} ) );
$s->{b} = _get($s);
$s->{c} = _get($s);
$s->{last} = undef;
# local variables
my $firstCommentSeen = 0;
my $macIeCommentHackFlag = 0
; # marks if a have recently seen a comment with an escaped close like this /* foo \*/
# and have not yet seen a regular comment to close this like /* bar */
while ( defined( $s->{a} ) )
{ # on this line $s->{a} should always be a non-whitespace character or undef (i.e. end of file)
if ( isWhitespace( $s->{a} ) )
{ # check that this program is running correctly
die
'minifier bug: minify while loop starting with whitespace, stopped';
}
# if a is \, b is *, c is /, hack flag false
# Mac/IE hack start
# set hack flag true
# print /*\*/
if ($s->{a} eq '\\' &&
defined($s->{b}) && $s->{b} eq '*' &&
defined($s->{c}) && $s->{c} eq '/' &&
!$macIeCommentHackFlag) {
$macIeCommentHackFlag = 1;
_put($s, '/*\\*/');
$s->{last} = '/';
# Each branch handles trailing whitespace and ensures $s->{a} is on non-whitespace or undef when branch finishes
if ( $s->{a} eq '/' && defined( $s->{b} ) && $s->{b} eq '*' )
{ # a comment
do {
if ($firstCommentSeen) {
action2($s); # advance buffer by one
}
else {
action1($s);
}
# if a is \, b is *, c is /, hack flag false
# Mac/IE hack start
# set hack flag true
# print /*\*/
if ( $s->{a} eq '\\'
&& defined( $s->{b} )
&& $s->{b} eq '*'
&& defined( $s->{c} )
&& $s->{c} eq '/'
&& !$macIeCommentHackFlag )
{
$macIeCommentHackFlag = 1;
_put( $s, '/*\\*/' );
$s->{last} = '/';
}
# if a is not \, b is *, c is /, hack flag true
# Mac/IE hack end
# set hack flag false
# print /**/
if ( $s->{a} ne '\\'
&& defined( $s->{b} )
&& $s->{b} eq '*'
&& defined( $s->{c} )
&& $s->{c} eq '/'
&& $macIeCommentHackFlag )
{
$macIeCommentHackFlag = 0;
_put( $s, '/**/' );
$s->{last} = '/';
}
} until ( !defined( $s->{b} )
|| ( $s->{a} eq '*' && $s->{b} eq '/' ) );
if ( defined( $s->{b} ) )
{ # $s->{a} is asterisk and $s->{b} is forward slash
if ($firstCommentSeen) {
action2($s); # the *
$s->{a} = ' '; # the /
skipWhitespace($s);
}
else {
action1($s);
$firstCommentSeen++;
}
}
else {
die 'unterminated comment, stopped';
}
}
# if a is not \, b is *, c is /, hack flag true
# Mac/IE hack end
# set hack flag false
# print /**/
if ($s->{a} ne '\\' &&
defined($s->{b}) && $s->{b} eq '*' &&
defined($s->{c}) && $s->{c} eq '/' &&
$macIeCommentHackFlag) {
$macIeCommentHackFlag = 0;
_put($s, '/**/');
$s->{last} = '/';
elsif ( $s->{a} eq '\'' || $s->{a} eq '"' ) {
putLiteral($s);
if ( defined( $s->{a} ) && isWhitespace( $s->{a} ) ) {
preserveWhitespace($s); # can this be skipWhitespace?
}
}
} until (!defined($s->{b}) || ($s->{a} eq '*' && $s->{b} eq '/'));
if (defined($s->{b})) { # $s->{a} is asterisk and $s->{b} is forward slash
if($firstCommentSeen){
action2($s); # the *
$s->{a} = ' '; # the /
skipWhitespace($s);
elsif ( isPrefix( $s->{a} ) ) {
action1($s);
skipWhitespace($s);
}
else{
action1($s);
$firstCommentSeen++;
else { # anything else just prints
action1($s);
if ( defined( $s->{a} ) && isWhitespace( $s->{a} ) ) {
preserveWhitespace($s);
}
}
}
else {
die 'unterminated comment, stopped';
}
}
elsif ($s->{a} eq '\'' || $s->{a} eq '"') {
putLiteral($s);
if (defined($s->{a}) && isWhitespace($s->{a})) {
preserveWhitespace($s); # can this be skipWhitespace?
}
}
elsif (isPrefix($s->{a})) {
action1($s);
skipWhitespace($s);
}
else { # anything else just prints
action1($s);
if (defined($s->{a}) && isWhitespace($s->{a})) {
preserveWhitespace($s);
}
if ( !defined( $s->{outfile} ) ) {
return $s->{output};
}
}
if (!defined($s->{outfile})) {
return $s->{output};
}
}
# -----------------------------------------------------------------------------

@ -4,41 +4,40 @@
# Copyright (C) 2002 Bart Schuller
# Copyright (C) 2006 Phinex Informatik AG
# All Rights Reserved
#
#
# Doxygen Filter is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
# Larry Wall's 'Artistic License' for perl can be found in
# http://www.perl.com/pub/a/language/misc/Artistic.html
#
#
# =======================================================================
#
#
# Author: Aeby Thomas, Phinex Informatik AG,
# Based on DoxygenFilter from Bart Schuller
# E-Mail: tom.aeby@phinex.ch
#
#
# Phinex Informatik AG
# Thomas Aeby
# Kirchweg 52
# 1735 Giffers
#
#
# =======================================================================
#
#
# @(#) $Id: Filter.pm,v 1.2 2006/01/31 16:53:52 aeby Exp $
#
#
# Revision History:
#
#
# $Log: Filter.pm,v $
# Revision 1.2 2006/01/31 16:53:52 aeby
# added copyright info
#
#
#
# =======================================================================
## @file
# implementation of DoxyGen::Filter.
## @class
# Filter from non-C++ syntax API docs to Doxygen-compatible syntax.
# This class is meant to be used as a filter for the
@ -55,7 +54,7 @@ use strict;
sub new {
my $class = shift;
my $outfh = shift || \*STDOUT;
return bless {outfh => $outfh}, $class;
return bless { outfh => $outfh }, $class;
}
## @method virtual void filter($infh)=0
@ -70,7 +69,7 @@ sub filter {
# @param sig the method signature
# @return Either "Public" or "Private".
sub protection {
my($self, $sig) = @_;
my ( $self, $sig ) = @_;
return $sig =~ /^(private|protected)/ ? "\u$1" : 'Public';
}
@ -79,7 +78,7 @@ sub protection {
# Outputs the start of a javadoc comment.
# @param command the javadoc command
sub start {
my $self = shift;
my $self = shift;
my $command = shift;
$self->print("/** $command\n");
return $self;
@ -99,7 +98,7 @@ sub end {
# @param section The name of the section to divert all output to.
# @see pop(), print(), flush()
sub push {
my($self, $section) = @_;
my ( $self, $section ) = @_;
$self->{current_section} = $section;
return $self;
}
@ -108,7 +107,7 @@ sub push {
# End a diversion to a section.
# @see push(), flush()
sub pop {
my($self) = @_;
my ($self) = @_;
delete $self->{current_section};
return $self;
}
@ -122,9 +121,10 @@ sub pop {
sub print {
my $self = shift;
return unless @_;
if (my $section = $self->{current_section}) {
CORE::push @{$self->{sections}{$section}}, @_;
} else {
if ( my $section = $self->{current_section} ) {
CORE::push @{ $self->{sections}{$section} }, @_;
}
else {
my $outfh = $self->{outfh};
print $outfh @_;
}
@ -165,22 +165,22 @@ my @order = (
'Private Running Functions',
'Private Object Methods',
'Private Functions',
);
);
## @method void flush()
# Flush the saved sections. Should be called at the end of a class.
# @see push(), print()
sub flush {
my $self = shift;
my $self = shift;
my $sections = $self->{sections};
foreach (@order) {
next unless $sections->{$_};
$self->start("\@name $_\n")->end;
$self->start("\@{")->end;
$self->print("\n");
$self->print(@{$sections->{$_}});
$self->print("\n");
$self->print("\n");
$self->print( @{ $sections->{$_} } );
$self->print("\n");
$self->start("\@}")->end;
$self->print("\n");
$self->print("\n");
}
delete $self->{sections};
return $self;

@ -67,6 +67,7 @@ sub filter {
while (<$infh>) {
$endMark = 0 if (/^\s*use\s+AutoLoader/);
last if ( $endMark and /^__END__$/ );
#next if (/^$/);
$cc = ( /^\s*#/ ? 1 : 0 );
$lc = ( /[\{\}\[\];]\s*$/ ? 1 : 0 );
@ -79,7 +80,7 @@ sub filter {
}
$cl = $cc;
$ll = $lc;
$cl++ if(/\s#/);
$cl++ if (/\s#/);
}
#print STDERR @$file;

@ -4,42 +4,41 @@
# Copyright (C) 2002 Bart Schuller
# Copyright (C) 2006 Phinex Informatik AG
# All Rights Reserved
#
#
# Doxygen Filter is free software; you can redistribute it and/or modify
# it under the same terms as Perl itself.
#
#
# Larry Wall's 'Artistic License' for perl can be found in
# http://www.perl.com/pub/a/language/misc/Artistic.html
#
#
# =======================================================================
#
#
# Author: Aeby Thomas, Phinex Informatik AG,
# Based on DoxygenFilter from Bart Schuller
# E-Mail: tom.aeby@phinex.ch
#
#
# Phinex Informatik AG
# Thomas Aeby
# Kirchweg 52
# 1735 Giffers
#
#
# =======================================================================
#
#
# @(#) $Id: SQLFilter.pm,v 1.2 2006/01/31 16:53:52 aeby Exp $
#
#
# Revision History:
#
#
# $Log: SQLFilter.pm,v $
# Revision 1.2 2006/01/31 16:53:52 aeby
# added copyright info
#
#
#
# =======================================================================
## @file
# implementation of DoxyGen::SQLFilter.
#
## @class
# Filter from SQL syntax API docs to Doxygen-compatible syntax.
# This class is meant to be used as a filter for the
@ -54,29 +53,32 @@ use base qw(DoxyGen::Filter);
# do the filtering.
# @param infh input filehandle, normally STDIN
sub filter {
my($self, $infile) = @_;
open(my $infh, $infile);
my ( $self, $infile ) = @_;
open( my $infh, $infile );
my $current_class;
while (<$infh>) {
if (/\/\*\*\s*\@(\S+)\s*(.*)/) {
my($command, $args) = ($1, $2);
my ( $command, $args ) = ( $1, $2 );
my @more;
while (<$infh>) {
if (/\*\//) {
# We expect to be on the line after a comment.
$_ = <$infh>;
last;
} else {
}
else {
/\s*(\*\s)?(.+)/s;
push @more, $2;
}
}
if ($command eq 'file') {
if ( $command eq 'file' ) {
$args ||= $infile;
$self->start("\@$command $args");
$self->more(@more);
$self->end;
} elsif ($command eq 'class') {
}
elsif ( $command eq 'class' ) {
unless ($args) {
($args) = /package\s(\S*)/;
}
@ -90,23 +92,27 @@ sub filter {
$self->print("class $args");
$self->print(" {\npublic:\n");
} elsif ($command eq 'fn') {
}
elsif ( $command eq 'fn' ) {
unless ($args) {
($args) = /function\s+(.*)\b/;
$args = "retval $args(\@args)";
}
$self->push($self->protection($args).' Functions');
$self->push( $self->protection($args) . ' Functions' );
$self->start("\@fn $args")->more(@more)->end;
$self->print($args, ";\n");
$self->print( $args, ";\n" );
$self->pop;
} else {
}
else {
$self->start("\@$command $args");
$self->more(@more);
$self->end;
}
# We ate a line when we got the rest of the comment lines
redo if defined $_;
} elsif (/\@(\w+)/) {
}
elsif (/\@(\w+)/) {
my $inc = $1;
$self->print("#include \"$inc.sql\"\n");
}

@ -4,7 +4,7 @@ use strict;
use warnings;
require Exporter;
our @ISA = qw(Exporter);
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(minify);
our $VERSION = '1.05';
@ -13,74 +13,74 @@ our $VERSION = '1.05';
#return true if the character is allowed in identifier.
sub isAlphanum {
my $x = shift;
return ($x =~ /[\w\$\\]/ || ord($x) > 126);
my $x = shift;
return ( $x =~ /[\w\$\\]/ || ord($x) > 126 );
}
sub isSpace {
my $x = shift;
return ($x eq ' ' || $x eq "\t");
my $x = shift;
return ( $x eq ' ' || $x eq "\t" );
}
sub isEndspace {
my $x = shift;
return ($x eq "\n" || $x eq "\r" || $x eq "\f");
my $x = shift;
return ( $x eq "\n" || $x eq "\r" || $x eq "\f" );
}
sub isWhitespace {
my $x = shift;
return (isSpace($x) || isEndspace($x));
my $x = shift;
return ( isSpace($x) || isEndspace($x) );
}
# New line characters before or after these characters can be removed.
# Not + - / in this list because they require special care.
sub isInfix {
my $x = shift;
$x =~ /[,;:=&%*<>\?\|\n]/;
my $x = shift;
$x =~ /[,;:=&%*<>\?\|\n]/;
}
# New line characters after these characters can be removed.
sub isPrefix {
my $x = shift;
return ($x =~ /[\{\(\[!]/ || isInfix($x));
my $x = shift;
return ( $x =~ /[\{\(\[!]/ || isInfix($x) );
}
# New line characters before these characters can removed.
sub isPostfix {
my $x = shift;
return ($x =~ /[\}\)\]]/ || isInfix($x));
my $x = shift;
return ( $x =~ /[\}\)\]]/ || isInfix($x) );
}
# -----------------------------------------------------------------------------
sub _get {
my $s = shift;
if ($s->{inputType} eq 'file') {
return getc($s->{input});
}
elsif ($s->{inputType} eq 'string') {
if ($s->{'inputPos'} < length($s->{input})) {
return substr($s->{input}, $s->{inputPos}++, 1);
my $s = shift;
if ( $s->{inputType} eq 'file' ) {
return getc( $s->{input} );
}
else { # Simulate getc() when off the end of the input string.
return undef;
elsif ( $s->{inputType} eq 'string' ) {
if ( $s->{'inputPos'} < length( $s->{input} ) ) {
return substr( $s->{input}, $s->{inputPos}++, 1 );
}
else { # Simulate getc() when off the end of the input string.
return undef;
}
}
else {
die "no input";
}
}
else {
die "no input";
}
}
sub _put {
my $s = shift;
my $x = shift;
my $outfile = ($s->{outfile});
if (defined($s->{outfile})) {
print $outfile $x;
}
else {
$s->{output} .= $x;
}
my $s = shift;
my $x = shift;
my $outfile = ( $s->{outfile} );
if ( defined( $s->{outfile} ) ) {
print $outfile $x;
}
else {
$s->{output} .= $x;
}
}
# -----------------------------------------------------------------------------
@ -93,19 +93,19 @@ sub _put {
#
# i.e. print a and advance
sub action1 {
my $s = shift;
if (!isWhitespace($s->{a})) {
$s->{lastnws} = $s->{a};
}
$s->{last} = $s->{a};
action2($s);
my $s = shift;
if ( !isWhitespace( $s->{a} ) ) {
$s->{lastnws} = $s->{a};
}
$s->{last} = $s->{a};
action2($s);
}
# sneeky output $s->{a} for comments
sub action2 {
my $s = shift;
_put($s, $s->{a});
action3($s);
my $s = shift;
_put( $s, $s->{a} );
action3($s);
}
# move b to a
@ -115,9 +115,9 @@ sub action2 {
#
# i.e. delete a
sub action3 {
my $s = shift;
$s->{a} = $s->{b};
action4($s);
my $s = shift;
$s->{a} = $s->{b};
action4($s);
}
# move c to b
@ -126,10 +126,10 @@ sub action3 {
#
# i.e. delete b
sub action4 {
my $s = shift;
$s->{b} = $s->{c};
$s->{c} = $s->{d};
$s->{d} = _get($s);
my $s = shift;
$s->{b} = $s->{c};
$s->{c} = $s->{d};
$s->{d} = _get($s);
}
# -----------------------------------------------------------------------------
@ -137,19 +137,25 @@ sub action4 {
# put string and regexp literals
# when this sub is called, $s->{a} is on the opening delimiter character
sub putLiteral {
my $s = shift;
my $delimiter = $s->{a}; # ', " or /
action1($s);
do {
while (defined($s->{a}) && $s->{a} eq '\\') { # escape character only escapes only the next one character
action1($s);
action1($s);
}
my $s = shift;
my $delimiter = $s->{a}; # ', " or /
action1($s);
} until ($s->{last} eq $delimiter || !defined($s->{a}));
if ($s->{last} ne $delimiter) { # ran off end of file before printing the closing delimiter
die 'unterminated ' . ($delimiter eq '\'' ? 'single quoted string' : $delimiter eq '"' ? 'double quoted string' : 'regular expression') . ' literal, stopped';
}
do {
while ( defined( $s->{a} ) && $s->{a} eq '\\' )
{ # escape character only escapes only the next one character
action1($s);
action1($s);
}
action1($s);
} until ( $s->{last} eq $delimiter || !defined( $s->{a} ) );
if ( $s->{last} ne $delimiter )
{ # ran off end of file before printing the closing delimiter
die 'unterminated '
. ( $delimiter eq '\'' ? 'single quoted string'
: $delimiter eq '"' ? 'double quoted string'
: 'regular expression' )
. ' literal, stopped';
}
}
# -----------------------------------------------------------------------------
@ -158,203 +164,269 @@ sub putLiteral {
# If any of the whitespace is a new line then ensure $s->{a} is a new line
# when this function ends.
sub collapseWhitespace {
my $s = shift;
while (defined($s->{a}) && isWhitespace($s->{a}) &&
defined($s->{b}) && isWhitespace($s->{b})) {
if (isEndspace($s->{a}) || isEndspace($s->{b})) {
$s->{a} = "\n";
my $s = shift;
while (defined( $s->{a} )
&& isWhitespace( $s->{a} )
&& defined( $s->{b} )
&& isWhitespace( $s->{b} ) )
{
if ( isEndspace( $s->{a} ) || isEndspace( $s->{b} ) ) {
$s->{a} = "\n";
}
action4($s); # delete b
}
action4($s); # delete b
}
}
# Advance $s->{a} to non-whitespace or end of file.
# Doesn't print any of this whitespace.
sub skipWhitespace {
my $s = shift;
while (defined($s->{a}) && isWhitespace($s->{a})) {
action3($s);
}
my $s = shift;
while ( defined( $s->{a} ) && isWhitespace( $s->{a} ) ) {
action3($s);
}
}
# Advance $s->{a} to non-whitespace or end of file
# If any of the whitespace is a new line then print one new line.
sub preserveEndspace {
my $s = shift;
collapseWhitespace($s);
if (defined($s->{a}) && isEndspace($s->{a}) && defined($s->{b}) && !isPostfix($s->{b}) ) {
action1($s);
}
skipWhitespace($s);
my $s = shift;
collapseWhitespace($s);
if ( defined( $s->{a} )
&& isEndspace( $s->{a} )
&& defined( $s->{b} )
&& !isPostfix( $s->{b} ) )
{
action1($s);
}
skipWhitespace($s);
}
sub onWhitespaceConditionalComment {
my $s = shift;
return (defined($s->{a}) && isWhitespace($s->{a}) &&
defined($s->{b}) && $s->{b} eq '/' &&
defined($s->{c}) && ($s->{c} eq '/' || $s->{c} eq '*') &&
defined($s->{d}) && $s->{d} eq '@');
my $s = shift;
return ( defined( $s->{a} )
&& isWhitespace( $s->{a} )
&& defined( $s->{b} )
&& $s->{b} eq '/'
&& defined( $s->{c} )
&& ( $s->{c} eq '/' || $s->{c} eq '*' )
&& defined( $s->{d} )
&& $s->{d} eq '@' );
}
# -----------------------------------------------------------------------------
sub minify {
my %h = @_;
# Immediately turn hash into a hash reference so that notation is the same in this function
# as others. Easier refactoring.
my $s = \%h; # hash reference for "state". This module is functional programming and the state is passed between functions.
# determine if the the input is a string or a file handle.
my $ref = \$s->{input};
if (defined($ref) && ref($ref) eq 'SCALAR'){
$s->{inputPos} = 0;
$s->{inputType} = 'string';
}
else {
$s->{inputType} = 'file';
}
# Determine if the output is to a string or a file.
if (!defined($s->{outfile})) {
$s->{output} = '';
}
# Print the copyright notice first
if ($s->{copyright}) {
_put($s, '/* ' . $s->{copyright} . ' */');
}
# Initialize the buffer.
do {
$s->{a} = _get($s);
} while (defined($s->{a}) && isWhitespace($s->{a}));
$s->{b} = _get($s);
$s->{c} = _get($s);
$s->{d} = _get($s);
$s->{last} = undef; # assign for safety
$s->{lastnws} = undef; # assign for safety
# local variables
my $firstCommentSeen;
my $ccFlag; # marks if a comment is an Internet Explorer conditional comment and should be printed to output
while (defined($s->{a})) { # on this line $s->{a} should always be a non-whitespace character or undef (i.e. end of file)
if (isWhitespace($s->{a})) { # check that this program is running correctly
die 'minifier bug: minify while loop starting with whitespace, stopped';
my %h = @_;
# Immediately turn hash into a hash reference so that notation is the same in this function
# as others. Easier refactoring.
my $s = \%h
; # hash reference for "state". This module is functional programming and the state is passed between functions.
# determine if the the input is a string or a file handle.
my $ref = \$s->{input};
if ( defined($ref) && ref($ref) eq 'SCALAR' ) {
$s->{inputPos} = 0;
$s->{inputType} = 'string';
}
# Each branch handles trailing whitespace and ensures $s->{a} is on non-whitespace or undef when branch finishes
if ($s->{a} eq '/') { # a division, comment, or regexp literal
if (defined($s->{b}) && $s->{b} eq '/') { # slash-slash comment
$ccFlag = defined($s->{c}) && $s->{c} eq '@'; # tests in IE7 show no space allowed between slashes and at symbol
do {
$ccFlag ? action2($s) : action3($s);
} until (!defined($s->{a}) || isEndspace($s->{a}));
if (defined($s->{a})) { # $s->{a} is a new line
if ($ccFlag) {
action1($s); # cannot use preserveEndspace($s) here because it might not print the new line
skipWhitespace($s);
}
elsif (defined($s->{last}) && !isEndspace($s->{last}) && !isPrefix($s->{last})) {
preserveEndspace($s);
}
else {
skipWhitespace($s);
}
else {
$s->{inputType} = 'file';
}
# Determine if the output is to a string or a file.
if ( !defined( $s->{outfile} ) ) {
$s->{output} = '';
}
# Print the copyright notice first
if ( $s->{copyright} ) {
_put( $s, '/* ' . $s->{copyright} . ' */' );
}
# Initialize the buffer.
do {
$s->{a} = _get($s);
} while ( defined( $s->{a} ) && isWhitespace( $s->{a} ) );
$s->{b} = _get($s);
$s->{c} = _get($s);
$s->{d} = _get($s);
$s->{last} = undef; # assign for safety
$s->{lastnws} = undef; # assign for safety
# local variables
my $firstCommentSeen;
my $ccFlag
; # marks if a comment is an Internet Explorer conditional comment and should be printed to output
while ( defined( $s->{a} ) )
{ # on this line $s->{a} should always be a non-whitespace character or undef (i.e. end of file)
if ( isWhitespace( $s->{a} ) )
{ # check that this program is running correctly
die
'minifier bug: minify while loop starting with whitespace, stopped';
}
}
elsif (defined($s->{b}) && $s->{b} eq '*') { # slash-star comment
$ccFlag = defined($s->{c}) && $s->{c} eq '@'; # test in IE7 shows no space allowed between star and at symbol
do {
$ccFlag or !$firstCommentSeen ? action2($s) : action3($s);
} until (!defined($s->{b}) || ($s->{a} eq '*' && $s->{b} eq '/'));
if (defined($s->{b})) { # $s->{a} is asterisk and $s->{b} is foreslash
if ($ccFlag or !$firstCommentSeen) {
action2($s); # the *
action2($s); # the /
# inside the conditional comment there may be a missing terminal semi-colon
# Each branch handles trailing whitespace and ensures $s->{a} is on non-whitespace or undef when branch finishes
if ( $s->{a} eq '/' ) { # a division, comment, or regexp literal
if ( defined( $s->{b} ) && $s->{b} eq '/' ) { # slash-slash comment
$ccFlag =
defined( $s->{c} )
&& $s->{c} eq '@'
; # tests in IE7 show no space allowed between slashes and at symbol
do {
$ccFlag ? action2($s) : action3($s);
} until ( !defined( $s->{a} ) || isEndspace( $s->{a} ) );
if ( defined( $s->{a} ) ) { # $s->{a} is a new line
if ($ccFlag) {
action1($s)
; # cannot use preserveEndspace($s) here because it might not print the new line
skipWhitespace($s);
}
elsif (defined( $s->{last} )
&& !isEndspace( $s->{last} )
&& !isPrefix( $s->{last} ) )
{
preserveEndspace($s);
}
else {
skipWhitespace($s);
}
}
}
elsif ( defined( $s->{b} ) && $s->{b} eq '*' )
{ # slash-star comment
$ccFlag =
defined( $s->{c} )
&& $s->{c} eq '@'
; # test in IE7 shows no space allowed between star and at symbol
do {
$ccFlag or !$firstCommentSeen ? action2($s) : action3($s);
} until ( !defined( $s->{b} )
|| ( $s->{a} eq '*' && $s->{b} eq '/' ) );
if ( defined( $s->{b} ) )
{ # $s->{a} is asterisk and $s->{b} is foreslash
if ( $ccFlag or !$firstCommentSeen ) {
action2($s); # the *
action2($s); # the /
# inside the conditional comment there may be a missing terminal semi-colon
preserveEndspace($s);
$firstCommentSeen++;
}
else { # the comment is being removed
action3($s); # the *
$s->{a} = ' '; # the /
collapseWhitespace($s);
if (
defined( $s->{last} )
&& defined( $s->{b} )
&& (
(
isAlphanum( $s->{last} )
&& ( isAlphanum( $s->{b} )
|| $s->{b} eq '.' )
)
|| ( $s->{last} eq '+' && $s->{b} eq '+' )
|| ( $s->{last} eq '-' && $s->{b} eq '-' )
)
)
{ # for a situation like 5-/**/-2 or a/**/a
# When entering this block $s->{a} is whitespace.
# The comment represented whitespace that cannot be removed. Therefore replace the now gone comment with a whitespace.
action1($s);
}
elsif ( defined( $s->{last} )
&& !isPrefix( $s->{last} ) )
{
preserveEndspace($s);
}
else {
skipWhitespace($s);
}
}
}
else {
die 'unterminated comment, stopped';
}
}
elsif (
defined( $s->{lastnws} )
&& ( $s->{lastnws} eq ')'
|| $s->{lastnws} eq ']'
|| $s->{lastnws} eq '.'
|| isAlphanum( $s->{lastnws} ) )
)
{ # division
action1($s);
collapseWhitespace($s);
# don't want a division to become a slash-slash comment with following conditional comment
onWhitespaceConditionalComment($s)
? action1($s)
: preserveEndspace($s);
}
else { # regexp literal
putLiteral($s);
collapseWhitespace($s);
# don't want closing delimiter to become a slash-slash comment with following conditional comment
onWhitespaceConditionalComment($s)
? action1($s)
: preserveEndspace($s);
}
}
elsif ( $s->{a} eq '\'' || $s->{a} eq '"' ) { # string literal
putLiteral($s);
preserveEndspace($s);
$firstCommentSeen++;
}
else { # the comment is being removed
action3($s); # the *
$s->{a} = ' '; # the /
}
elsif ( $s->{a} eq '+' || $s->{a} eq '-' ) { # careful with + + and - -
action1($s);
collapseWhitespace($s);
if (defined($s->{last}) && defined($s->{b}) &&
((isAlphanum($s->{last}) && (isAlphanum($s->{b})||$s->{b} eq '.')) ||
($s->{last} eq '+' && $s->{b} eq '+') || ($s->{last} eq '-' && $s->{b} eq '-'))) { # for a situation like 5-/**/-2 or a/**/a
# When entering this block $s->{a} is whitespace.
# The comment represented whitespace that cannot be removed. Therefore replace the now gone comment with a whitespace.
action1($s);
if ( defined( $s->{a} ) && isWhitespace( $s->{a} ) ) {
( defined( $s->{b} ) && $s->{b} eq $s->{last} )
? action1($s)
: preserveEndspace($s);
}
elsif (defined($s->{last}) && !isPrefix($s->{last})) {
preserveEndspace($s);
}
else {
skipWhitespace($s);
}
elsif ( isAlphanum( $s->{a} ) ) { # keyword, identifiers, numbers
action1($s);
collapseWhitespace($s);
if ( defined( $s->{a} ) && isWhitespace( $s->{a} ) ) {
# if $s->{b} is '.' could be (12 .toString()) which is property invocation. If space removed becomes decimal point and error.
( defined( $s->{b} )
&& ( isAlphanum( $s->{b} ) || $s->{b} eq '.' ) )
? action1($s)
: preserveEndspace($s);
}
}
}
else {
die 'unterminated comment, stopped';
elsif ( $s->{a} eq ']' || $s->{a} eq '}' || $s->{a} eq ')' )
{ # no need to be followed by space but maybe needs following new line
action1($s);
preserveEndspace($s);
}
elsif ($s->{stripDebug}
&& $s->{a} eq ';'
&& defined( $s->{b} )
&& $s->{b} eq ';'
&& defined( $s->{c} )
&& $s->{c} eq ';' )
{
action3($s); # delete one of the semi-colons
$s->{a} = '/'; # replace the other two semi-colons
$s->{b} = '/'; # so the remainder of line is removed
}
else { # anything else just prints and trailing whitespace discarded
action1($s);
skipWhitespace($s);
}
}
elsif (defined($s->{lastnws}) && ($s->{lastnws} eq ')' || $s->{lastnws} eq ']' ||
$s->{lastnws} eq '.' || isAlphanum($s->{lastnws}))) { # division
action1($s);
collapseWhitespace($s);
# don't want a division to become a slash-slash comment with following conditional comment
onWhitespaceConditionalComment($s) ? action1($s) : preserveEndspace($s);
}
else { # regexp literal
putLiteral($s);
collapseWhitespace($s);
# don't want closing delimiter to become a slash-slash comment with following conditional comment
onWhitespaceConditionalComment($s) ? action1($s) : preserveEndspace($s);
}
}
elsif ($s->{a} eq '\'' || $s->{a} eq '"' ) { # string literal
putLiteral($s);
preserveEndspace($s);
}
elsif ($s->{a} eq '+' || $s->{a} eq '-') { # careful with + + and - -
action1($s);
collapseWhitespace($s);
if (defined($s->{a}) && isWhitespace($s->{a})) {
(defined($s->{b}) && $s->{b} eq $s->{last}) ? action1($s) : preserveEndspace($s);
}
}
elsif (isAlphanum($s->{a})) { # keyword, identifiers, numbers
action1($s);
collapseWhitespace($s);
if (defined($s->{a}) && isWhitespace($s->{a})) {
# if $s->{b} is '.' could be (12 .toString()) which is property invocation. If space removed becomes decimal point and error.
(defined($s->{b}) && (isAlphanum($s->{b}) || $s->{b} eq '.')) ? action1($s) : preserveEndspace($s);
}
}
elsif ($s->{a} eq ']' || $s->{a} eq '}' || $s->{a} eq ')') { # no need to be followed by space but maybe needs following new line
action1($s);
preserveEndspace($s);
}
elsif ($s->{stripDebug} && $s->{a} eq ';' &&
defined($s->{b}) && $s->{b} eq ';' &&
defined($s->{c}) && $s->{c} eq ';') {
action3($s); # delete one of the semi-colons
$s->{a} = '/'; # replace the other two semi-colons
$s->{b} = '/'; # so the remainder of line is removed
}
else { # anything else just prints and trailing whitespace discarded
action1($s);
skipWhitespace($s);
if ( !defined( $s->{outfile} ) ) {
return $s->{output};
}
}
if (!defined($s->{outfile})) {
return $s->{output};
}
} # minify()
} # minify()
# -----------------------------------------------------------------------------

@ -5,85 +5,100 @@ use XML::Simple;
use utf8;
my $docs = {
# Overview
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Presentation?language=en' => '1-Overview.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Presentation?language=fr' => '1-Overview-fr.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Presentation?language=en' => '1-Overview.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Presentation?language=fr' => '1-Overview-fr.html',
# FAQ
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/FAQ?language=en' => '2-FAQ.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/FAQ?language=fr' => '2-FAQ-fr.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/FAQ?language=en' => '2-FAQ.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/FAQ?language=fr' => '2-FAQ-fr.html',
#TOC
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Documentation?language=en' => '3-Table-of-contents.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Documentation?language=fr' => '3-Table-of-contents-fr.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Documentation?language=en' => '3-Table-of-contents.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Documentation?language=fr' => '3-Table-of-contents-fr.html',
# Install
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocPrereq' => '3.1-Install-prerequesites.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocInstallTarball' => '3.2-Install-from-tarball.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocInstallDebianPackages' => '3.3-Install-from-debian-packages.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocInstallRedHatPackages' => '3.3-Install-from-redhat-packages.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocInstallSuSEPackages' => '3.3-Install-from-suse-packages.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocUpgrade094To10' => '3.4-Upgrade-from-0.9.4-to-1.0.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocPrereq' => '3.1-Install-prerequesites.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocInstallTarball' => '3.2-Install-from-tarball.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocInstallDebianPackages' => '3.3-Install-from-debian-packages.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocInstallRedHatPackages' => '3.3-Install-from-redhat-packages.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocInstallSuSEPackages' => '3.3-Install-from-suse-packages.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocUpgrade094To10' => '3.4-Upgrade-from-0.9.4-to-1.0.html',
# Configuration overview
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocConfigOverwiew' => '4.1-Configuration-overview.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/RBAC' => '4.1-RBAC-model.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/ConfigParameterList' => '4.1-Configuration-parameter-list.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocConfigOverwiew' => '4.1-Configuration-overview.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/RBAC' => '4.1-RBAC-model.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/ConfigParameterList' => '4.1-Configuration-parameter-list.html',
# Portal
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/EnhancedMenu' => '4.2-Configure-portal-menu.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/TemplatesDesign' => '4.2-HTML-templates-customization.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/EnhancedMenu' => '4.2-Configure-portal-menu.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/TemplatesDesign' => '4.2-HTML-templates-customization.html',
# Configuration backends
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocFileStorage' => '4.3-File-configuration-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocMySQLStorage' => '4.3-MySQL-configuration-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocLDAPStorage' => '4.3-LDAP-configuration-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocSOAPStorage' => '4.3-SOAP-configuration-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocFileStorage' => '4.3-File-configuration-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocMySQLStorage' => '4.3-MySQL-configuration-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocLDAPStorage' => '4.3-LDAP-configuration-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocSOAPStorage' => '4.3-SOAP-configuration-backend.html',
# Session backends
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocFileSessionStorage' => '4.4-File-session-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocMySQLSessionStorage' => '4.4-MySQL-session-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocPostGreSQLSessionStorage' => '4.4-PostGreSQL-session-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocLDAPSessionStorage' => '4.4-LDAP-session-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocSOAPSessionStorage' => '4.4-SOAP-session-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocFileSessionStorage' => '4.4-File-session-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocMySQLSessionStorage' => '4.4-MySQL-session-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocPostGreSQLSessionStorage' => '4.4-PostGreSQL-session-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocLDAPSessionStorage' => '4.4-LDAP-session-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocSOAPSessionStorage' => '4.4-SOAP-session-backend.html',
# Authentication backends
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthLDAP' => '4.5-LDAP-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/SSL' => '4.5-SSL-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Kerberos' => '4.5-Apache-and-Kerberos-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/CAS' => '4.5-CAS-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthRemote' => '4.5-Remote-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthMulti' => '4.5-Multiple-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthProxy' => '4.5-Proxy-authentication-module.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthSAML' => '4.5-SAML-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocLA?language=fr' => '4.5-Liberty-Alliance-authentication-backend-fr.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthOpenID' => '4.5-OpenID-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthTwitter' => '4.5-Twitter-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthLDAP' => '4.5-LDAP-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/SSL' => '4.5-SSL-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Kerberos' => '4.5-Apache-and-Kerberos-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/CAS' => '4.5-CAS-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthRemote' => '4.5-Remote-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthMulti' => '4.5-Multiple-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthProxy' => '4.5-Proxy-authentication-module.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthSAML' => '4.5-SAML-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocLA?language=fr' => '4.5-Liberty-Alliance-authentication-backend-fr.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthOpenID' => '4.5-OpenID-authentication-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/AuthTwitter' => '4.5-Twitter-authentication-backend.html',
# User backends
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/UserDBLDAP' => '4.6-LDAP-user-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/UserDBNull' => '4.6-Null-user-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/UserDBMulti' => '4.6-Multiple-user-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/userDBSAML' => '4.6-SAML-user-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/UserDBLDAP' => '4.6-LDAP-user-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/UserDBNull' => '4.6-Null-user-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/UserDBMulti' => '4.6-Multiple-user-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/userDBSAML' => '4.6-SAML-user-backend.html',
# Password backends
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/PasswordDBLDAP' => '4.7-LDAP-password-backend.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/PasswordDBLDAP' => '4.7-LDAP-password-backend.html',
# LDAP specificities
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocPpolicy' => '4.8-Configure-password-policy.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/LDAPSchema' => '4.8-Configure-LDAP-schema.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocPpolicy' => '4.8-Configure-password-policy.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/LDAPSchema' => '4.8-Configure-LDAP-schema.html',
# Advanced
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/CDA' => '4.9-Cross-domain-authentication.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Notifications' => '4.9-Notification-system.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/SeveralIndependantPortals' => '4.9-Several-independant-portals.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/ResetPassword' => '4.9-Reset-password-by-mail.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/MultipleCookies' => '4.9-Multiple-cookies.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/CDA' => '4.9-Cross-domain-authentication.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Notifications' => '4.9-Notification-system.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/SeveralIndependantPortals' => '4.9-Several-independant-portals.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/ResetPassword' => '4.9-Reset-password-by-mail.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/MultipleCookies' => '4.9-Multiple-cookies.html',
# Applications
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppDokuwiki' => '5-Appli-Dokuwiki.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppGRR' => '5-Appli-GRR.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppGLPI' => '5-Appli-GLPI.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppPLA' => '5-Appli-phpLDAPadmin.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppSympa' => '5-Appli-Sympa.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppBugzilla' => '5-Appli-Bugzilla.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppTomcatValve' => '5-Appli-Tomcat-Valve.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppBasicAuthentication' => '5-Appli-HTTP-Basic-Authentication.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppSelfMade' => '5-Appli-self-made.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppDokuwiki' => '5-Appli-Dokuwiki.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppGRR' => '5-Appli-GRR.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppGLPI' => '5-Appli-GLPI.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppPLA' => '5-Appli-phpLDAPadmin.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppSympa' => '5-Appli-Sympa.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppBugzilla' => '5-Appli-Bugzilla.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppTomcatValve' => '5-Appli-Tomcat-Valve.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppBasicAuthentication' => '5-Appli-HTTP-Basic-Authentication.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/DocAppSelfMade' => '5-Appli-self-made.html',
# Other
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/Main/Contacts' => '6-Contacts.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Erreurs?language=en' => '6-Errors.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Erreurs?language=fr' => '6-Errors-fr.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Roadmap' => '6-Roadmap.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/References' => '6-References.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Accounting' => '6-Accounting.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/Main/Contacts' => '6-Contacts.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Erreurs?language=en' => '6-Errors.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Erreurs?language=fr' => '6-Errors-fr.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Roadmap' => '6-Roadmap.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/References' => '6-References.html',
'http://wiki.lemonldap.ow2.org/xwiki/bin/view/NG/Accounting' => '6-Accounting.html',
};
my %imgs;
@ -152,6 +167,7 @@ while ( my ( $url, $file ) = each %$docs ) {
$div += @t;
@t = ( $_ =~ /<\/div/i );
$div -= @t;
#$ind-- unless ($div);
s/\r//g;
utf8::decode($_);
@ -159,7 +175,7 @@ while ( my ( $url, $file ) = each %$docs ) {
# Little xwiki bug
if (/<\/pre/) {
$pre = 0;
while (s#(?<!<pre>)(.*?)(?:<p[^>]*>\s*</p>|<p[^>]*/>)(.*?)(?=</pre>)#$1<br/><br/>$2#gi) {
while ( s#(?<!<pre>)(.*?)(?:<p[^>]*>\s*</p>|<p[^>]*/>)(.*?)(?=</pre>)#$1<br/><br/>$2#gi ) {
}
}
if ($pre) {
@ -167,20 +183,21 @@ while ( my ( $url, $file ) = each %$docs ) {
}
if (/<pre/) {
$pre = 1;
while (s#(?<=<pre>)(.*?)(?:<p[^>]*>\s*</p>|<p[^>]*/>)(.*?)(?=</pre>)#$1<br/><br/>$2#gi) {
while ( s#(?<=<pre>)(.*?)(?:<p[^>]*>\s*</p>|<p[^>]*/>)(.*?)(?=</pre>)#$1<br/><br/>$2#gi ) {
}
while (s#(?<=<pre>)(.*?)(?:<p[^>]*>\s*</p>|<p[^>]*/>)(.*?)(?!</pre>)#$1<br/><br/>$2#gi) {
while ( s#(?<=<pre>)(.*?)(?:<p[^>]*>\s*</p>|<p[^>]*/>)(.*?)(?!</pre>)#$1<br/><br/>$2#gi ) {
}
}
if (m#(["'])/xwiki/bin/download/([\/\w\.\-]+)\1#) {
$imgs{$2} = 1;
s#(["'])/xwiki/bin/download/(?:[\/\w\.\-]+)/([\w\.\-]+)\1#$1$2$1#;
}
#if (s#(["'])/xwiki/bin/download/([\/\w\.\-]+)\1#$1$2$1#) {
# $imgs{$2} = 1;
#}
## Resolve internal links
# FR translation
## Resolve internal links
# FR translation
if ( $file =~ /-fr\.html/ ) {
s#/xwiki/bin/view/NG/Presentation#1-Overview-fr.html#g;
s#/xwiki/bin/view/NG/FAQ#2-FAQ-fr.html#g;
@ -188,73 +205,76 @@ while ( my ( $url, $file ) = each %$docs ) {
s#/xwiki/bin/view/NG/DocLA#4.5-Configure-Liberty-Alliance-fr.html#g;
s#/xwiki/bin/view/NG/Erreurs#6-Errors-fr.html#g;
}
# EN translation
# EN translation
else {
s#/xwiki/bin/view/NG/Presentation#1-Overview.html#g;
s#/xwiki/bin/view/NG/FAQ#2-FAQ.html#g;
s#/xwiki/bin/view/NG/Documentation#3-Table-of-contents.html#g;
s#/xwiki/bin/view/NG/DocLA#4.5-Configure-Liberty-Alliance-fr.html#g; # Only FR
s#/xwiki/bin/view/NG/DocLA#4.5-Configure-Liberty-Alliance-fr.html#g; # Only FR
s#/xwiki/bin/view/NG/Erreurs#6-Errors.html#g;
}
# Default lang
s#/xwiki/bin/view/NG/DocPrereq#3.1-Install-prerequesites.html#g;
s#/xwiki/bin/view/NG/DocInstallTarball#3.2-Install-from-tarball.html#g;
s#/xwiki/bin/view/NG/DocInstallDebianPackages#3.3-Install-from-debian-packages.html#g;
s#/xwiki/bin/view/NG/DocInstallRedHatPackages#3.3-Install-from-redhat-packages.html#g;
s#/xwiki/bin/view/NG/DocInstallSuSEPackages#3.3-Install-from-suse-packages.html#g;
s#/xwiki/bin/view/NG/DocUpgrade094To10#3.4-Upgrade-from-0.9.4-to-1.0.html#g;
s#/xwiki/bin/view/NG/DocConfigOverwiew#4.1-Configuration-overview.html#g;
s#/xwiki/bin/view/NG/RBAC#4.1-RBAC-model.html#g;
s#/xwiki/bin/view/NG/ConfigParameterList#4.1-Configuration-parameter-list.html#g;
s#/xwiki/bin/view/NG/EnhancedMenu#4.2-Configure-portal-menu.html#g;
s#/xwiki/bin/view/NG/TemplatesDesign#4.2-HTML-templates-customization.html#g;
s#/xwiki/bin/view/NG/DocFileStorage#4.3-File-configuration-backend.html#g;
s#/xwiki/bin/view/NG/DocMySQLStorage#4.3-MySQL-configuration-backend.html#g;
s#/xwiki/bin/view/NG/DocLDAPStorage#4.3-LDAP-configuration-backend.html#g;
s#/xwiki/bin/view/NG/DocSOAPStorage#4.3-SOAP-configuration-backend.html#g;
s#/xwiki/bin/view/NG/DocFileSessionStorage#4.4-File-session-backend.html#g;
s#/xwiki/bin/view/NG/DocMySQLSessionStorage#4.4-MySQL-session-backend.html#g;
s#/xwiki/bin/view/NG/DocPostGreSQLSessionStorage#4.4-PostGreSQL-session-backend.html#g;
s#/xwiki/bin/view/NG/DocLDAPSessionStorage#4.4-LDAP-session-backend.html#g;
s#/xwiki/bin/view/NG/DocSOAPSessionStorage#4.4-SOAP-session-backend.html#g;
s#/xwiki/bin/view/NG/AuthLDAP#4.5-LDAP-authentication-backend.html#g;
s#/xwiki/bin/view/NG/SSL#4.5-SSL-authentication-backend.html#g;
s#/xwiki/bin/view/NG/Kerberos#4.5-Apache-and-Kerberos-authentication-backend.html#g;
s#/xwiki/bin/view/NG/CAS#4.5-CAS-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthRemote#4.5-Remote-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthMulti#4.5-Multiple-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthProxy#4.5-Proxy-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthSAML#4.5-SAML-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthOpenID#4.5-OpenID-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthTwitter#4.5-Twitter-authentication-backend.html#g;
s#/xwiki/bin/view/NG/UserDBLDAP#4.6-LDAP-user-backend.html#g;
s#/xwiki/bin/view/NG/UserDBNull#4.6-Null-user-backend.html#g;
s#/xwiki/bin/view/NG/UserDBMulti#4.6-Multiple-user-backend.html#g;
s#/xwiki/bin/view/NG/UserDBSAML#4.6-SAML-user-backend.html#g;
s#/xwiki/bin/view/NG/PasswordDBLDAP#4.7-LDAP-password-backend.html#g;
s#/xwiki/bin/view/NG/DocPpolicy#4.8-Configure-password-policy.html#g;
s#/xwiki/bin/view/NG/LDAPSchema#4.8-Configure-LDAP-schema.html#g;
s#/xwiki/bin/view/NG/CDA#4.9-Cross-domain-authentication.html#g;
s#/xwiki/bin/view/NG/Notifications#4.9-Notification-system.html#g;
s#/xwiki/bin/view/NG/SeveralIndependantPortals#4.9-Several-independant-portals.html#g;
s#/xwiki/bin/view/NG/ResetPassword#4.9-Reset-password-by-mail.html#g;
s#/xwiki/bin/view/NG/MultipleCookies#4.9-Multiple-cookies.html#g;
s#/xwiki/bin/view/NG/DocAppDokuwiki#5-Appli-Dokuwiki.html#g;
s#/xwiki/bin/view/NG/DocAppGRR#5-Appli-GRR.html#g;
s#/xwiki/bin/view/NG/DocAppGLPI#5-Appli-GLPI.html#g;
s#/xwiki/bin/view/NG/DocAppPLA#5-Appli-phpLDAPadmin.html#g;
s#/xwiki/bin/view/NG/DocAppSympa#5-Appli-Sympa.html#g;
s#/xwiki/bin/view/NG/DocAppBugzilla#5-Appli-Bugzilla.html#g;
s#/xwiki/bin/view/NG/DocAppTomcatValve#5-Appli-Tomcat-Valve.html#g;
s#/xwiki/bin/view/NG/DocAppBasicAuthentication#5-Appli-HTTP-Basic-Authentication.html#g;
s#/xwiki/bin/view/NG/DocAppselfMade#5-Appli-self-made.html#g;
s#/xwiki/bin/view/Main/Contacts#6-Contacts.html#g;
s#/xwiki/bin/view/NG/Roadmap#6-Roadmap.html#g;
s#/xwiki/bin/view/NG/References#6-References.html#g;
s#/xwiki/bin/view/NG/Accounting#6-Accounting.html#g;
# Remove pages not yet created
s#<li><a class=\"wikicreatelink\".*##g;
# Default lang
s#/xwiki/bin/view/NG/DocPrereq#3.1-Install-prerequesites.html#g;
s#/xwiki/bin/view/NG/DocInstallTarball#3.2-Install-from-tarball.html#g;
s#/xwiki/bin/view/NG/DocInstallDebianPackages#3.3-Install-from-debian-packages.html#g;
s#/xwiki/bin/view/NG/DocInstallRedHatPackages#3.3-Install-from-redhat-packages.html#g;
s#/xwiki/bin/view/NG/DocInstallSuSEPackages#3.3-Install-from-suse-packages.html#g;
s#/xwiki/bin/view/NG/DocUpgrade094To10#3.4-Upgrade-from-0.9.4-to-1.0.html#g;
s#/xwiki/bin/view/NG/DocConfigOverwiew#4.1-Configuration-overview.html#g;
s#/xwiki/bin/view/NG/RBAC#4.1-RBAC-model.html#g;
s#/xwiki/bin/view/NG/ConfigParameterList#4.1-Configuration-parameter-list.html#g;
s#/xwiki/bin/view/NG/EnhancedMenu#4.2-Configure-portal-menu.html#g;
s#/xwiki/bin/view/NG/TemplatesDesign#4.2-HTML-templates-customization.html#g;
s#/xwiki/bin/view/NG/DocFileStorage#4.3-File-configuration-backend.html#g;
s#/xwiki/bin/view/NG/DocMySQLStorage#4.3-MySQL-configuration-backend.html#g;
s#/xwiki/bin/view/NG/DocLDAPStorage#4.3-LDAP-configuration-backend.html#g;
s#/xwiki/bin/view/NG/DocSOAPStorage#4.3-SOAP-configuration-backend.html#g;
s#/xwiki/bin/view/NG/DocFileSessionStorage#4.4-File-session-backend.html#g;
s#/xwiki/bin/view/NG/DocMySQLSessionStorage#4.4-MySQL-session-backend.html#g;
s#/xwiki/bin/view/NG/DocPostGreSQLSessionStorage#4.4-PostGreSQL-session-backend.html#g;
s#/xwiki/bin/view/NG/DocLDAPSessionStorage#4.4-LDAP-session-backend.html#g;
s#/xwiki/bin/view/NG/DocSOAPSessionStorage#4.4-SOAP-session-backend.html#g;
s#/xwiki/bin/view/NG/AuthLDAP#4.5-LDAP-authentication-backend.html#g;
s#/xwiki/bin/view/NG/SSL#4.5-SSL-authentication-backend.html#g;
s#/xwiki/bin/view/NG/Kerberos#4.5-Apache-and-Kerberos-authentication-backend.html#g;
s#/xwiki/bin/view/NG/CAS#4.5-CAS-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthRemote#4.5-Remote-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthMulti#4.5-Multiple-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthProxy#4.5-Proxy-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthSAML#4.5-SAML-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthOpenID#4.5-OpenID-authentication-backend.html#g;
s#/xwiki/bin/view/NG/AuthTwitter#4.5-Twitter-authentication-backend.html#g;
s#/xwiki/bin/view/NG/UserDBLDAP#4.6-LDAP-user-backend.html#g;
s#/xwiki/bin/view/NG/UserDBNull#4.6-Null-user-backend.html#g;
s#/xwiki/bin/view/NG/UserDBMulti#4.6-Multiple-user-backend.html#g;
s#/xwiki/bin/view/NG/UserDBSAML#4.6-SAML-user-backend.html#g;
s#/xwiki/bin/view/NG/PasswordDBLDAP#4.7-LDAP-password-backend.html#g;
s#/xwiki/bin/view/NG/DocPpolicy#4.8-Configure-password-policy.html#g;
s#/xwiki/bin/view/NG/LDAPSchema#4.8-Configure-LDAP-schema.html#g;
s#/xwiki/bin/view/NG/CDA#4.9-Cross-domain-authentication.html#g;
s#/xwiki/bin/view/NG/Notifications#4.9-Notification-system.html#g;
s#/xwiki/bin/view/NG/SeveralIndependantPortals#4.9-Several-independant-portals.html#g;
s#/xwiki/bin/view/NG/ResetPassword#4.9-Reset-password-by-mail.html#g;
s#/xwiki/bin/view/NG/MultipleCookies#4.9-Multiple-cookies.html#g;
s#/xwiki/bin/view/NG/DocAppDokuwiki#5-Appli-Dokuwiki.html#g;
s#/xwiki/bin/view/NG/DocAppGRR#5-Appli-GRR.html#g;
s#/xwiki/bin/view/NG/DocAppGLPI#5-Appli-GLPI.html#g;
s#/xwiki/bin/view/NG/DocAppPLA#5-Appli-phpLDAPadmin.html#g;
s#/xwiki/bin/view/NG/DocAppSympa#5-Appli-Sympa.html#g;
s#/xwiki/bin/view/NG/DocAppBugzilla#5-Appli-Bugzilla.html#g;
s#/xwiki/bin/view/NG/DocAppTomcatValve#5-Appli-Tomcat-Valve.html#g;
s#/xwiki/bin/view/NG/DocAppBasicAuthentication#5-Appli-HTTP-Basic-Authentication.html#g;
s#/xwiki/bin/view/NG/DocAppselfMade#5-Appli-self-made.html#g;
s#/xwiki/bin/view/Main/Contacts#6-Contacts.html#g;
s#/xwiki/bin/view/NG/Roadmap#6-Roadmap.html#g;
s#/xwiki/bin/view/NG/References#6-References.html#g;
s#/xwiki/bin/view/NG/Accounting#6-Accounting.html#g;
# Remove pages not yet created
s#<li><a class=\"wikicreatelink\".*##g;
$buf .= $_;
}
close DOC;
@ -278,7 +298,7 @@ while ( my ( $url, $file ) = each %$docs ) {
}
foreach ( keys %imgs ) {
sleep 1;
sleep 1;
`wget -N http://wiki.lemonldap.ow2.org/xwiki/bin/download/$_`;
}

@ -22,7 +22,8 @@ sub scan {
my ( $script, $filename, $args ) = @_;
print STDERR "$filename\n";
my ( $IN, $OUT );
open $IN, "HTTP_ACCEPT_LANGUAGE=$lang SCRIPT_NAME=__SCRIPTNAME__ SCRIPT_FILENAME=$script perl -I$lib $script '$args'|";
open $IN,
"HTTP_ACCEPT_LANGUAGE=$lang SCRIPT_NAME=__SCRIPTNAME__ SCRIPT_FILENAME=$script perl -I$lib $script '$args'|";
open $OUT, ">$filename";
my $ind = 0;
local ( $_, $1 );
@ -57,7 +58,11 @@ sub scan {
}
# but+=button('$text{saveConf}','saveConf',nodeId);
elsif ( s/(but\+=)button\((['"])([^'"]*)\2,'saveConf.*$/$1'<input type=button value="$3" onclick="alert(\\'This is a demo\\');saveConf;"> &nbsp;';/ ) {
elsif (
s/(but\+=)button\((['"])([^'"]*)\2,'saveConf.*$/$1'<input type=button value="$3" onclick="alert(\\'This is a demo\\');saveConf;"> &nbsp;';/
)
{
# Nothing to do here
}
s#tree.setImagePath\(["'][^"']*["']\);#tree.setImagePath("imgs/")#;

@ -160,13 +160,16 @@ sub serviceToXML {
foreach (@param_keys) {
my $str = '';
if (defined $conf->{$_} && length $conf->{$_} gt 0) {
if ( my $rsa_pub = Crypt::OpenSSL::RSA->new_public_key($conf->{$_}) )
if ( defined $conf->{$_} && length $conf->{$_} gt 0 ) {
if ( my $rsa_pub =
Crypt::OpenSSL::RSA->new_public_key( $conf->{$_} ) )
{
my @params = $rsa_pub->get_key_parameters();
my $mod = encode_base64($params[0]->to_bin());
my $exp = encode_base64($params[1]->to_bin());
$str = '<RSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#">' . "\n\t";
my $mod = encode_base64( $params[0]->to_bin() );
my $exp = encode_base64( $params[1]->to_bin() );
$str =
'<RSAKeyValue xmlns="http://www.w3.org/2000/09/xmldsig#">'
. "\n\t";
$str .= '<Modulus>' . $mod . '</Modulus>' . "\n\t";
$str .= '<Exponent>' . $exp . '</Exponent>' . "\n";
$str .= '</RSAKeyValue>';

@ -7,17 +7,17 @@ __PACKAGE__->init(
# ACCESS TO CONFIGURATION
# By default, Lemonldap::NG uses the default lemonldap-ng.ini file to know
# where to find is configuration
# (generaly /etc/lemonldap-ng/lemonldap-ng.ini)
# You can specify by yourself this file :
#configStorage => { confFile => '/path/to/my/file' },
# You can also specify directly the configuration
# (see Lemonldap::NG::Handler::SharedConf(3))
#configStorage => {
# type => 'File',
# dirName => '/usr/local/lemonldap-ng/data/conf/'
#},
# By default, Lemonldap::NG uses the default lemonldap-ng.ini file to know
# where to find is configuration
# (generaly /etc/lemonldap-ng/lemonldap-ng.ini)
# You can specify by yourself this file :
#configStorage => { confFile => '/path/to/my/file' },
# You can also specify directly the configuration
# (see Lemonldap::NG::Handler::SharedConf(3))
#configStorage => {
# type => 'File',
# dirName => '/usr/local/lemonldap-ng/data/conf/'
#},
# OTHERS
# You can also overload any parameter issued from manager

@ -1,21 +1,18 @@
#!/usr/bin/perl
my $cgi = new Lemonldap::NG::Handler::CGI ( {
https => 0,
}
);
my $cgi = new Lemonldap::NG::Handler::CGI( { https => 0, } );
$cgi->authenticate();
print $cgi->header;
unless( $cgi->authorize ) {
print $cgi->start_html ('Forbidden');
unless ( $cgi->authorize ) {
print $cgi->start_html('Forbidden');
print "You're not authorized to see this page";
print $cgi->end_html;
}
else {
print $cgi->start_html ('Authorized');
print $cgi->start_html('Authorized');
print "<h1>Welcome</h1>You're authorized to see this page";
print $cgi->end_html;
}

@ -20,11 +20,7 @@ use strict;
# Initialization
our $cgi;
$cgi = Lemonldap::NG::Handler::CGI->new(
{
https => 0,
}
) or die;
$cgi = Lemonldap::NG::Handler::CGI->new( { https => 0, } ) or die;
# Authentication
$cgi->authenticate();
@ -37,7 +33,8 @@ print $cgi->header(
-charset => 'UTF-8',
);
while(<F>) {
while (<F>) {
#print "TOTO" if(m#[[(https?://\S+)\s+(.*?)]]#);
s#\[\[(https?://\S+)\s+(.*?)\]\]#&link($1,$2)#eg;
print;
@ -45,7 +42,7 @@ while(<F>) {
close F;
sub link {
my($l,$t)=@_;
my ( $l, $t ) = @_;
return ( $cgi->testUri($l) ? "<a href=\"$l\">$t</a>" : "<i>$t</i>" );
}

@ -618,13 +618,20 @@ sub defaultValuesInit {
$cookieName = $args->{cookieName} || $cookieName || 'lemonldap';
$whatToTrace = $args->{whatToTrace} || $whatToTrace || 'uid';
$whatToTrace =~ s/\$//g;
$https = defined($https) ? ( $https eq $args->{https} ? $https : $args->{https} ) : 1;
$https =
defined($https)
? ( $https eq $args->{https} ? $https : $args->{https} )
: 1;
$args->{securedCookie} = 1 unless defined( $args->{securedCookie} );
$cookieName .= 'http' if ( $args->{securedCookie} == 2 and $https == 0 );
$port = defined($port) ? ( $port eq $args->{port} ? $port : $args->{port} ) : 0;
$customFunctions = $args->{customFunctions};
$port =
defined($port) ? ( $port eq $args->{port} ? $port : $args->{port} ) : 0;
$customFunctions = $args->{customFunctions};
$cda = defined($cda) ? ( $cda eq $args->{cda} ? $cda : $args->{cda} ) : 0;
$httpOnly = defined($httpOnly) ? ( $httpOnly eq $args->{httpOnly} ? $httpOnly : $args->{httpOnly} ) : 0;
$httpOnly =
defined($httpOnly)
? ( $httpOnly eq $args->{httpOnly} ? $httpOnly : $args->{httpOnly} )
: 0;
$cookieExpiration = $args->{cookieExpiration} || $cookieExpiration;
1;
}

@ -6,6 +6,7 @@ use HTML::Template;
my $manager = new Lemonldap::NG::Manager(
{
# ACCESS TO CONFIGURATION
# By default, Lemonldap::NG uses the default storage.conf file to know
@ -28,8 +29,8 @@ my $manager = new Lemonldap::NG::Manager(
}
) or Lemonldap::NG::Common::CGI->abort('Unable to start manager');
our $skin = $manager->{managerSkin};
our $skin_dir ='skins';
our $skin = $manager->{managerSkin};
our $skin_dir = 'skins';
our $main_dir = $ENV{DOCUMENT_ROOT};
my $template = HTML::Template->new(
@ -38,13 +39,13 @@ my $template = HTML::Template->new(
cache => 0,
filter => sub { $manager->translate_template(@_) },
);
$template->param(SCRIPT_NAME => $ENV{SCRIPT_NAME});
$template->param(MENU => $manager->menu());
$template->param(DIR => "$skin_dir/$skin");
$template->param(CFGNUM => $manager->{cfgNum});
$template->param(TREE_AUTOCLOSE => $manager->{managerTreeAutoClose});
$template->param(TREE_JQUERYCSS => $manager->{managerTreeJqueryCss});
$template->param(CSS => $manager->{managerCss});
$template->param( SCRIPT_NAME => $ENV{SCRIPT_NAME} );
$template->param( MENU => $manager->menu() );
$template->param( DIR => "$skin_dir/$skin" );
$template->param( CFGNUM => $manager->{cfgNum} );
$template->param( TREE_AUTOCLOSE => $manager->{managerTreeAutoClose} );
$template->param( TREE_JQUERYCSS => $manager->{managerTreeJqueryCss} );
$template->param( CSS => $manager->{managerCss} );
print $manager->header('text/html; charset=utf-8');
print $template->output;

@ -4,11 +4,12 @@ use strict;
use Lemonldap::NG::Manager::Sessions;
our $cgi = Lemonldap::NG::Manager::Sessions->new({
our $cgi = Lemonldap::NG::Manager::Sessions->new(
{
# REQUIRED PARAMETERS
jqueryUri => 'skins/default/jquery-1.3.2.min.js',
imagePath => '/images/',
jqueryUri => 'skins/default/jquery-1.3.2.min.js',
imagePath => '/images/',
# PROTECTION, choose one of :
# * protection by manager
@ -27,9 +28,9 @@ our $cgi = Lemonldap::NG::Manager::Sessions->new({
# You can also fix the port (for redirections after authentications)
#port => 80,
# IP
# You can configure sessions explorer to use X-FORWARDED-FOR rather than REMOTRE_ADDR for IP
#useXForwardedForIP => 1,
# IP
# You can configure sessions explorer to use X-FORWARDED-FOR rather than REMOTRE_ADDR for IP
#useXForwardedForIP => 1,
# ACCESS TO CONFIGURATION
# By default, Lemonldap::NG uses the default storage.conf file to know
@ -58,6 +59,7 @@ our $cgi = Lemonldap::NG::Manager::Sessions->new({
# User => 'http-user',
# Password => 'pass',
#},
});
}
);
$cgi->process();

@ -68,15 +68,14 @@ sub new {
# File upload/download
elsif ( my $rfile = $self->rparam('file') ) {
my @params = ( 'file' );
if ( my $rfilename = $self->rparam('filename') )
{
push @params, ${ $rfilename };
my @params = ('file');
if ( my $rfilename = $self->rparam('filename') ) {
push @params, ${$rfilename};
}
require Lemonldap::NG::Manager::Uploader; #inherits
$self->fileUpload(@params);
$self->quit();
}
}
# URL upload/download
elsif ( my $rurl = $self->rparam('url') ) {
@ -87,7 +86,7 @@ sub new {
}
# Else load conf
require Lemonldap::NG::Manager::Downloader; #inherits
require Lemonldap::NG::Manager::Downloader; #inherits
$self->{cfgNum} =
$self->param('cfgNum')
|| $self->confObj->lastCfg()

@ -223,7 +223,7 @@ sub confNode {
textarea => '',
bool => 0,
filearea => '',
select => '',
select => '',
}->{$type};
$self->lmLog( "Type $type unknown", 'warn' ) unless ( defined $h );
}

@ -496,7 +496,9 @@ sub start {
);
print '
<div id="header">
<img alt="Lemonldap::NG" src="' . $self->{imagePath} . 'logo_lemonldap-ng.png" class="logo" width="200" height="38" />
<img alt="Lemonldap::NG" src="'
. $self->{imagePath}
. 'logo_lemonldap-ng.png" class="logo" width="200" height="38" />
<p class="ui-state-default ui-corner-all"><a href="index.pl">Gestion de la configuration</a></p>
<p class="ui-state-default ui-corner-all ui-state-active"><a href="sessions.pl">Explorateur de sessions</a></p>
</div>

@ -329,35 +329,33 @@ sub fileUpload {
my $content = '';
# Direct download
if ( $filename )
{
$content = ${ $self->rparam($fieldname) };
print $self->header(
-type => 'application/force-download; charset=utf-8',
-attachment => $filename,
-Content_Length => length $content
if ($filename) {
$content = ${ $self->rparam($fieldname) };
print $self->header(
-type => 'application/force-download; charset=utf-8',
-attachment => $filename,
-Content_Length => length $content
) . $content;
}
# JSON request
else
{
my $UPLOAD_FH = $self->upload($fieldname);
while (<$UPLOAD_FH>) {
$content .= "$_";
}
$content =~ s!<!&lt;!g;
$content =~ s!>!&gt;!g;
my $json = new JSON();
$json = $json->allow_nonref( ['1'] );
$json = $json->utf8( ['1'] );
my $json_content = $json->encode($content);
my $content = '{"status":"OK", "content":' . $json_content . '}';
print $self->header(
-type => 'text/html; charset=utf-8',
-Content_Length => length $content
else {
my $UPLOAD_FH = $self->upload($fieldname);
while (<$UPLOAD_FH>) {
$content .= "$_";
}
$content =~ s!<!&lt;!g;
$content =~ s!>!&gt;!g;
my $json = new JSON();
$json = $json->allow_nonref( ['1'] );
$json = $json->utf8( ['1'] );
my $json_content = $json->encode($content);
my $content = '{"status":"OK", "content":' . $json_content . '}';
print $self->header(
-type => 'text/html; charset=utf-8',
-Content_Length => length $content
) . $content;
}
@ -388,12 +386,12 @@ sub urlUpload {
$json = $json->allow_nonref( ['1'] );
$json = $json->utf8( ['1'] );
my $json_content = $json->encode($content);
$content = '{"status":"OK", "content":' . $json_content . '}';
$content = '{"status":"OK", "content":' . $json_content . '}';
print $self->header(
-type => 'text/html; charset=utf-8',
-Content_Length => length $content
) . $content;
) . $content;
}
## @method protected array applyTest(void* test,string value)

@ -190,7 +190,7 @@ sub struct {
authentication => 'text:/authentication:authParams:authParams',
userDB => 'text:/userDB:authParams:userdbParams',
passwordDB => 'text:/passwordDB:authParams:passworddbParams',
passwordDB => 'text:/passwordDB:authParams:passworddbParams',
# LDAP
ldapParams => {
@ -725,7 +725,7 @@ sub testStruct {
msgFail => 'Bad cookie name',
},
customFunctions => $testNotDefined,
domain => {
domain => {
test => qr/^\.?\w+(?:\.[a-zA-Z]\w*)*(?:\.[a-zA-Z]+)$/,
msgFail => 'Bad domain',
},
@ -865,7 +865,7 @@ sub testStruct {
test => qr/^\d*$/,
msgFail => 'Bad port number'
},
portal => {
portal => {
test => qr/^https?:\/\/\S+$/,
msgFail => 'Bad portal value',
},
@ -1043,7 +1043,8 @@ sub testStruct {
#@return Hashref of default values
sub defaultConf {
my $self = shift;
my $portal = defined $self->{portal} ? $self->{portal} : 'http://auth.example.com';
my $portal =
defined $self->{portal} ? $self->{portal} : 'http://auth.example.com';
$portal =~ s/\/$//;
return {
authentication => 'LDAP',
@ -1105,31 +1106,37 @@ sub defaultConf {
'samlIDPMetaDataOptionsResolutionRule' => '',
}
},
samlServicePrivateKey => '',
samlEntityID => $portal . '/saml/metadata',
samlOrganizationDisplayName => 'Example',
samlOrganizationName => 'Example',
samlOrganizationURL => 'http://www.example.com',
samlServicePrivateKey => '',
samlEntityID => $portal . '/saml/metadata',
samlOrganizationDisplayName => 'Example',
samlOrganizationName => 'Example',
samlOrganizationURL => 'http://www.example.com',
samlSPSSODescriptorAuthnRequestsSigned => '0',
samlSPSSODescriptorProtocolSupportEnumeration =>
'urn:oasis:names:tc:SAML:2.0:protocol',
samlSPSSODescriptorKeyDescriptorSigning => '',
samlSPSSODescriptorSingleLogoutServiceHTTP =>
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
. $portal . '/saml/proxySingleLogout;'
. $portal . '/saml/proxySingleLogoutReturn',
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
. $portal
. '/saml/proxySingleLogout;'
. $portal
. '/saml/proxySingleLogoutReturn',
samlSPSSODescriptorSingleLogoutServiceSOAP =>
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
. $portal . '/saml/proxySingleLogoutSOAP;',
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
. $portal
. '/saml/proxySingleLogoutSOAP;',
samlSPSSODescriptorAssertionConsumerServiceHTTPArtifact =>
'1;0;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;'
. $portal . '/saml/proxySingleSignOnArtifact',
'1;0;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;'
. $portal
. '/saml/proxySingleSignOnArtifact',
samlSPSSODescriptorAssertionConsumerServiceHTTPPost =>
'0;1;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;'
. $portal . '/saml/proxySingleSignOnPost',
'0;1;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;'
. $portal
. '/saml/proxySingleSignOnPost',
samlSPSSODescriptorAssertionConsumerServiceHTTPRedirect =>
'0;2;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
. $portal . '/saml/proxySingleSignOnRedirect',
'0;2;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
. $portal
. '/saml/proxySingleSignOnRedirect',
samlSPSSODescriptorNameIDFormatX509SubjectName => '0',
samlSPSSODescriptorNameIDFormatPersistent => '1',
samlSPSSODescriptorNameIDFormatTransient => '0',
@ -1138,28 +1145,37 @@ sub defaultConf {
'urn:oasis:names:tc:SAML:2.0:protocol',
samlIDPSSODescriptorKeyDescriptorSigning => '',
samlIDPSSODescriptorSingleSignOnServiceHTTP =>
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
. $portal . '/saml/singleSignOn;',
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
. $portal
. '/saml/singleSignOn;',
samlIDPSSODescriptorSingleSignOnServiceSOAP =>
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
. $portal . '/saml/singleSignOnSOAP;',
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
. $portal
. '/saml/singleSignOnSOAP;',
samlIDPSSODescriptorSingleLogoutServiceHTTP =>
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
. $portal . '/saml/singleLogout;'
. $portal . '/saml/singleLogoutReturn',
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
. $portal
. '/saml/singleLogout;'
. $portal
. '/saml/singleLogoutReturn',
samlIDPSSODescriptorSingleLogoutServiceSOAP =>
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
. $portal . '/saml/singleLogoutSOAP;',
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
. $portal
. '/saml/singleLogoutSOAP;',
samlIDPSSODescriptorArtifactResolutionServiceArtifact =>
'1;0;urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
. $portal . '/saml/artifact',
'1;0;urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
. $portal
. '/saml/artifact',
samlIDPSSODescriptorManageNameIDServiceHTTP =>
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
. $portal . '/saml/manageNameId;'
. $portal . '/saml/manageNameIdReturn',
'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
. $portal
. '/saml/manageNameId;'
. $portal
. '/saml/manageNameIdReturn',
samlIDPSSODescriptorManageNameIDServiceSOAP =>
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
. $portal . '/saml/manageNameIdSOAP;',
'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
. $portal
. '/saml/manageNameIdSOAP;',
samlIDPSSODescriptorNameIDFormatX509SubjectName => '0',
samlIDPSSODescriptorNameIDFormatPersistent => '1',
samlIDPSSODescriptorNameIDFormatTransient => '0',

@ -47,10 +47,10 @@ __END__
sub en {
return {
advancedParams => 'Advanced parameters',
authentication => 'Authentication module',
AuthLDAPFilter => 'Authentication filter',
authParams => 'Modules',
advancedParams => 'Advanced parameters',
authentication => 'Authentication module',
AuthLDAPFilter => 'Authentication filter',
authParams => 'Modules',
dbiAuthChain => 'Chain',
dbiAuthLoginCol => 'Login field name',
dbiAuthMailCol => 'Mail field name',
@ -69,131 +69,131 @@ sub en {
dbiUserPassword => 'Password',
dbiUserTable => 'User table',
dbiUserUser => 'User',
CAS_CAFile => 'CA file',
CAS_loginUrl => 'Login URL',
casParams => 'CAS parameters',
CAS_url => 'Server URL',
CAS_validationUrl => 'Validation URL',
cda => 'Multiple domains',
clickHereToForce => 'Click here to force',
Configuration => 'Configuration',
CAS_CAFile => 'CA file',
CAS_loginUrl => 'Login URL',
casParams => 'CAS parameters',
CAS_url => 'Server URL',
CAS_validationUrl => 'Validation URL',
cda => 'Multiple domains',
clickHereToForce => 'Click here to force',
Configuration => 'Configuration',
confModuledeprecated =>
'This module has been deprecated, set "forceUpload=1" in lemonldap-ng.ini to use it',
confSaved => 'Configuration saved',
confWasChanged => 'Configuration has been changed',
cookieExpiration => 'Cookie expiration time',
cookieName => 'Cookie Name',
cookieParams => 'Cookies',
confSaved => 'Configuration saved',
confWasChanged => 'Configuration has been changed',
cookieExpiration => 'Cookie expiration time',
cookieName => 'Cookie Name',
cookieParams => 'Cookies',
customFunctions => 'Custom functions',
databaseLocked => 'Database locked by another process',
domain => 'Domain',
exportedAttr => 'SOAP exported attributes',
exportedVars => 'Exported Variables',
generalParameters => 'General Parameters',
globalStorage => 'Apache::Session module',
globalStorageOptions => 'Apache::Session module parameters',
grantSessionRule => 'Opening conditions',
groups => 'Groups',
headers => 'HTTP Headers',
https => 'Default value for https parameter',
ldapBase => 'Users search base',
ldapConnection => 'Connection',
ldapFilters => 'Filters',
LDAPFilter => 'Default filter',
ldapGroupAttributeName => 'Target attribute',
ldapGroupAttributeNameGroup => 'Group source attribute',
databaseLocked => 'Database locked by another process',
domain => 'Domain',
exportedAttr => 'SOAP exported attributes',
exportedVars => 'Exported Variables',
generalParameters => 'General Parameters',
globalStorage => 'Apache::Session module',
globalStorageOptions => 'Apache::Session module parameters',
grantSessionRule => 'Opening conditions',
groups => 'Groups',
headers => 'HTTP Headers',
https => 'Default value for https parameter',
ldapBase => 'Users search base',
ldapConnection => 'Connection',
ldapFilters => 'Filters',
LDAPFilter => 'Default filter',
ldapGroupAttributeName => 'Target attribute',
ldapGroupAttributeNameGroup => 'Group source attribute',
ldapGroupAttributeNameSearch => 'Searched attributes',
ldapGroupAttributeNameUser => 'User source attribute',
ldapGroupBase => 'Search base',
ldapGroupObjectClass => 'Object class',
ldapGroupRecursive => 'Recursive',
ldapGroups => 'Groups',
ldapParams => 'LDAP parameters',
ldapPassword => 'Password',
ldapPpolicyControl => 'Password policy control',
ldapPort => 'Server port',
ldapServer => 'Server host',
ldapSetPassword => 'Password modify extended operation',
logParams => 'Logs',
macros => 'Macros',
mailBody => 'Success mail content',
mailConfirmBody => 'Confirmation mail content',
mailConfirmSubject => 'Confirmation mail subject',
mailFrom => 'Mail sender',
mailLDAPFilter => 'Mail filter',
mailSubject => 'Success mail subject',
mailUrl => 'Page URL',
managerDn => 'Account',
managerPassword => 'Password',
ldapGroupAttributeNameUser => 'User source attribute',
ldapGroupBase => 'Search base',
ldapGroupObjectClass => 'Object class',
ldapGroupRecursive => 'Recursive',
ldapGroups => 'Groups',
ldapParams => 'LDAP parameters',
ldapPassword => 'Password',
ldapPpolicyControl => 'Password policy control',
ldapPort => 'Server port',
ldapServer => 'Server host',
ldapSetPassword => 'Password modify extended operation',
logParams => 'Logs',
macros => 'Macros',
mailBody => 'Success mail content',
mailConfirmBody => 'Confirmation mail content',
mailConfirmSubject => 'Confirmation mail subject',
mailFrom => 'Mail sender',
mailLDAPFilter => 'Mail filter',
mailSubject => 'Success mail subject',
mailUrl => 'Page URL',
managerDn => 'Account',
managerPassword => 'Password',
multipleSessions => 'Multiple sessions',
notification => 'Activation',
notifications => 'Notifications',
notificationStorage => 'Storage module',
notificationStorageOptions => 'Storage module parameters',
notifyDeleted => 'Display deleted sessions',
notifyOther => 'Display other sessions',
notification => 'Activation',
notifications => 'Notifications',
notificationStorage => 'Storage module',
notificationStorageOptions => 'Storage module parameters',
notifyDeleted => 'Display deleted sessions',
notifyOther => 'Display other sessions',
openIdParams => 'OpenID parameters',
openIdSecret => 'Secret token',
passwordDB => 'Password module',
passwordManagement => 'Password management',
passwordManagement => 'Password management',
port => 'Port',
portal => 'URL',
portalAutocomplete => 'Auto complete',
portalCustomization => 'Customization',
portalDisplayAppslist => 'Applications list',
portalDisplayChangePassword => 'Password change',
portalDisplayLogout => 'Logout',
portalDisplayResetPassword => 'Reset password',
portalForceAuthn => 'Force authentication',
portalModules => 'Modules',
portalOpenLinkInNewWindow => 'New window',
portalParams => 'Portal',
portalRequireOldPassword => 'Require old password',
portalSkin => 'Skin',
portalUserAttr => 'User attribute',
portal => 'URL',
portalAutocomplete => 'Auto complete',
portalCustomization => 'Customization',
portalDisplayAppslist => 'Applications list',
portalDisplayChangePassword => 'Password change',
portalDisplayLogout => 'Logout',
portalDisplayResetPassword => 'Reset password',
portalForceAuthn => 'Force authentication',
portalModules => 'Modules',
portalOpenLinkInNewWindow => 'New window',
portalParams => 'Portal',
portalRequireOldPassword => 'Require old password',
portalSkin => 'Skin',
portalUserAttr => 'User attribute',
proxyParams => 'Proxy parameters',
randomPasswordRegexp => 'Regexp for password generation',
randomPasswordRegexp => 'Regexp for password generation',
redirection => 'Handler redirections',
remoteCookieName => 'Cookie name',
remoteGlobalStorage => 'Sessions module',
remoteGlobalStorageOptions => 'Sessions module options',
remoteParams => 'Remote parameters',
remotePortal => 'Portal URL',
rules => 'Rules',
securedCookie => 'Secured Cookie (SSL)',
security => 'Security',
sessionParams => 'Sessions',
sessionStorage => 'Sessions Storage',
singleIP => 'One IP only by user',
singleSession => 'One session only by user',
singleUserByIP => 'One user by IP address',
SMTPServer => 'SMTP server',
soap => 'SOAP',
Soap => 'Activation',
rules => 'Rules',
securedCookie => 'Secured Cookie (SSL)',
security => 'Security',
sessionParams => 'Sessions',
sessionStorage => 'Sessions Storage',
singleIP => 'One IP only by user',
singleSession => 'One session only by user',
singleUserByIP => 'One user by IP address',
SMTPServer => 'SMTP server',
soap => 'SOAP',
Soap => 'Activation',
soapAuthService => 'Portal URL',
soapSessionService => 'SOAP sessions end point',
SSLLDAPField => 'LDAP attribute used in filter',
sslParams => 'SSL parameters',
SSLRequire => 'SSL Required',
SSLVar => 'Extracted certificate field',
storePassword => 'Store user password in session datas',
syntaxError => 'Syntax Error',
syslog => 'Syslog facility',
timeout => 'Sessions timeout',
trustedDomains => 'Trusted domains',
storePassword => 'Store user password in session datas',
syntaxError => 'Syntax Error',
syslog => 'Syslog facility',
timeout => 'Sessions timeout',
trustedDomains => 'Trusted domains',
twitterAppName => 'Application name',
twitterKey => 'API key',
twitterParams => 'Twitter parameters',
twitterSecret => 'API secret',
unknownError => 'Unknown error',
uploadDenied => 'Upload denied',
unknownError => 'Unknown error',
uploadDenied => 'Upload denied',
userDB => 'Users module',
userControl => 'Username control',
userControl => 'Username control',
userPivot => 'Login field name in user table',
useXForwardedForIP => "Use X-Forwarded-For header address",
variables => "Variables",
virtualHosts => 'Virtual Hosts',
whatToTrace => "REMOTE_USER environment variable",
useXForwardedForIP => "Use X-Forwarded-For header address",
variables => "Variables",
virtualHosts => 'Virtual Hosts',
whatToTrace => "REMOTE_USER environment variable",
saml => 'SAML',
samlServicePrivateKey => 'Private Key',
@ -258,10 +258,10 @@ sub en {
sub fr {
return {
advancedParams => 'Paramètres avancés',
authentication => "Module d'authentification",
AuthLDAPFilter => 'Filtre d\'authentification',
authParams => "Modules",
advancedParams => 'Paramètres avancés',
authentication => "Module d'authentification",
AuthLDAPFilter => 'Filtre d\'authentification',
authParams => "Modules",
dbiAuthChain => 'Chaîne',
dbiAuthLoginCol => 'Champ identifiant',
dbiAuthMailCol => 'Champ mail',
@ -280,14 +280,14 @@ sub fr {
dbiUserPassword => 'Mot de passe',
dbiUserTable => 'Table des utilisateurs',
dbiUserUser => 'Utilisateur',
CAS_CAFile => 'Fichier d\'AC',
CAS_loginUrl => 'URL d\'authentification',
casParams => 'Paramètres CAS',
CAS_url => 'URL du serveur',
CAS_validationUrl => 'URL de validation',
cda => 'Domaines multiples',
clickHereToForce => 'Cliquer ici pour forcer',
Configuration => 'Configuration',
CAS_CAFile => 'Fichier d\'AC',
CAS_loginUrl => 'URL d\'authentification',
casParams => 'Paramètres CAS',
CAS_url => 'URL du serveur',
CAS_validationUrl => 'URL de validation',
cda => 'Domaines multiples',
clickHereToForce => 'Cliquer ici pour forcer',
Configuration => 'Configuration',
confModuledeprecated =>
"Ce module est obsolète, indiquez \"forceUpload=1\" dans le fichier lemonldap-ng.ini pour l'utiliser",
confSaved => 'Configuration sauvegardée',
@ -300,13 +300,13 @@ sub fr {
domain => 'Domaine',
exportedAttr => 'Attributs exportés par le portail (SOAP)',
exportedVars => 'Attributs à exporter',
generalParameters => 'Paramètres généraux',
globalStorage => 'Module Apache::Session',
globalStorageOptions => 'Paramètres du module Apache::Session',
grantSessionRule => "Conditions d'ouverture",
groups => 'Groupes',
headers => 'En-têtes HTTP',
https => 'Valeur par défaut du paramètre https',
generalParameters => 'Paramètres généraux',
globalStorage => 'Module Apache::Session',
globalStorageOptions => 'Paramètres du module Apache::Session',
grantSessionRule => "Conditions d'ouverture",
groups => 'Groupes',
headers => 'En-têtes HTTP',
https => 'Valeur par défaut du paramètre https',
ldapBase => 'Base de recherche des utilisateurs',
ldapConnection => 'Connexion',
ldapFilters => 'Filtres',
@ -314,54 +314,54 @@ sub fr {
ldapGroupAttributeName => 'Attribut cible',
ldapGroupAttributeNameGroup => 'Attribut source groupe',
ldapGroupAttributeNameSearch => 'Attributs recherchés',
ldapGroupAttributeNameUser => 'Attribut source utilisateur',
ldapGroupBase => 'Base de recherche',
ldapGroupObjectClass => 'Classe d\'objet',
ldapGroupRecursive => 'Recursif',
ldapGroups => 'Groupes',
ldapParams => 'Paramètres LDAP',
ldapPassword => 'Mode de passe',
ldapPpolicyControl => 'Contrôle password policy',
ldapPort => 'Port',
ldapServer => 'Hôte',
ldapSetPassword => 'Opération étendue password modify',
logParams => 'Journalisation',
macros => 'Macros',
mailBody => 'Contenu du message de succès',
mailConfirmBody => 'Contenu du message de confirmation',
mailConfirmSubject => 'Sujet du message de confirmation',
mailFrom => 'Expéditeur du message',
mailLDAPFilter => 'Filtre mail',
mailSubject => 'Sujet du message de succès',
mailUrl => 'URL de la page',
managerDn => 'Compte de connexion LDAP',
managerPassword => 'Mot de passe LDAP',
ldapGroupAttributeNameUser => 'Attribut source utilisateur',
ldapGroupBase => 'Base de recherche',
ldapGroupObjectClass => 'Classe d\'objet',
ldapGroupRecursive => 'Recursif',
ldapGroups => 'Groupes',
ldapParams => 'Paramètres LDAP',
ldapPassword => 'Mode de passe',
ldapPpolicyControl => 'Contrôle password policy',
ldapPort => 'Port',
ldapServer => 'Hôte',
ldapSetPassword => 'Opération étendue password modify',
logParams => 'Journalisation',
macros => 'Macros',
mailBody => 'Contenu du message de succès',
mailConfirmBody => 'Contenu du message de confirmation',
mailConfirmSubject => 'Sujet du message de confirmation',
mailFrom => 'Expéditeur du message',
mailLDAPFilter => 'Filtre mail',
mailSubject => 'Sujet du message de succès',
mailUrl => 'URL de la page',
managerDn => 'Compte de connexion LDAP',
managerPassword => 'Mot de passe LDAP',
multipleSessions => 'Sessions multiples',
notification => 'Activation',
notifications => 'Notifications',
notificationStorage => 'Module de stockage',
notificationStorageOptions => 'Paramètres du module de stockage',
notifyDeleted => 'Affiche les sessions effacées',
notifyOther => 'Affiche les autres sessions',
notification => 'Activation',
notifications => 'Notifications',
notificationStorage => 'Module de stockage',
notificationStorageOptions => 'Paramètres du module de stockage',
notifyDeleted => 'Affiche les sessions effacées',
notifyOther => 'Affiche les autres sessions',
openIdParams => 'Paramètres OpenID',
openIdSecret => 'Jeton secret',
passwordDB => 'Module de mot de passe',
passwordManagement => 'Gestion des mots de passe',
port => 'Port',
portal => 'URL',
portalAutocomplete => 'Auto complétion',
portalCustomization => 'Personnalisation',
portalDisplayAppslist => 'Liste des applications',
portalDisplayChangePassword => 'Changement de mot de passe',
portalDisplayLogout => 'Déconnexion',
portalDisplayResetPassword => 'Réinitialisation de mot de passe',
portalForceAuthn => 'Authentication forcée',
portalModules => 'Modules',
portalOpenLinkInNewWindow => 'Nouvelle fenêtre',
portalParams => 'Portail',
portalRequireOldPassword => 'Ancien mot de passe requis',
portalSkin => 'Thème visuel',
portalUserAttr => "Attribut de l'utilisateur",
portal => 'URL',
portalAutocomplete => 'Auto complétion',
portalCustomization => 'Personnalisation',
portalDisplayAppslist => 'Liste des applications',
portalDisplayChangePassword => 'Changement de mot de passe',
portalDisplayLogout => 'Déconnexion',
portalDisplayResetPassword => 'Réinitialisation de mot de passe',
portalForceAuthn => 'Authentication forcée',
portalModules => 'Modules',
portalOpenLinkInNewWindow => 'Nouvelle fenêtre',
portalParams => 'Portail',
portalRequireOldPassword => 'Ancien mot de passe requis',
portalSkin => 'Thème visuel',
portalUserAttr => "Attribut de l'utilisateur",
proxyParams => 'Paramètres Proxy',
randomPasswordRegexp =>
'Expression regulière pour la génération des mots de passe',
@ -371,23 +371,23 @@ sub fr {
remoteGlobalStorageOptions => 'Options du module des sessions',
remoteParams => 'Paramètres Remote',
remotePortal => 'URL du portail',
rules => 'Règles',
securedCookie => 'Cookie sécurisé (SSL)',
security => 'Sécurité',
sessionParams => 'Sessions',
sessionStorage => 'Stockage des sessions',
singleIP => 'Une seule IP par utilisateur',
singleSession => 'Une seule session par utilisateur',
singleUserByIP => 'Une seule adresse IP par utilisateur',
SMTPServer => 'Serveur SMTP',
soap => 'SOAP',
Soap => 'Activation',
rules => 'Règles',
securedCookie => 'Cookie sécurisé (SSL)',
security => 'Sécurité',
sessionParams => 'Sessions',
sessionStorage => 'Stockage des sessions',
singleIP => 'Une seule IP par utilisateur',
singleSession => 'Une seule session par utilisateur',
singleUserByIP => 'Une seule adresse IP par utilisateur',
SMTPServer => 'Serveur SMTP',
soap => 'SOAP',
Soap => 'Activation',
soapAuthService => 'URL du portail',
soapSessionService => 'Point d\'accès SOAP des sessions',
SSLLDAPField => 'Attribut LDAP pour le filtre',
sslParams => 'Paramètres SSL',
SSLRequire => 'SSL Requis',
SSLVar => 'Champ extrait du certificat',
SSLLDAPField => 'Attribut LDAP pour le filtre',
sslParams => 'Paramètres SSL',
SSLRequire => 'SSL Requis',
SSLVar => 'Champ extrait du certificat',
storePassword =>
"Stocke le mot-de-passe de l'utilisateur dans les données de session",
syntaxError => 'Erreur de syntaxe',

@ -10,6 +10,7 @@ use Lemonldap::NG::Portal::AuthLA;
my $portal = Lemonldap::NG::Portal::AuthLA->new(
{
# Liberty Parameters
laSp => {
certificate => "__DIR__/ressources/lemonsp-key-public.pem",

@ -24,7 +24,7 @@ BEGIN {
my $table = $args->{TableName} || 'sessions';
my $sth = $dbh->prepare("SELECT count(*) from $table");
$sth->execute;
return ($sth->fetchrow_array)[0];
return ( $sth->fetchrow_array )[0];
}
*Apache::Session::Postgres::get_sessions_count =

@ -3,9 +3,9 @@ use HTML::Template;
my $portal = Lemonldap::NG::Portal::SharedConf->new(
# PORTAL CUSTOMIZATION
# Skin
#portalSkin => 'pastel',
# PORTAL CUSTOMIZATION
# Skin
#portalSkin => 'pastel',
);
my $skin = $portal->{portalSkin};
@ -20,9 +20,9 @@ my $error500 = 1 if ( $http_error eq "500" );
my $error403 = 1 if ( $http_error eq "403" or !$error500 );
my $template = HTML::Template->new(
filename => "$skin_dir/$skin/error.tpl",
die_on_bad_params => 0,
cache => 0,
filename => "$skin_dir/$skin/error.tpl",
die_on_bad_params => 0,
cache => 0,
filter => sub { $portal->translate_template(@_) }
);

@ -5,19 +5,19 @@ use Lemonldap::NG::Portal::SharedConf;
my $portal = Lemonldap::NG::Portal::SharedConf->new(
{
# ACCESS TO CONFIGURATION
# By default, Lemonldap::NG uses the default lemonldap-ng.ini file to know
# where to find its configuration
# (generaly /etc/lemonldap-ng/lemonldap-ng.ini)
# You can specify by yourself this file :
#configStorage => { confFile => '/path/to/my/file' },
# or set explicitely parameters :
#configStorage => {
# type => 'File',
# dirName => '/usr/local/lemonldap-ng/data/conf/'
#},
# Note that YOU HAVE TO SET configStorage here if you've declared this
# portal as SOAP configuration server in the manager
# ACCESS TO CONFIGURATION
# By default, Lemonldap::NG uses the default lemonldap-ng.ini file to know
# where to find its configuration
# (generaly /etc/lemonldap-ng/lemonldap-ng.ini)
# You can specify by yourself this file :
#configStorage => { confFile => '/path/to/my/file' },
# or set explicitely parameters :
#configStorage => {
# type => 'File',
# dirName => '/usr/local/lemonldap-ng/data/conf/'
#},
# Note that YOU HAVE TO SET configStorage here if you've declared this
# portal as SOAP configuration server in the manager
# LOG
# By default, all is logged in Apache file. To log user actions by
@ -28,6 +28,7 @@ my $portal = Lemonldap::NG::Portal::SharedConf->new(
# Remove comment to activate SOAP Functions getCookies(user,pwd) and
# error(language, code)
Soap => 1,
# Note that getAttibutes() will be activated but on a different URI
# (http://auth.example.com/index.pl/sessions)
# You can also restrict attributes and macros exported by getAttributes
@ -55,9 +56,9 @@ my $portal = Lemonldap::NG::Portal::SharedConf->new(
# Mail subject
#mailSubject => "Password reset",
# Mail body (can use $password for generated password, and other session infos,
# like $cn)
#mailBody => 'Hello $cn,\n\nYour new password is $password',
# Mail body (can use $password for generated password, and other session infos,
# like $cn)
#mailBody => 'Hello $cn,\n\nYour new password is $password',
# LDAP filter to use
#mailLDAPFilter => '(&(mail=$mail)(objectClass=inetOrgPerson))',

@ -35,7 +35,7 @@ my $portal = Lemonldap::NG::Portal::SharedConf->new(
);
# Get skin value
my $skin = $portal->{portalSkin};
my $skin = $portal->{portalSkin};
my $skin_dir = $ENV{DOCUMENT_ROOT} . "/skins";
my ( $skinfile, %templateParams );
@ -67,7 +67,7 @@ if ( $portal->process() ) {
my $menu = Lemonldap::NG::Portal::Menu->new(
{
portalObject => $portal,
modules => {
modules => {
appslist => $portal->{portalDisplayAppslist},
password => $portal->{portalDisplayChangePassword},
logout => $portal->{portalDisplayLogout},
@ -91,10 +91,10 @@ if ( $portal->process() ) {
if ( $menu->displayModule("appslist") ) {
%templateParams = (
%templateParams,
APPSLIST_MENU => $menu->appslistMenu,
APPSLIST_DESC => $menu->appslistDescription
);
}
APPSLIST_MENU => $menu->appslistMenu,
APPSLIST_DESC => $menu->appslistDescription
);
}
}
}
@ -139,25 +139,25 @@ else {
MAIL_URL => $portal->{mailUrl},
);
# Adapt template if password policy error
# Adapt template if password policy error
if (
$portal->{portalDisplayChangePassword}
$portal->{portalDisplayChangePassword}
and ( $portal->{error} == PE_PP_CHANGE_AFTER_RESET
or $portal->{error} == PE_PP_MUST_SUPPLY_OLD_PASSWORD
or $portal->{error} == PE_PP_INSUFFICIENT_PASSWORD_QUALITY
or $portal->{error} == PE_PP_PASSWORD_TOO_SHORT
or $portal->{error} == PE_PP_PASSWORD_TOO_YOUNG
or $portal->{error} == PE_PP_PASSWORD_IN_HISTORY
or $portal->{error} == PE_PASSWORD_MISMATCH
or $portal->{error} == PE_BADOLDPASSWORD )
or $portal->{error} == PE_PP_MUST_SUPPLY_OLD_PASSWORD
or $portal->{error} == PE_PP_INSUFFICIENT_PASSWORD_QUALITY
or $portal->{error} == PE_PP_PASSWORD_TOO_SHORT
or $portal->{error} == PE_PP_PASSWORD_TOO_YOUNG
or $portal->{error} == PE_PP_PASSWORD_IN_HISTORY
or $portal->{error} == PE_PASSWORD_MISMATCH
or $portal->{error} == PE_BADOLDPASSWORD )
)
{
%templateParams = (
%templateParams,
REQUIRE_OLDPASSWORD => 1,
DISPLAY_PASSWORD => 1,
DISPLAY_RESETPASSWORD => 0,
DISPLAY_FORM => 0
REQUIRE_OLDPASSWORD => 1,
DISPLAY_PASSWORD => 1,
DISPLAY_RESETPASSWORD => 0,
DISPLAY_FORM => 0
);
}
@ -171,20 +171,20 @@ else {
);
}
# Adapt template if external authentication error
# Adapt template if external authentication error
# or logout is OK
if ( $portal->{error} == PE_BADCERTIFICATE
or $portal->{error} == PE_CERTIFICATEREQUIRED
or $portal->{error} == PE_CERTIFICATEREQUIRED
or $portal->{error} == PE_ERROR
or $portal->{error} == PE_LOGOUT_OK )
{
%templateParams = (
%templateParams,
DISPLAY_RESETPASSWORD => 0,
DISPLAY_FORM => 0,
DISPLAY_RESETPASSWORD => 0,
DISPLAY_FORM => 0,
DISPLAY_OPENID_FORM => 0,
PORTAL_URL => $portal->{portal},
);
);
}
}

@ -34,10 +34,11 @@ my $portal = Lemonldap::NG::Portal::SharedConf->new(
}
);
my $skin = 'common';
my $skin_dir = $ENV{DOCUMENT_ROOT} . 'skins';
my $skin = 'common';
my $skin_dir = $ENV{DOCUMENT_ROOT} . 'skins';
my $skin_file = 'saml2-metadata.tpl';
my $metadata = Lemonldap::NG::Common::Conf::SAML::Metadata->new();
my $metadata = Lemonldap::NG::Common::Conf::SAML::Metadata->new();
print $portal->header('text/xml; charset=utf-8');
print $metadata->serviceToXML($skin_dir.'/'.$skin.'/'.$skin_file, $portal);
print $metadata->serviceToXML( $skin_dir . '/' . $skin . '/' . $skin_file,
$portal );

@ -41,6 +41,7 @@ use Lemonldap::NG::Portal::SharedConf;
my $portal = Lemonldap::NG::Portal::SharedConf->new(
{
cda => 1,
# SUBROUTINES OVERLOAD
# 2 cases :
# 1 - If LDAP search is not needed (the master SSO gives all

Loading…
Cancel
Save