Plugin Directory

Changeset 517434


Ignore:
Timestamp:
03/11/2012 05:58:26 AM (14 years ago)
Author:
ihacklog
Message:

fixed the compatibility with Hacklog Remote Attachment plugin

Location:
hacklog-remote-image-autosave/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • hacklog-remote-image-autosave/trunk/hacklog-remote-image-autosave.php

    r517231 r517434  
    22/*
    33Plugin Name: Hacklog Remote Image Autosave
    4 Version: 2.0.4
     4Version: 2.0.5
    55Plugin URI: http://ihacklog.com/?p=5087
    66Description: save remote images in the posts to local server and add it as an attachment to the post.
     
    2525class hacklog_remote_image_autosave
    2626{
    27     const VERSION = 'Hacklog Remote Image Autosave 2.0.4';
     27    const VERSION = 'Hacklog Remote Image Autosave 2.0.5';
    2828    const textdomain = 'hacklog_remote_image_autosave';
    2929    const opt = 'hacklog_ria_auto_down';
  • hacklog-remote-image-autosave/trunk/util.class.php

    r517231 r517434  
    375375       
    376376        // Compatible with Hacklog Remote Attachment plugin
    377         if (class_exists ( 'hacklogra' )) {
    378             $url = hacklogra::replace_attachurl( $url );
     377        if (class_exists ( 'hacklogra' ))
     378        {
     379            //apply_filters( 'wp_handle_upload', array( 'file' => $new_file, 'url' => $url, 'type' => $type ), 'upload' );
     380            $hacklogra_file = hacklogra::upload_and_send( array('file'=>$new_file,'url'=>$url) );
     381            $url = $hacklogra_file['url'];
     382            $new_file = $hacklogra_file['file'];
    379383        }
    380384       
     
    382386            delete_transient ( 'dirsize_cache' );
    383387           
    384             // array( 'file' => $new_file, 'url' => $url, 'type' => $type );
     388        // array( 'file' => $new_file, 'url' => $url, 'type' => $type );
    385389        $name_parts = pathinfo ( $filename );
    386390        $name = trim ( substr ( $filename, 0, - (1 + strlen ( $name_parts ['extension'] )) ) );
Note: See TracChangeset for help on using the changeset viewer.