Commit 9a931a5c4314482e7249149e6a6b3a63f38b362d

Authored by Jarrett Jordaan
1 parent fd2ac338

PT-2294593: Bulk emails.

Committed by: Jarrett Jordaan

Reviewed by: Megan Watson
lib/foldermanagement/compressionArchiveUtil.inc.php
... ... @@ -668,9 +668,10 @@ class DownloadQueue
668 668 *
669 669 * @param unknown_type $zip
670 670 * @param unknown_type $docId
  671 + * @param boolean $alerts
671 672 * @return unknown
672 673 */
673   - public function addDocument(&$zip, $docId)
  674 + public function addDocument(&$zip, $docId, $alerts = true)
674 675 {
675 676  
676 677 $oDocument = Document::get($docId);
... ... @@ -685,7 +686,7 @@ class DownloadQueue
685 686 }
686 687  
687 688 // fire subscription alerts for the downloaded document - if global config is set
688   - if($this->bNotifications){
  689 + if($this->bNotifications && $alerts){
689 690 $oSubscriptionEvent = new SubscriptionEvent();
690 691 $oFolder = Folder::get($oDocument->getFolderID());
691 692 $oSubscriptionEvent->DownloadDocument($oDocument, $oFolder);
... ...
plugins/ktcore/KTBulkActions.php
... ... @@ -1197,7 +1197,6 @@ class KTBrowseBulkExportAction extends KTBulkAction {
1197 1197 *
1198 1198 */
1199 1199 function perform_action($oEntity) {
1200   - // TODO find a way to do bulk email
1201 1200 $exportCode = $_SESSION['exportcode'];
1202 1201 $this->oZip = ZipFolder::get($exportCode);
1203 1202  
... ... @@ -1216,7 +1215,7 @@ class KTBrowseBulkExportAction extends KTBulkAction {
1216 1215 if($useQueue){
1217 1216 DownloadQueue::addItem($this->sExportCode, $this->oFolder->getId(), $oDocument->iId, 'document');
1218 1217 }else{
1219   - $oQueue->addDocument($this->oZip, $oDocument->iId);
  1218 + $oQueue->addDocument($this->oZip, $oDocument->iId, false);
1220 1219 }
1221 1220  
1222 1221  
... ...