summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 14a0c15)
raw | patch | inline | side by side (parent: 14a0c15)
author | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Mar 2008 15:46:10 +0000 (15:46 +0000) | ||
committer | rettenbe <rettenbe@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 11 Mar 2008 15:46:10 +0000 (15:46 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@9685 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-si/gosa-si-server | patch | blob | history | |
gosa-si/server/events/databases.pm | patch | blob | history |
diff --git a/gosa-si/gosa-si-server b/gosa-si/gosa-si-server
index 3243918fe93b607ae5621b4d980466d353c0f18e..dfa840aa8ef762125c8045d856e549516d7f3ffd 100755 (executable)
--- a/gosa-si/gosa-si-server
+++ b/gosa-si/gosa-si-server
return $fai_classes;
}
-sub get_fai_release_entries {
- my $tmp_classes = shift || return;
- my $parent = shift || "";
- my @result = shift || ();
-
- foreach my $entry (keys %{$tmp_classes}) {
- if(defined($entry)) {
- if($entry =~ /^ou=.*$/) {
- my $release_name = $entry;
- $release_name =~ s/ou=//g;
- if(length($parent)>0) {
- $release_name = $parent."/".$release_name;
- }
- my @bufentries = get_fai_release_entries($tmp_classes->{$entry}, $release_name, @result);
- foreach my $bufentry(@bufentries) {
- push @result, $bufentry;
- }
- } else {
- my @types = get_fai_types($tmp_classes->{$entry});
- foreach my $type (@types) {
- push @result,
- {
- 'class' => $entry,
- 'type' => $type->{'type'},
- 'release' => $parent,
- 'state' => $type->{'state'},
- };
- }
- }
- }
- }
-
- return @result;
-}
sub deep_copy {
my $this = shift;
}
open($PACKAGES, "<$path.in");
- if(defined($PACKAGES)) {
+ if(not defined($PACKAGES)) {
daemon_log("ERROR: create_packages_list_db: parse_package: can not open '$path.in'",1);
return;
}
index 279ca6e9fca15dd70641d3851e94aafee7553016..c92319ed28b7cefc098e02c848dff89d7ffc6938 100644 (file)
"count_packages_list",
"query_fai_server",
"count_fai_server",
+ "query_fai_releases",
+ "count_fai_releases",
);
@EXPORT = @events;
return \@events;
}
-
+sub query_fai_releases{ return &query_db( @_ ); }
sub query_fai_server{ return &query_db( @_ ) ; }
sub query_packages_list { return &query_db( @_ ) ; }
sub query_jobdb { return &query_db( @_ ) ; }
} elsif( $header =~ /query_packages_list/ ) {
$table = $main::packages_list_tn;
$db = $main::packages_list_db;
- }± elsif( $header =~ /query_fai_server/ ) {
+ } elsif( $header =~ /query_fai_server/ ) {
$table = $main::fai_server_tn;
$db = $main::fai_server_db
+ } elsif( $header =~ /count_fai_releases/ ) {
+ $table = $main::fai_releases_tn;
+ $db = $main::fai_server_db
}
+
# prepare sql statement and execute query
my $select= &get_select_statement($msg, $msg_hash);
return @out_msg_l;
}
+sub count_fai_releases{ return &count_db( @_ ); }
sub count_fai_server{ return &count_db( @_ ); }
sub count_packages_list{ return &count_db( @_ ); }
sub count_jobdb{ return &count_db( @_ ); }
my $table;
my $db;
-
-
if( $header =~ /count_jobdb/ ) {
$table = $main::job_queue_tn;
$db = $main::job_db;
} elsif( $header =~ /count_fai_server/ ) {
$table = $main::fai_server_tn;
$db = $main::fai_server_db
+ } elsif( $header =~ /count_fai_releases/ ) {
+ $table = $main::fai_releases_tn;
+ $db = $main::fai_server_db
}
+
# prepare sql statement and execute query
my $res_hash = $db->select_dbentry("SELECT * FROM $table");