savannah-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-cvs] administration/infra/savane/bin sv_groups


From: Elfyn McBratney
Subject: [Savannah-cvs] administration/infra/savane/bin sv_groups
Date: Tue, 14 Sep 2004 15:26:14 -0400

CVSROOT:        /cvsroot/administration
Module name:    administration
Branch:         
Changes by:     Elfyn McBratney <address@hidden>        04/09/14 19:21:03

Modified files:
        infra/savane/bin: sv_groups 

Log message:
        Move GetDB() calls back into the foreach() expression.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/administration/administration/infra/savane/bin/sv_groups.diff?tr1=1.1&tr2=1.2&r1=text&r2=text

Patches:
Index: administration/infra/savane/bin/sv_groups
diff -u administration/infra/savane/bin/sv_groups:1.1 
administration/infra/savane/bin/sv_groups:1.2
--- administration/infra/savane/bin/sv_groups:1.1       Tue Sep 14 04:38:12 2004
+++ administration/infra/savane/bin/sv_groups   Tue Sep 14 19:21:03 2004
@@ -2,7 +2,7 @@
 # This file is part of the Savane project
 # <http://gna.org/projects/savane/>
 #
-# $Id: sv_groups,v 1.1 2004/09/14 04:38:12 beu Exp $
+# $Id: sv_groups,v 1.2 2004/09/14 19:21:03 beu Exp $
 #
 #  Copyright 2001 (c) Loic Dachary <address@hidden> (sv_cvs.pl)
 #            2003 (c) Mathieu Roy <address@hidden> 
@@ -154,13 +154,11 @@
 #
 #    To limit the number of request, we use only one very long SQL request. 
 my %db_group_type;
-my @db_group_type_infos = GetDB("group_type", 0,
-                               "name,type_id,dir_type_homepage,".
-                               "dir_type_cvs,dir_type_download,dir_homepage,".
-                               "dir_cvs,dir_download,can_use_homepage,".
-                               "can_use_cvs,can_use_download");
 
-foreach my $line (@db_group_type_infos) {
+foreach my $line (GetDB("group_type", 0, "name,type_id,dir_type_homepage,".
+                       "dir_type_cvs,dir_type_download,dir_homepage,".
+                       "dir_cvs,dir_download,can_use_homepage,".
+                       "can_use_cvs,can_use_download")) {
     chomp($line);
     my ($name, $id, $dir_type_homepage, $dir_type_cvs,
        $dir_type_download, $dir_homepage, $dir_cvs, $dir_download,
@@ -187,12 +185,10 @@
 # Only groups in Active status will be handled!
 my %db_groups;
 my @db_groups;
-my @db_groups_infos = GetDB("groups", "status='A'",
-                           
"group_id,unix_group_name,type,is_public,use_homepage,".
-                           "use_cvs,use_download,dir_homepage,dir_cvs,".
-                           "dir_download");
 
-foreach my $line (@db_groups_infos) {
+foreach my $line (GetDB("groups", "status='A'",
+                       "group_id,unix_group_name,type,is_public,use_homepage,".
+                       
"use_cvs,use_download,dir_homepage,dir_cvs,dir_download")) {
     chomp($line);
     my ($group_id, $name, $type, $is_public, $use_homepage, $use_cvs,
        $use_download, $dir_homepage, $dir_cvs, $dir_download) = split(",", 
$line);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]