[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gforge-commits] gforge/cronjobs/mail mailing_lists_create.php, 1.8, 1.
From: |
hunkim |
Subject: |
[Gforge-commits] gforge/cronjobs/mail mailing_lists_create.php, 1.8, 1.9 |
Date: |
Fri, 26 Mar 2004 11:15:57 -0600 |
Update of /cvsroot/gforge/gforge/cronjobs/mail
In directory db.perdue.net:/tmp/cvs-serv27561/cronjobs/mail
Modified Files:
mailing_lists_create.php
Log Message:
* Added status checking and updating module for the mailing list creating
cronjobs
* Added status checking to show if a mailing list is activated
Index: mailing_lists_create.php
===================================================================
RCS file: /cvsroot/gforge/gforge/cronjobs/mail/mailing_lists_create.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- mailing_lists_create.php 1 Dec 2003 04:03:41 -0000 1.8
+++ mailing_lists_create.php 26 Mar 2004 17:15:54 -0000 1.9
@@ -6,8 +6,9 @@
// and, finally, create the lists in a /tmp/mailman-aliases file
// The /tmp/mailman-aliases file will then be read by the mailaliases.php
file
//
-
-//
+// Status: 1 - list creating request
+// Status: 2 - list created
+//
// DEFINE VARS FOR USING THIS SCRIPT
//
define('MAILMAN_DIR','/var/mailman/');
@@ -39,9 +40,12 @@
pclose($fp);
$res=db_query("SELECT users.user_name,email,mail_group_list.list_name,
- mail_group_list.password,mail_group_list.status
- FROM mail_group_list,users
- WHERE mail_group_list.list_admin=users.user_id");
+ mail_group_list.password,mail_group_list.status,
+ mail_group_list.group_list_id
+ FROM mail_group_list,users
+ WHERE mail_group_list.list_admin=users.user_id
+ AND mail_group_list.status = 1
+ ");
$err .= db_error();
$rows=db_numrows($res);
@@ -55,12 +59,20 @@
$email = db_result($res,$i,'email');
$listname = strtolower(db_result($res,$i,'list_name'));
$listpassword = db_result($res,$i,'password');
+ $grouplistid = db_result($res,$i,'group_list_id');
+
if (! in_array($listname,$mailing_lists)) {
$err .= "Creating Mailing List: $listname\n";
$lcreate_cmd = MAILMAN_DIR."bin/newlist -q $listname $email
$listpassword";
$err .= "Command to be executed is $lcreate_cmd\n";
$fp = popen($lcreate_cmd,"r");
+
+
}
+
+ // Update status
+ db_query("UPDATE mail_group_list set status=2 where group_list_id =
$grouplistid");
+
$list_str="$listname: \"|/var/mailman/mail/wrapper post
$listname\"
$listname-admin: \"|/var/mailman/mail/wrapper mailowner $listname\"
$listname-request: \"|/var/mailman/mail/wrapper mailcmd $listname\"\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gforge-commits] gforge/cronjobs/mail mailing_lists_create.php, 1.8, 1.9,
hunkim <=