boards
[ class tree: boards ] [ index: boards ] [ all elements ]

Source for file boards_comments_inc.php

Documentation is available at boards_comments_inc.php

  1. <?php
  2. /**
  3.  * $Header$
  4.  * $Id$
  5.  *
  6.  * intermediate include file to provide centralized place to pre/post handle comments_inc include
  7.  *
  8.  * @author spider <spider@steelsun.com>
  9.  * @version $Revision$
  10.  * @package boards
  11.  */
  12.  
  13. /**
  14.  * Initialization
  15.  */
  16. require_once (LIBERTY_PKG_PATH.'comments_inc.php');
  17.  
  18. if (!function_exists("send_board_email")) {
  19.     function send_board_email($storeComment{
  20.         global $gBitSystem$gContent$gBitUser;
  21.  
  22.         /*
  23.          If sync goes both ways we always send and let moderation
  24.          of the list or the board do its thing. If not we send
  25.          if the content status says we can.
  26.         */
  27.         $boardSync $gContent->getPreference('board_sync_list_address');
  28.         if !empty$boardSync ||
  29.              $storeComment->getContentStatus({
  30.  
  31.             require_onceKERNEL_PKG_PATH.'BitMailer.php' );
  32.             $bitMailer new BitMailer();
  33.             $email $gContent->getPreference('boards_mailing_list').'@'.$gBitSystem->getConfig'boards_email_host'$gBitSystem->getConfig'kernel_server_name' ) );
  34.             if$storeComment->getField'user_id' == ANONYMOUS_USER_ID {
  35.                 $headerHash['from_name'$storeComment->getField'anon_name' );
  36.                 $headerHash['from''anonymous@'.$gBitSystem->getConfig('boards_sync_mail_server');
  37.             else {
  38.                 $userInfo $gBitUser->getUserInfoarray'user_id' => $storeComment->getField'user_id'$gBitUser->mUserId ) ) );
  39.                 $headerHash['from_name'!empty$userInfo['real_name'$userInfo['real_name'$userInfo['login'];
  40.                 $headerHash['from'$userInfo['email'];
  41.                 $headerHash['sender'$userInfo['email'];
  42.             }
  43.             $headerHash['x_headers']['X-BitBoards-Comment'$storeComment->mCommentId;
  44.             $messageId $bitMailer->sendEmail$storeComment->getTitle()$storeComment->parseData()$email$headerHash );
  45.             $storeComment->storeMessageId$messageId );
  46.         }
  47.     }
  48. }
  49.  
  50. if!empty$storeComment && $gContent->getPreference('boards_mailing_list') ) {
  51.     ifempty$storeComment->mErrors ) ) {
  52.         $storeComment->loadComment();
  53.         send_board_email($storeComment);
  54.     }
  55. }
  56.  
  57. ?>

Documentation generated on Wed, 29 Jul 2015 13:56:12 +0000 by phpDocumentor 1.5.0-lsces