* Typo in debian/control

* Notification/DBI.pm is now running
This commit is contained in:
Xavier Guimard 2009-02-13 09:26:02 +00:00
parent 0131877a7b
commit 15e4a17bd8
2 changed files with 19 additions and 19 deletions

View File

@ -12,7 +12,7 @@ Architecture: all
Depends: liblemonldap-ng-handler-perl (= ${binary:Version}), liblemonldap-ng-manager-perl (= ${binary:Version}), liblemonldap-ng-portal-perl (= ${binary:Version})
Description: Lemonldap::NG Web-SSO system
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers.
or directly on application Apache servers.
.
This package is a metapackage that install handler, manager and portal.
@ -21,7 +21,7 @@ Section: doc
Architecture: all
Description: Lemonldap::NG Web-SSO system documentation
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers.
or directly on application Apache servers.
.
This package contains html documentation.
@ -29,9 +29,9 @@ Package: liblemonldap-ng-handler-perl
Architecture: all
Depends: libapache-session-perl, libwww-perl, libcache-cache-perl, liblemonldap-ng-conf-perl (= ${binary:Version}), libapache2-mod-perl2 | libapache-mod-perl
Suggests: liblemonldap-ng-portal-perl
Description: Lemonldap::NG apache module part
Description: Lemonldap::NG Apache module part
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers.
or directly on application Apache servers.
.
This package installs the Apache module part (handler) used to protect web
areas.
@ -40,9 +40,9 @@ Package: liblemonldap-ng-conf-perl
Architecture: all
Depends: ${misc:Depends}, libdbi-perl, debconf, libcache-cache-perl, libregexp-assemble-perl, libcrypt-rijndael-perl
Recommends: libsoap-lite-perl
Description: Lemonldap::NG apache administration interface part
Description: Lemonldap::NG Apache administration interface part
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers.
or directly on application Apache servers.
.
This package installs the configuration libraries used by other Lemonldap::NG
modules.
@ -51,9 +51,9 @@ Package: liblemonldap-ng-manager-perl
Architecture: all
Depends: libxml-simple-perl, liblemonldap-ng-conf-perl (= ${binary:Version}), libjs-jquery, liblemonldap-ng-handler-perl (= ${binary:Version})
Recommends: libcache-cache-perl, libapache-session-perl, libsoap-lite-perl
Description: Lemonldap::NG apache manager part
Description: Lemonldap::NG Apache manager part
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers.
or directly on application Apache servers.
.
This package installs the administration interface (manager).
@ -61,9 +61,9 @@ Package: liblemonldap-ng-portal-perl
Architecture: all
Depends: libapache-session-perl, libnet-ldap-perl, liblemonldap-ng-conf-perl (= ${binary:Version}), libhtml-template-perl, libjs-jquery, liblemonldap-ng-handler-perl (= ${binary:Version}), libxml-libxml-perl, libxml-libxslt-perl
Suggests: liblasso-perl, libcgi-session-perl, slapd
Description: Lemonldap::NG apache authentication portal part
Description: Lemonldap::NG Apache authentication portal part
Lemonldap::NG is a complete Web-SSO system that can run with reverse-proxies
or directly on application apache servers.
or directly on application Apache servers.
.
This package installs the authentication portal.

View File

@ -34,14 +34,14 @@ sub get {
return () unless ($uid);
$uid =~ s/'/''/g;
$ref =~ s/'/''/g;
$self->_execute(
_execute( $self,
"SELECT * FROM $self->{dbiTable} WHERE done IS NULL AND uid='$uid'"
. ( $ref ? " AND ref='$ref'" : '' )
. "ORDER BY date" )
or return ();
my $result;
while ( my $h = $self->{sth}->fetchrow_hashref() ) {
$result->{ "$h->{date}#$h->{uid}#$h->{ref}", $h->{xml} };
$result->{"$h->{date}#$h->{uid}#$h->{ref}"} = $h->{xml};
}
$self->lmLog( $self->{sth}->err(), 'warn' ) if ( $self->{sth}->err() );
return $result;
@ -53,7 +53,7 @@ sub get {
sub delete {
my ( $self, $myref ) = @_;
my ( $d, $u, $r );
unless ( ( $d, $u, $r ) = ( $myref =~ /^(\d+)#(.+?)#(.+)$/ ) ) {
unless ( ( $d, $u, $r ) = ( $myref =~ /^([^#]+)#(.+?)#(.+)$/ ) ) {
$self->lmLog( "Bad reference $myref", 'warn' );
return 0;
}
@ -63,8 +63,8 @@ sub delete {
my @ts = localtime();
$ts[5] += 1900;
$ts[4]++;
return $self->_execute(
"UPDATE $self->{dbiTable} SET done='$ts[5]-$ts[4],$ts[3] $ts[2]:$ts[1]' WHERE done IS NULL AND date='$d' AND uid='$u' AND ref='$r'"
return _execute( $self,
"UPDATE $self->{dbiTable} SET done='$ts[5]-$ts[4]-$ts[3] $ts[2]:$ts[1]' WHERE done IS NULL AND date='$d' AND uid='$u' AND ref='$r'"
);
}
@ -82,7 +82,7 @@ sub newNotif {
$date =~ s/'/''/g;
$xml = $xml->serialize();
$xml =~ s/'/''/g;
return $self->_execute(
return _execute( $self,
"INSERT INTO $self->{dbiTable} (date,uid,ref,xml) VALUES('$date','$uid','$ref','$xml')"
);
}
@ -92,7 +92,7 @@ sub newNotif {
# @return number of lines touched or 1 if select succeed
sub _execute {
my ( $self, $query ) = @_;
my $dbh = $self->dbh() or return 0;
my $dbh = _dbh($self) or return 0;
unless ( $self->{sth} = $dbh->prepare($query) ) {
$self->lmLog( $dbh->errstr(), 'warn' );
return 0;
@ -105,10 +105,10 @@ sub _execute {
return $tmp;
}
## @method object private dbh()
## @method object private _dbh()
# Return the DBI object (build it if needed).
# @return database handle object
sub dbh {
sub _dbh {
my $self = shift;
$self->{dbiTable} ||= "notifications";
return $self->{dbh} if ( $self->{dbh} and $self->{dbh}->ping );