global $CONF, $manager;
// create parser object & action handler
- $actions =& new COMMENTACTIONS($this);
- $parser =& new PARSER($actions->getDefinedActions(),$actions);
+ $actions = new COMMENTACTIONS($this);
+ $parser = new PARSER($actions->getDefinedActions(), $actions);
$actions->setTemplate($template);
$actions->setParser($parser);
$comment['timestamp'] = strtotime($comment['ctime']);
$actions->setCurrentComment($comment);
$actions->setHighlight($highlight);
- $manager->notify('PreComment', array('comment' => &$comment));
+ $param = array('comment' => &$comment);
+ $manager->notify('PreComment', $param);
$parser->parse($template['COMMENTS_BODY']);
- $manager->notify('PostComment', array('comment' => &$comment));
+ $param = array('comment' => &$comment);
+ $manager->notify('PostComment', $param);
}
$parser->parse($template['COMMENTS_FOOTER']);
$spamcheck['url'] = $comment['userid'];
} // end if
- $manager->notify('SpamCheck', array('spamcheck' => &$spamcheck) );
+ $param = array('spamcheck' => &$spamcheck);
+ $manager->notify('SpamCheck', $param);
if ( !$continue && isset($spamcheck['result']) && $spamcheck['result'] == TRUE )
{
$frommail = $member->getNotifyFromMailAddress($comment['email']);
- $notify =& new NOTIFICATION($settings->getNotifyAddress() );
+ $notify = new NOTIFICATION($settings->getNotifyAddress() );
$notify->notify($mailto_title, $mailto_msg , $frommail);
}
$comment = COMMENT::prepare($comment);
- $manager->notify('PreAddComment', array('comment' => &$comment, 'spamcheck' => &$spamcheck) );
+ $param = array(
+ 'comment' => &$comment,
+ 'spamcheck' => &$spamcheck
+ );
+ $manager->notify('PreAddComment', $param);
$name = sql_real_escape_string($comment['user']);
$url = sql_real_escape_string($comment['userid']);
// post add comment
$commentid = sql_insert_id();
- $manager->notify('PostAddComment', array('comment' => &$comment, 'commentid' => &$commentid, 'spamcheck' => &$spamcheck) );
+ $param = array(
+ 'comment' => &$comment,
+ 'commentid' => &$commentid,
+ 'spamcheck' => &$spamcheck
+ );
+ $manager->notify('PostAddComment', $param);
// succeeded !
return TRUE;
// let plugins do verification (any plugin which thinks the comment is invalid
// can change 'error' to something other than '1')
$result = 1;
- $manager->notify('ValidateForm', array('type' => 'comment', 'comment' => &$comment, 'error' => &$result, 'spamcheck' => &$spamcheck) );
+ $param = array(
+ 'type' => 'comment',
+ 'comment' => &$comment,
+ 'error' => &$result,
+ 'spamcheck' => &$spamcheck
+ );
+ $manager->notify('ValidateForm', $param);
return $result;
}