Plugin Directory

Changeset 485547


Ignore:
Timestamp:
01/06/2012 09:42:50 AM (14 years ago)
Author:
volmar
Message:

bug fixes, ready for version 1.0.1

Location:
my-record-collection/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • my-record-collection/trunk/js/mrc_scripts.js

    r482765 r485547  
    8080                    values,function(){
    8181                        alert(mrc_loc.saveMsg);
     82                        $('.mrca_wrapper').eq(3).show();
    8283                });
    8384            }
  • my-record-collection/trunk/mrc_import_admin.php

    r482765 r485547  
    125125
    126126function get_file_from_url($src){
    127     // returns file content
    128     return file_get_contents($src);
     127   
     128    $curl = function_exists('curl_version') ? true : false ;
     129    $fgc =  file_get_contents(__FILE__) ? true : false;
     130   
     131    if($curl){
     132        // Download file
     133          $curl = curl_init($src);
     134          curl_setopt($curl, CURLOPT_HEADER, 0);  // ignore any headers
     135          ob_start();  // use output buffering so the contents don't get sent directly to the browser
     136          curl_exec($curl);  // get the file
     137          curl_close($curl);
     138          $file = ob_get_contents();  // save the contents of the file into $file
     139          ob_end_clean();  // turn output buffering back off
     140        return $file;       
     141    }else if($fgc){
     142        // returns file content
     143        return file_get_contents($src);
     144    }
    129145}
    130146
Note: See TracChangeset for help on using the changeset viewer.