Exemple #1
0
 private function deleteAttachmentFiles(BOL_Comment $comment)
 {
     // delete attachments
     $attch = $comment->getAttachment();
     if ($attch !== null) {
         $tempArr = json_decode($attch, true);
         if (!empty($tempArr['uid']) && !empty($tempArr['pluginKey'])) {
             BOL_AttachmentService::getInstance()->deleteAttachmentByBundle($tempArr['pluginKey'], $tempArr['uid']);
         }
     }
 }
Exemple #2
0
 private function deleteAttachmentFiles(BOL_Comment $comment)
 {
     // delete attachments
     $attch = $comment->getAttachment();
     if ($attch !== null) {
         $tempArr = json_decode($attch, true);
         if ($tempArr['type'] == 'photo') {
             OW::getEventManager()->call('base.attachment_delete_image', array('url' => $tempArr['url']));
         }
     }
 }