summaryrefslogtreecommitdiff
path: root/edit_storage_inc.php
diff options
context:
space:
mode:
authorNick Palmer <nick@sluggardy.net>2007-06-20 23:17:02 +0000
committerNick Palmer <nick@sluggardy.net>2007-06-20 23:17:02 +0000
commit5a9afa5379ba9c959dabeb763c33794fa3f8e1ac (patch)
tree97e3094a827ceadeaf12a435f95e53d9a86814af /edit_storage_inc.php
parenta0554231281af269fcbc6422c065c6a5f6936dc0 (diff)
downloadliberty-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.php4
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'] ) ) {