Ignore:
Timestamp:
Dec 24, 2013, 6:23:13 PM (10 years ago)
Author:
mistic100
Message:

update for piwigo 2.6

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/flickr2piwigo/include/functions.inc.php

    r21288 r26180  
    11<?php
    2 if (!defined('FLICKR_PATH')) die('Hacking attempt!');
     2defined('FLICKR_PATH') or die('Hacking attempt!');
    33
    44/**
     
    3030      return false;
    3131    }
    32    
     32
    3333    $return = ($dest === true) ? true : false;
    34    
     34
    3535    /* curl */
    3636    if (function_exists('curl_init'))
     
    4141      }
    4242      $ch = curl_init();
    43      
     43
    4444      curl_setopt($ch, CURLOPT_URL, $src);
    4545      curl_setopt($ch, CURLOPT_HEADER, false);
     
    6565        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    6666      }
    67      
     67
    6868      $out = curl_exec($ch);
    6969      curl_close($ch);
    70      
     70
    7171      if ($out === false)
    7272      {
     
    9090        return false;
    9191      }
    92      
     92
    9393      $opts = array(
    9494        'http' => array(
     
    100100
    101101      $context = stream_context_create($opts);
    102      
     102
    103103      if (($file = file_get_contents($src, false, $context)) === false)
    104104      {
    105105        return 'file_error';
    106106      }
    107      
     107
    108108      if (!$return)
    109109      {
     
    116116      }
    117117    }
    118    
     118
    119119    return false;
    120120  }
    121121}
    122 
    123 ?>
Note: See TracChangeset for help on using the changeset viewer.