]> andersk Git - moira.git/commitdiff
Include gid.
authorzacheiss <zacheiss>
Thu, 12 May 2005 23:59:28 +0000 (23:59 +0000)
committerzacheiss <zacheiss>
Thu, 12 May 2005 23:59:28 +0000 (23:59 +0000)
gen/confluence.gen

index 333a500fa6c6a720245aa70f80c432f35b0b0c57..4513b5eb1a5af7391cd2ebee534e893b95f5ba47 100755 (executable)
@@ -25,14 +25,14 @@ $sth0->execute;
 while (($root_list_id, $hostname) = $sth0->fetchrow_array) {
     open(OUT, ">$outdir/$hostname");
 
-    $sth = $dbh->prepare("SELECT l.name FROM list l, imembers i " .
+    $sth = $dbh->prepare("SELECT l.name, l.gid FROM list l, imembers i " .
                         "WHERE i.list_id = " . $dbh->quote($root_list_id) .
                         "AND i.member_type = 'LIST' " .
                         "AND i.member_id = l.list_id AND i.direct = 1 " .
-                        "ORDER BY l.name") || exit $MR_DBMS_ERR;
+                        "AND l.grouplist = 1 ORDER BY l.name") || exit $MR_DBMS_ERR;
     $sth->execute;
     
-    while (($name) = $sth->fetchrow_array) {
+    while (($name, $gid) = $sth->fetchrow_array) {
        $sth2 = $dbh->prepare("SELECT UNIQUE i.member_type, i.member_id " .
                              "FROM imembers i, list l " .
                              "WHERE l.name = " . $dbh->quote($name) .
@@ -42,7 +42,7 @@ while (($root_list_id, $hostname) = $sth0->fetchrow_array) {
                                  exit $MR_DBMS_ERR;
        $sth2->execute;
        
-       $row = "$name:";
+       $row = "$name:$gid:";
        $row =~ s/\0//g;
        print OUT $row;
        $maybecomma = "";
This page took 0.057251 seconds and 5 git commands to generate.