[Fusionforge-commits] r9543 - in trunk: gforge/common/system_event plugins/coclico/mailman/include

Mélanie Le Bail melanelebail at libremir.placard.fr.eu.org
Tue Apr 20 16:45:02 CEST 2010


Author: melanelebail
Date: 2010-04-20 16:45:01 +0200 (Tue, 20 Apr 2010)
New Revision: 9543

Modified:
   trunk/gforge/common/system_event/SystemEvent.class.php
   trunk/gforge/common/system_event/SystemEventManager.class.php
   trunk/plugins/coclico/mailman/include/MailmanList.class.php
   trunk/plugins/coclico/mailman/include/MailmanListDao.class.php
   trunk/plugins/coclico/mailman/include/mailmanPlugin.class.php
Log:
Fix troubles in codendi integration


Modified: trunk/gforge/common/system_event/SystemEvent.class.php
===================================================================
--- trunk/gforge/common/system_event/SystemEvent.class.php	2010-04-20 12:42:08 UTC (rev 9542)
+++ trunk/gforge/common/system_event/SystemEvent.class.php	2010-04-20 14:45:01 UTC (rev 9543)
@@ -30,6 +30,7 @@
 
   const PRIORITY_MEDIUM = 2; 
   const STATUS_NEW= 1; 
+  const STATUS_RUNNING= 2; 
   const STATUS_DONE= 3; 
 }
 

Modified: trunk/gforge/common/system_event/SystemEventManager.class.php
===================================================================
--- trunk/gforge/common/system_event/SystemEventManager.class.php	2010-04-20 12:42:08 UTC (rev 9542)
+++ trunk/gforge/common/system_event/SystemEventManager.class.php	2010-04-20 14:45:01 UTC (rev 9543)
@@ -70,7 +70,7 @@
      * @return array events
      */
     public function fetchEvents($offset = 0, $limit = 10, $full = false, $filter_status = false, $filter_type = false, $filter_params = false) {
-	    $results = db_query_params('SELECT * FROM system_event WHERE type=$1 AND status=$2 AND parameters=$3;',array($filter_type, $filter_status,$filter_params));
+	    $results = db_query_params('SELECT * FROM system_event WHERE type IN ($1) AND status IN($2) AND parameters=$3;',array($filter_type, $filter_status,$filter_params));
 	    while($row = db_fetch_array($results))
 	    {
 		    $events[]=$row;

Modified: trunk/plugins/coclico/mailman/include/MailmanList.class.php
===================================================================
--- trunk/plugins/coclico/mailman/include/MailmanList.class.php	2010-04-20 12:42:08 UTC (rev 9542)
+++ trunk/plugins/coclico/mailman/include/MailmanList.class.php	2010-04-20 14:45:01 UTC (rev 9543)
@@ -192,7 +192,7 @@
 	function activationRequested()
 	{
 		$systemevent =	SystemEventManager::instance();
-		$result = $systemevent->fetchEvents(0,10,false,SystemEvent::STATUS_NEW,'MAILMAN_LIST_CREATE',$this->getID());
+		$result = $systemevent->fetchEvents(0,10,false,array(SystemEvent::STATUS_NEW,SystemEvent::STATUS_RUNNING),array('MAILMAN_LIST_CREATE'),$this->getID());
 		if(count($result)<1) {
 			return false;
 		}

Modified: trunk/plugins/coclico/mailman/include/MailmanListDao.class.php
===================================================================
--- trunk/plugins/coclico/mailman/include/MailmanListDao.class.php	2010-04-20 12:42:08 UTC (rev 9542)
+++ trunk/plugins/coclico/mailman/include/MailmanListDao.class.php	2010-04-20 14:45:01 UTC (rev 9543)
@@ -91,6 +91,7 @@
 		$isPublic = $this->da->quoteSmart($isPublic);
 		$creator_id = $this->da->quoteSmart($creator_id);
 		$requested = $this->da->quoteSmart($requested);
+		$listPassword = $this->da->quoteSmart($listPassword);
 		$description = $this->da->quoteSmart($description);
 		$sql = "INSERT INTO mail_group_list (group_id, list_name, is_public, password, list_admin, status, description) VALUES ($1,$2,$3,$4,$5,$6,$7);";
 		return db_insertid($this->update($sql,array($group_id, $realListName,$isPublic,$listPassword,$creator_id,$requested,$description)),'mail_group_list','group_list_id');
@@ -111,7 +112,7 @@
 
 	}
 
-	function & newSubscriber($usermail, $username, $userpasswd, $listname) {
+	function  newSubscriber($usermail, $username, $userpasswd, $listname) {
 		$usermail = $this->da->quoteSmart($usermail);
 		$username = $this->da->quoteSmart($username);
 		$userpasswd = $this->da->quoteSmart($userpasswd);
@@ -120,7 +121,7 @@
 		return $this->update($sql,array($usermail,$userpasswd,$username,$listname));
 	}
 
-	function & deleteSubscriber($usermail, $listname) {
+	function  deleteSubscriber($usermail, $listname) {
 		$usermail = $this->da->quoteSmart($usermail);
 		$listname = $this->da->quoteSmart($listname);
 		$sql="DELETE FROM  plugin_mailman WHERE listname=$1 AND address=$2;";

Modified: trunk/plugins/coclico/mailman/include/mailmanPlugin.class.php
===================================================================
--- trunk/plugins/coclico/mailman/include/mailmanPlugin.class.php	2010-04-20 12:42:08 UTC (rev 9542)
+++ trunk/plugins/coclico/mailman/include/mailmanPlugin.class.php	2010-04-20 14:45:01 UTC (rev 9543)
@@ -31,6 +31,8 @@
 require_once 'MailmanListDao.class.php';
 require_once 'common/dao/CodendiDataAccess.class.php';
 
+require_once'mailman/include/events/SystemEvent_MAILMAN_LIST_CREATE.class.php');
+require_once'mailman/include/events/SystemEvent_MAILMAN_LIST_DELETE.class.php');
 
 
 class mailmanPlugin extends Plugin {




More information about the Fusionforge-commits mailing list