Пример #1
0
 /**
  * This function removes a bitboard entry
  **/
 function expunge()
 {
     $ret = FALSE;
     if ($this->isValid()) {
         $this->StartTrans();
         $mailingList = $this->getPreference('boards_mailing_list');
         $query = "DELETE FROM `" . BIT_DB_PREFIX . "boards_map` WHERE `board_content_id` = ?";
         $result = $this->mDb->query($query, array($this->mContentId));
         $query = "DELETE FROM `" . BIT_DB_PREFIX . "boards` WHERE `content_id` = ?";
         $result = $this->mDb->query($query, array($this->mContentId));
         if (LibertyMime::expunge()) {
             if ($mailingList) {
                 require_once UTIL_PKG_PATH . 'mailman_lib.php';
                 if ($error = mailman_rmlist($mailingList)) {
                     $this->mErrors['mailing_list'] = $error;
                 }
             }
             $ret = TRUE;
             $this->CompleteTrans();
         } else {
             $this->mDb->RollbackTrans();
         }
     }
     return $ret;
 }
Пример #2
0
        $gContent->storePreference('boards_mailing_list_password', $_REQUEST['boards_mailing_list_password']);
    } else {
        $gBitSmarty->assign('errorMsg', $error);
    }
    //		if( $gContent->getPreference( 'boards_mailing_list' ) && $_REQUEST['boards_mailing_list'] != $gContent->getPreference( 'boards_mailing_list' ) ) {
    // Name change
    //			groups_mailman_rename( $gContent->getPreference( 'boards_mailing_list' ), $_REQUEST['boards_mailing_list'] );
    //		}
} elseif (!empty($_REQUEST['delete_list'])) {
    if ($gContent->getPreference('boards_mailing_list')) {
        if (empty($_REQUEST['confirm'])) {
            $formHash['delete_list'] = TRUE;
            $formHash['b'] = $gContent->getField('board_id');
            $gBitSystem->confirmDialog($formHash, array('warning' => tra('Are you sure you want to delete this mailing list?') . ' ' . $gContent->getTitle(), 'error' => tra('This cannot be undone!')));
        } else {
            if (!($error = mailman_rmlist($gContent->getPreference('boards_mailing_list')))) {
                $gContent->storePreference('boards_mailing_list', NULL);
                $gContent->storePreference('boards_mailing_list_password', NULL);
                bit_redirect(BOARDS_PKG_URL . "mailing_list.php?b=" . $gContent->getField('board_id'));
            } else {
                $gBitSmarty->assign('errorMsg', $error);
            }
        }
    }
} elseif (!empty($_REQUEST['save_list_address'])) {
    $gContent->storePreference('board_sync_list_address', !empty($_REQUEST['board_sync_list_address']) ? $_REQUEST['board_sync_list_address'] : NULL);
} elseif ($gContent->getPreference('boards_mailing_list')) {
    // check for submits that need boards_mailing_list
    if (!empty($_REQUEST['subscribe_boardsync'])) {
        if ($gContent->getPreference('board_sync_list_address')) {
            mailman_addmember($gContent->getPreference('boards_mailing_list'), $boardSyncInbox);