* @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;
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;
}
$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');
}
- 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);
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;";