Plugin Directory

Changeset 2080051


Ignore:
Timestamp:
05/03/2019 04:20:10 PM (7 years ago)
Author:
bnisia
Message:

using local urls for all uploads so that copy doesnt need enabled on urls

Location:
digiwidgets-image-editor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • digiwidgets-image-editor/trunk/digiwidgets-image-editor.php

    r2075589 r2080051  
    44 * Plugin URI:
    55 * Description: DigiWidgets Image Editor allows you to edit images within your posts.  Consider upgrading to the full version to get the full range of features provided by this plugin.
    6  * Version: 1.09
     6 * Version: 1.10
    77 * Author: DigiWidgets Plugin Team
    88 **/
  • digiwidgets-image-editor/trunk/digiwidgets/upload/createNewFromExistingProject.php

    r1372747 r2080051  
    3939    $originalImage = $base_path . $image_extension;
    4040    $i = 1;
    41     while (file_exists($originalImage)) {
    42         $originalImage = urldecode($base_path . "($i)" . $image_extension);
     41    while (file_exists($originalImage)) {               
     42        preg_match('/.*(\/wp\-content\/uploads\/\d+\/\d+\/.*)/', $originalImage, $mat);             
     43        if(count($mat) > 0) $originalImage = ABSPATH . $mat[1];
    4344        $i++;
    4445    }
     
    8182        $i++;
    8283    }
     84    preg_match('/.*(\/wp\-content\/uploads\/\d+\/\d+\/.*)/', $imageURL, $mat);
     85    if(count($mat) > 0) $imageURL = ABSPATH . $mat[1];
    8386    copy($imageURL, $filename);
    8487
Note: See TracChangeset for help on using the changeset viewer.