Source for file boards_comments_inc.php
Documentation is available at boards_comments_inc.php
* intermediate include file to provide centralized place to pre/post handle comments_inc include
* @author spider <spider@steelsun.com>
require_once (LIBERTY_PKG_PATH. 'comments_inc.php');
global $gBitSystem, $gContent, $gBitUser;
If sync goes both ways we always send and let moderation
of the list or the board do its thing. If not we send
if the content status says we can.
$boardSync = $gContent->getPreference('board_sync_list_address');
if ( !empty( $boardSync ) ||
$email = $gContent->getPreference('boards_mailing_list'). '@'. $gBitSystem->getConfig( 'boards_email_host', $gBitSystem->getConfig( 'kernel_server_name' ) );
$headerHash['from_name'] = $storeComment->getField( 'anon_name' );
$headerHash['from'] = 'anonymous@'. $gBitSystem->getConfig('boards_sync_mail_server');
$userInfo = $gBitUser->getUserInfo( array( 'user_id' => $storeComment->getField( 'user_id', $gBitUser->mUserId ) ) );
$headerHash['from_name'] = !empty( $userInfo['real_name'] ) ? $userInfo['real_name'] : $userInfo['login'];
$headerHash['from'] = $userInfo['email'];
$headerHash['sender'] = $userInfo['email'];
$headerHash['x_headers']['X-BitBoards-Comment'] = $storeComment->mCommentId;
$messageId = $bitMailer->sendEmail( $storeComment->getTitle(), $storeComment->parseData(), $email, $headerHash );
$storeComment->storeMessageId( $messageId );
if( !empty( $storeComment ) && $gContent->getPreference('boards_mailing_list') ) {
if( empty( $storeComment->mErrors ) ) {
$storeComment->loadComment();
|