From 5a9afa5379ba9c959dabeb763c33794fa3f8e1ac Mon Sep 17 00:00:00 2001 From: Nick Palmer Date: Wed, 20 Jun 2007 23:17:02 +0000 Subject: Add new expungingAttachment call to LibertyAttachable to notify content that an attachment it is connected to is dying. Restore delete to edit_storage_list gated by a new permission. Ensure that fisheye and treasury delete when their attachments delete. --- edit_storage_inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'edit_storage_inc.php') diff --git a/edit_storage_inc.php b/edit_storage_inc.php index fa3bb1b..5bf934b 100644 --- a/edit_storage_inc.php +++ b/edit_storage_inc.php @@ -3,7 +3,7 @@ * edit_storage_inc * * @author spider - * @version $Revision: 1.13 $ + * @version $Revision: 1.14 $ * @package liberty * @subpackage functions * @@ -38,7 +38,7 @@ if( !empty( $_REQUEST['deleteAttachment'] ) ) { $attachmentInfo = $gContent->getAttachment( $attachmentId ); // TODO: Should we have a permission for deleting attachments? - if( $gBitUser->isAdmin() || $attachmentInfo['user_id'] == $gBitUser->mUserId ) { + if( $gBitUser->isAdmin() || ($attachmentInfo['user_id'] == $gBitUser->mUserId && $gBitUser->hasPermission('p_liberty_delete_attachment')) ) { $gContent->expungeAttachment( $attachmentId ); } } elseif( !empty( $_REQUEST['detachAttachment'] ) ) { -- cgit v1.3