Changeset 3167:9b0e5988c0eb for admin/post_media.php
- Timestamp:
- 02/11/16 15:35:39 (10 years ago)
- Branch:
- default
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post_media.php
r2720 r3167 17 17 $post_id = !empty($_REQUEST['post_id']) ? (integer) $_REQUEST['post_id'] : null; 18 18 $media_id = !empty($_REQUEST['media_id']) ? (integer) $_REQUEST['media_id'] : null; 19 $link_type = !empty($_REQUEST['link_type']) ? $_REQUEST['link_type'] : null; 19 20 20 21 if (!$post_id) { … … 30 31 { 31 32 $core->media = new dcMedia($core); 32 $core->media->addPostMedia($post_id,$media_id );33 $core->media->addPostMedia($post_id,$media_id,$link_type); 33 34 if (!empty($_SERVER['HTTP_X_REQUESTED_WITH'])) { 34 35 header('Content-type: application/json'); … … 41 42 42 43 $core->media = new dcMedia($core); 43 $f = $core->media->getPostMedia($post_id,$media_id );44 $f = $core->media->getPostMedia($post_id,$media_id,$link_type); 44 45 if (empty($f)) { 45 46 $post_id = $media_id = null; … … 56 57 if (!empty($_POST['remove'])) 57 58 { 58 $core->media->removePostMedia($post_id,$media_id );59 $core->media->removePostMedia($post_id,$media_id,$link_type); 59 60 60 61 dcPage::addSuccessNotice(__('Attachment has been successfully removed.'));
Note: See TracChangeset
for help on using the changeset viewer.