[Fusionforge-commits] r9320 - in trunk/plugins/coclico/mailman: cronjobs include www

Mélanie Le Bail melanelebail at libremir.placard.fr.eu.org
Thu Apr 1 17:47:00 CEST 2010


Author: melanelebail
Date: 2010-04-01 17:46:59 +0200 (Thu, 01 Apr 2010)
New Revision: 9320

Modified:
   trunk/plugins/coclico/mailman/cronjobs/manage_mailmanlists.php
   trunk/plugins/coclico/mailman/include/BackendMailmanList.class.php
   trunk/plugins/coclico/mailman/include/MailmanList.class.php
   trunk/plugins/coclico/mailman/www/mailman_utils.php
Log:
- Modify status lists problem to be compatible with original forge lists


Modified: trunk/plugins/coclico/mailman/cronjobs/manage_mailmanlists.php
===================================================================
--- trunk/plugins/coclico/mailman/cronjobs/manage_mailmanlists.php	2010-04-01 08:49:30 UTC (rev 9319)
+++ trunk/plugins/coclico/mailman/cronjobs/manage_mailmanlists.php	2010-04-01 15:46:59 UTC (rev 9320)
@@ -29,7 +29,7 @@
 // MailingList backend class
 require_once $gfplugins.'mailman/include/BackendMailmanList.class.php' ;
 			 
-
+gt
 $res = db_query_params ('SELECT id,type, parameters FROM system_event WHERE status=$1 ORDER BY id DESC',
 			array ('1')); 
 if (!$res) {
@@ -44,7 +44,7 @@
 		BackendMailmanList::instance()->deleteList($data['parameters']);
 	}
 	$events[$data['id']]=$data['parameters'];
-	echo "\n Event ".$data['id']." : ".$data['type']." DONE for list id=".$data['parameters'];
+	echo "events[".$data['id']."]=".$data['parameters'];
 }
 if(isset($events)) {
 	foreach($events as $event_id => $list_id) {
@@ -54,12 +54,7 @@
 			printf('Unable to update the list of events: '.db_error());
 			return false;
 		}
-		$sql = "UPDATE mail_group_list SET status='1' WHERE group_list_id='".$list_id."';"; 
-		$result = db_query($sql);
-		if (!$result) {
-			printf('Unable to update the list of events: '.db_error());
-			return false;
-		}
+		
 	}
 
 }

Modified: trunk/plugins/coclico/mailman/include/BackendMailmanList.class.php
===================================================================
--- trunk/plugins/coclico/mailman/include/BackendMailmanList.class.php	2010-04-01 08:49:30 UTC (rev 9319)
+++ trunk/plugins/coclico/mailman/include/BackendMailmanList.class.php	2010-04-01 15:46:59 UTC (rev 9320)
@@ -91,7 +91,7 @@
             
             if (system($GLOBALS['mailman_bin_dir']."/config_list -i $config_file ".$list->getName()) !== false) {
                 if (unlink($config_file)) {
-                    return true;
+			return true;
                 }
             }
         }
@@ -118,7 +118,13 @@
                 // Create list
                 system($GLOBALS['mailman_bin_dir']."/newlist -q ".$list->getName()." ".$list_admin_email." ".$list->getPassword()." >/dev/null");
 		// Then update configuraion
-                return $this->updateListConfig($list);
+                if( $this->updateListConfig($list) !=false ) {
+			$result =  $this->_getMailingListDao() -> updateList($list->getID(),$row['group_id'], $list->getDescription(), $list->isPublic(),'3');
+		    	if (!$result) {
+				printf('Unable to update the list status: '.db_error());
+				return false;
+			}		
+		}
             }
         }
         return false;

Modified: trunk/plugins/coclico/mailman/include/MailmanList.class.php
===================================================================
--- trunk/plugins/coclico/mailman/include/MailmanList.class.php	2010-04-01 08:49:30 UTC (rev 9319)
+++ trunk/plugins/coclico/mailman/include/MailmanList.class.php	2010-04-01 15:46:59 UTC (rev 9320)
@@ -423,7 +423,7 @@
 		}
 		require_once('mailman/include/events/SystemEvent_MAILMAN_LIST_DELETE.class.php');
 		$systemevent =	SystemEventManager::instance();
-		$systemevent->createEvent('MAILMAN_LIST_DELETE', array('group_list_id' => $this->groupMailmanListId,),SystemEvent::PRIORITY_MEDIUM);
+		$systemevent->createEvent('MAILMAN_LIST_DELETE',  $this->groupMailmanListId,SystemEvent::PRIORITY_MEDIUM);
 		
 
 		return true;

Modified: trunk/plugins/coclico/mailman/www/mailman_utils.php
===================================================================
--- trunk/plugins/coclico/mailman/www/mailman_utils.php	2010-04-01 08:49:30 UTC (rev 9319)
+++ trunk/plugins/coclico/mailman/www/mailman_utils.php	2010-04-01 15:46:59 UTC (rev 9320)
@@ -35,7 +35,7 @@
 Thank you for registering your project with %1$s.
 
 -- the %1$s staff
-'), $GLOBALS['sys_name'], $GLOBALS['sys_lists_host'], $list->getName(), $list->getExternalInfoUrl(), 'http://'.$GLOBALS['sys_lists_host'].'/mailman/admin/'.$this->getName(), $list->getPassword());
+'), $GLOBALS['sys_name'], $GLOBALS['sys_lists_host'], $list->getName(), $list->getExternalInfoUrl(), 'http://'.$GLOBALS['sys_lists_host'].'/mailman/admin/'.$list->getName(), $list->getPassword());
        $mailSubject = sprintf(_('%1$s New Mailing List'), $GLOBALS['sys_name']);
 
 
@@ -74,7 +74,7 @@
 		} else {
 			getIcon();
 			echo '&nbsp;<b>'.$currentList->getName().'</b> [';
-			if($currentList->getStatus() == '3') {
+			if($currentList->getStatus() == '1') {
 				echo	_('Not activated yet');
 			} else {
 				echo ' <A HREF="index.php?group_id='.$request->get('group_id').'&action=pipermail&id='.$currentList->getID().'">'._('Archives').'</A>';
@@ -110,7 +110,7 @@
 			getIcon();
 			echo '&nbsp;<b>'.$currentList->getName().'</b> [';
 		}
-		if($currentList->getStatus() == '3') {
+		if($currentList->getStatus() == '1') {
 			echo	_('Not activated yet');
 		} else {
 




More information about the Fusionforge-commits mailing list