summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Palmer <nick@sluggardy.net>2007-10-08 13:03:45 +0000
committerNick Palmer <nick@sluggardy.net>2007-10-08 13:03:45 +0000
commite3c6d1efc081e3217aa0b85f0449f23683188421 (patch)
treed07d432b56ba61a22bf52f12d0f0147684cf81a9
parent5525aab2e232396858f3bbaf853d8e2c285d836d (diff)
downloadliberty-e3c6d1efc081e3217aa0b85f0449f23683188421.tar.gz
liberty-e3c6d1efc081e3217aa0b85f0449f23683188421.tar.bz2
liberty-e3c6d1efc081e3217aa0b85f0449f23683188421.zip
Fix delete with ajax attachments on.
-rw-r--r--attachment_uploader.php5
-rw-r--r--templates/edit_storage_list.tpl2
2 files changed, 5 insertions, 2 deletions
diff --git a/attachment_uploader.php b/attachment_uploader.php
index 181f8ce..8a1e3a4 100644
--- a/attachment_uploader.php
+++ b/attachment_uploader.php
@@ -1,6 +1,6 @@
<?php
/**
- * @version $Header: /cvsroot/bitweaver/_bit_liberty/attachment_uploader.php,v 1.9 2007/09/30 00:49:23 nickpalmer Exp $
+ * @version $Header: /cvsroot/bitweaver/_bit_liberty/attachment_uploader.php,v 1.10 2007/10/08 13:03:45 nickpalmer Exp $
* @package liberty
* @subpackage functions
*/
@@ -14,6 +14,9 @@ global $gBitSmarty, $gContent;
$gContent = new LibertyAttachable();
+// Handle delete.
+require_once( LIBERTY_PKG_PATH."edit_storage_inc.php" );
+
// make a copy of $_REQUEST that we can mess with it without interfering with the rest of the page
$storeHash = $_REQUEST;
diff --git a/templates/edit_storage_list.tpl b/templates/edit_storage_list.tpl
index 12b32d4..07a3723 100644
--- a/templates/edit_storage_list.tpl
+++ b/templates/edit_storage_list.tpl
@@ -48,7 +48,7 @@
{elseif $libertyUploader || $gBitSystem->getConfig('liberty_attachment_style') == 'ajax'}
<a href="javascript:
ajax_updater('edit_storage_list', '{$attachmentActionBaseUrl}', 'content_id={$gContent->mContentId}&amp;deleteAttachment={$attachmentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&amp;STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}');
- ajax_updater('edit_storage_list_tab', '{$attachmentActionBaseUrl}', 'content_id={$gContent->mContentId}');">
+ ajax_updater('edit_storage_list_tab', '{$attachmentActionBaseUrl}', 'content_id={$gContent->mContentId}{if empty($gContent->mContentId)}{foreach from=$gContent->mStorage key=key item=val}&amp;STORAGE[existing][{$val.attachment_id}]={$val.attachment_id}{/foreach}{/if}');">
{biticon ipackage="icons" iname="edit-delete" iexplain="delete"}
</a>
{else}