Plugin Directory

Changeset 1119628


Ignore:
Timestamp:
03/24/2015 12:59:09 PM (11 years ago)
Author:
ojredmond
Message:

minor bug fixes & tagging of 2.09

Location:
advanced-uploader
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • advanced-uploader/tags/2.09/readme.txt

    r1049113 r1119628  
    5252
    5353== Changelog ==
     54= 2.09 =
     55* fixed target path to make sure it always ends with a directory separator.
    5456= 2.08 =
    5557* fixed commit missing new file
     
    110112
    111113== Upgrade Notice ==
     114= 2.09 = minor bugfixes
    112115= 2.08 = fixed commit missing new file
    113116= 2.07 = update pdf.js
  • advanced-uploader/tags/2.09/upload.php

    r1042809 r1119628  
    360360        $upload_dir = wp_upload_dir();
    361361        $wp_filetype = wp_check_filetype($name);
     362
     363        //make sure target_path has a DIRECTORY_SEPARATOR at the end
     364        if(substr($target_path,-1)!=DIRECTORY_SEPARATOR)
     365            $target_path .= DIRECTORY_SEPARATOR;
    362366       
    363367        //set parent ID to add picture to BWS gallery
     
    365369            $parent_id = $galleryID;
    366370       
     371        //change target path to url
     372        $guid = str_replace ( $upload_dir['basedir'], $upload_dir ['baseurl'], $target_path );
     373        $guid = str_replace ( "\\", "/", $guid );
     374       
    367375        $attachment = array(
    368              'guid' => $upload_dir ['url'] . '/' . $name,
     376             'guid' => $guid . $name,
    369377             'post_mime_type' => $wp_filetype['type'],
    370378             'post_title' => preg_replace('/\.[^.]+$/', '', $name),
  • advanced-uploader/trunk/readme.txt

    r1049113 r1119628  
    5252
    5353== Changelog ==
     54= 2.09 =
     55* fixed target path to make sure it always ends with a directory separator.
    5456= 2.08 =
    5557* fixed commit missing new file
     
    110112
    111113== Upgrade Notice ==
     114= 2.09 = minor bugfixes
    112115= 2.08 = fixed commit missing new file
    113116= 2.07 = update pdf.js
  • advanced-uploader/trunk/upload.php

    r1042809 r1119628  
    360360        $upload_dir = wp_upload_dir();
    361361        $wp_filetype = wp_check_filetype($name);
     362
     363        //make sure target_path has a DIRECTORY_SEPARATOR at the end
     364        if(substr($target_path,-1)!=DIRECTORY_SEPARATOR)
     365            $target_path .= DIRECTORY_SEPARATOR;
    362366       
    363367        //set parent ID to add picture to BWS gallery
     
    365369            $parent_id = $galleryID;
    366370       
     371        //change target path to url
     372        $guid = str_replace ( $upload_dir['basedir'], $upload_dir ['baseurl'], $target_path );
     373        $guid = str_replace ( "\\", "/", $guid );
     374       
    367375        $attachment = array(
    368              'guid' => $upload_dir ['url'] . '/' . $name,
     376             'guid' => $guid . $name,
    369377             'post_mime_type' => $wp_filetype['type'],
    370378             'post_title' => preg_replace('/\.[^.]+$/', '', $name),
Note: See TracChangeset for help on using the changeset viewer.