diff options
| author | Nick Palmer <nick@sluggardy.net> | 2007-06-20 23:17:02 +0000 |
|---|---|---|
| committer | Nick Palmer <nick@sluggardy.net> | 2007-06-20 23:17:02 +0000 |
| commit | 5a9afa5379ba9c959dabeb763c33794fa3f8e1ac (patch) | |
| tree | 97e3094a827ceadeaf12a435f95e53d9a86814af /edit_storage_inc.php | |
| parent | a0554231281af269fcbc6422c065c6a5f6936dc0 (diff) | |
| download | liberty-5a9afa5379ba9c959dabeb763c33794fa3f8e1ac.tar.gz liberty-5a9afa5379ba9c959dabeb763c33794fa3f8e1ac.tar.bz2 liberty-5a9afa5379ba9c959dabeb763c33794fa3f8e1ac.zip | |
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.
Diffstat (limited to 'edit_storage_inc.php')
| -rw-r--r-- | edit_storage_inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
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 <spider@steelsun.com> - * @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'] ) ) { |
