* Better performances for Menu : XML was parsed 2 times
* Doc for SympaAutoLogin * Version update
This commit is contained in:
parent
1983b59943
commit
6c7558cffd
|
@ -5,7 +5,7 @@
|
|||
# Alias for Lemonldap::NG::SharedConf
|
||||
package Lemonldap::NG::Portal;
|
||||
|
||||
our $VERSION = '0.88';
|
||||
our $VERSION = '0.89';
|
||||
use Lemonldap::NG::Portal::SharedConf;
|
||||
use base 'Lemonldap::NG::Portal::SharedConf';
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ use Lemonldap::NG::Portal::PasswordDBLDAP; #inherits
|
|||
*_modifyPassword = *Lemonldap::NG::Portal::PasswordDBLDAP::modifyPassword;
|
||||
*_passwordDBInit = *Lemonldap::NG::Portal::PasswordDBLDAP::passwordDBInit;
|
||||
|
||||
our $VERSION = '0.1';
|
||||
our $VERSION = '0.11';
|
||||
|
||||
### ACCESS CONTROL DISPLAY SYSTEM
|
||||
|
||||
|
@ -217,6 +217,7 @@ sub appslistDescription {
|
|||
# @return XML root element object
|
||||
sub _getXML {
|
||||
my $self = shift;
|
||||
return $self->{_xml} if($self->{_xml});
|
||||
|
||||
# Parse XML file
|
||||
my $parser = XML::LibXML->new();
|
||||
|
@ -229,7 +230,7 @@ sub _getXML {
|
|||
# Filter XML file with user's authorizations
|
||||
$self->_filterXML($root);
|
||||
|
||||
return $root;
|
||||
return $self->{_xml} = $root;
|
||||
}
|
||||
|
||||
## @method string _displayCategory()
|
||||
|
@ -293,14 +294,15 @@ sub _displayApplication {
|
|||
|
||||
# Get application items
|
||||
my $appid = $app->getAttribute('id');
|
||||
my $appname = $app->getElementsByTagName('name')->string_value() || $appid;
|
||||
my $appname = $app->getChildrenByTagName('name')->string_value() || $appid;
|
||||
my $appuri =
|
||||
$self->_userParam( $app->getElementsByTagName('uri')->string_value()
|
||||
|| "#" );
|
||||
$self->_userParam( $app->getChildrenByTagName('uri')->string_value()
|
||||
|| "" );
|
||||
|
||||
# Display application
|
||||
$html .=
|
||||
"<li title=\"$appid\" class=\"appname\"><span><a href=\"$appuri\">$appname</a></span>\n";
|
||||
$html .= "<li title=\"$appid\" class=\"appname\"><span>"
|
||||
. ($appuri ? "<a href=\"$appuri\">$appname</a>" : "<a>$appname</a>")
|
||||
. "</span>\n";
|
||||
my @appnodes = $app->findnodes("application");
|
||||
if (@appnodes) {
|
||||
$html .= "<ul>";
|
||||
|
@ -327,12 +329,12 @@ sub _displayDescription {
|
|||
|
||||
# Get application items
|
||||
my $appid = $_->getAttribute('id');
|
||||
my $appname = $_->getElementsByTagName('name')->string_value();
|
||||
my $appname = $_->getChildrenByTagName('name')->string_value();
|
||||
my $appuri =
|
||||
$self->_userParam( $_->getElementsByTagName('uri')->string_value()
|
||||
$self->_userParam( $_->getChildrenByTagName('uri')->string_value()
|
||||
|| "#" );
|
||||
my $appdesc = $_->getElementsByTagName('description')->string_value();
|
||||
my $applogofile = $_->getElementsByTagName('logo')->string_value();
|
||||
my $appdesc = $_->getChildrenByTagName('description')->string_value();
|
||||
my $applogofile = $_->getChildrenByTagName('logo')->string_value();
|
||||
my $applogo = $self->{apps}->{imgpath} . $applogofile;
|
||||
|
||||
# Display application
|
||||
|
@ -358,9 +360,9 @@ sub _filterXML {
|
|||
|
||||
my @apps = $root->getElementsByTagName('application');
|
||||
foreach (@apps) {
|
||||
my $appdisplay = $_->getElementsByTagName('display')->string_value();
|
||||
my $appdisplay = $_->getChildrenByTagName('display')->string_value();
|
||||
my $appuri =
|
||||
$self->_userParam( $_->getElementsByTagName('uri')->string_value() );
|
||||
$self->_userParam( $_->getChildrenByTagName('uri')->string_value() );
|
||||
|
||||
# Remove node if display is "no"
|
||||
$_->unbindNode if ( $appdisplay eq "no" );
|
||||
|
|
|
@ -34,7 +34,7 @@ use Safe;
|
|||
#inherits Apache::Session
|
||||
#link Lemonldap::NG::Common::Apache::Session::SOAP protected globalStorage
|
||||
|
||||
our $VERSION = '0.88';
|
||||
our $VERSION = '0.89';
|
||||
|
||||
use base qw(Lemonldap::NG::Common::CGI Exporter);
|
||||
our @ISA;
|
||||
|
|
Loading…
Reference in New Issue
Block a user