Changeset 2320:89c91e538879 for admin/post_media.php
- Timestamp:
- 10/09/13 09:30:33 (12 years ago)
- Branch:
- default
- Children:
- 2322:a75984c93a86, 2406:325f49056c79
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
admin/post_media.php
r2256 r2320 27 27 28 28 try { 29 if ($post_id && $media_id && !empty($_ POST['attach']))29 if ($post_id && $media_id && !empty($_REQUEST['attach'])) 30 30 { 31 31 $core->media = new dcMedia($core); 32 32 $core->media->addPostMedia($post_id,$media_id); 33 http::redirect($core->getPostAdminURL($rs->post_type,$post_id,false)); 33 if (!empty($_SERVER['HTTP_X_REQUESTED_WITH'])) { 34 header('Content-type: application/json'); 35 echo json_encode(array('url' => $core->getPostAdminURL($rs->post_type,$post_id,false))); 36 exit(); 37 } else { 38 http::redirect($core->getPostAdminURL($rs->post_type,$post_id,false)); 39 } 34 40 } 35 41 … … 79 85 } 80 86 } 81 ?>
Note: See TracChangeset
for help on using the changeset viewer.