Dotclear


Ignore:
Timestamp:
02/11/16 15:35:39 (10 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Cope with sort of "un-attached" media → allows new features as "featured media" plugin. Video and Audio HTML5 element are now used (if possible) rather than Flash object for attachments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/post_media.php

    r2720 r3167  
    1717$post_id = !empty($_REQUEST['post_id']) ? (integer) $_REQUEST['post_id'] : null; 
    1818$media_id = !empty($_REQUEST['media_id']) ? (integer) $_REQUEST['media_id'] : null; 
     19$link_type = !empty($_REQUEST['link_type']) ? $_REQUEST['link_type'] : null; 
    1920 
    2021if (!$post_id) { 
     
    3031     { 
    3132          $core->media = new dcMedia($core); 
    32           $core->media->addPostMedia($post_id,$media_id); 
     33          $core->media->addPostMedia($post_id,$media_id,$link_type); 
    3334        if (!empty($_SERVER['HTTP_X_REQUESTED_WITH'])) { 
    3435            header('Content-type: application/json'); 
     
    4142 
    4243     $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); 
    4445     if (empty($f)) { 
    4546          $post_id = $media_id = null; 
     
    5657     if (!empty($_POST['remove'])) 
    5758     { 
    58           $core->media->removePostMedia($post_id,$media_id); 
     59          $core->media->removePostMedia($post_id,$media_id,$link_type); 
    5960 
    6061          dcPage::addSuccessNotice(__('Attachment has been successfully removed.')); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map