Plugin Directory

Changeset 1386301


Ignore:
Timestamp:
04/04/2016 01:16:12 PM (10 years ago)
Author:
nuagelab
Message:

Version 1.1.30:

  • Fixed bug with url_fopen POST parameters. Thanks to Chris Backes for reporting this.
Location:
ezflippr/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ezflippr/trunk/ezflippr.php

    r1380937 r1386301  
    44* Plugin URI: http://www.nuagelab.com/wordpress-plugins/ezflippr
    55* Description: Adds rich flipbooks made from PDF through ezFlippr.com
    6 * Version: 1.1.29
     6* Version: 1.1.30
    77* Author: NuageLab <wordpress-plugins@nuagelab.com>
    88* Author URI: http://www.nuagelab.com/wordpress-plugins
     
    263263                    $message .= 'PHP: '.self::getPHPVersion().PHP_EOL;
    264264                    $message .= 'WordPress: '.self::getWordPressVersion().PHP_EOL;
    265                     $message .= 'Plugin: '.ezFlippr::getVersion().PHP_EOL;
     265                    $message .= 'Plugin: '.self::getVersion().PHP_EOL;
    266266                    $message .= 'Access Key: '.ezFlippr::getOption('accesskey').PHP_EOL;
    267267                    $message .= 'Locale: '.get_locale().PHP_EOL;
     
    410410            add_action('manage_ezflippr_flipbook_posts_custom_column', array($this,'manage_flipbook_columns'), 10, 2);
    411411
    412             // Update every 4 hours
    413             if (self::getOption('lastupdate')+3600 < time()) {
     412            // Update every half hour
     413            if (self::getOption('lastupdate')+1800 < time()) {
    414414                $this->refreshList(false);
    415415            }
     
    653653    public static function supportsCurl()
    654654    {
    655         return function_exists('curl_exec');
     655        return function_exists('curl_exec') && (!self::getOption('disable_curl'));
    656656    }
    657657
     
    694694            curl_setopt($conn, CURLOPT_CONNECTTIMEOUT, 0);
    695695            curl_setopt($conn, CURLOPT_TIMEOUT, self::API_TIMEOUT);
    696             curl_setopt($conn, CURLOPT_USERAGENT, 'ezflippr-wp ('.self::getVersion().')');
     696            curl_setopt($conn, CURLOPT_USERAGENT, 'ezflippr-wp ('.self::getVersion().'+'.self::getPHPVersion().')');
    697697            if ($params !== null) {
    698698                curl_setopt($conn, CURLOPT_POST, count($params));
    699699                curl_setopt($conn, CURLOPT_POSTFIELDS, $params);
    700700            }
    701             try{
     701            try {
    702702                $response = curl_exec($conn);
    703703                $error = curl_getinfo($conn, CURLINFO_HTTP_CODE);
    704             }catch(Exception $e) {
     704            } catch(Exception $e) {
    705705            }
    706706            if (curl_errno($conn)) {
     
    712712            $opts = array(
    713713                'http'=>array(
    714                     'header'=>'User-Agent: ezflippr-wp ('.self::getVersion().')'."r\n",
     714                    'header'=>'User-Agent: ezflippr-wp ('.self::getVersion().'+'.self::getPHPVersion().')'."r\n",
    715715                ),
    716716            );
     717            if ($params !== null) {
     718                $opts['http']['method'] = 'POST';
     719                $opts['http']['content'] = http_build_query($params);
     720            }
    717721            $context = stream_context_create($opts);
    718722            $response = file_get_contents($url, false, $context);
     
    10481052                    $opts = array(
    10491053                        'http'=>array(
    1050                             'header'=>'User-Agent: ezflippr-wp ('.self::getVersion().')'."\r\n",
     1054                            'header'=>'User-Agent: ezflippr-wp ('.self::getVersion().'+'.self::getPHPVersion().')'."\r\n",
    10511055                        ),
    10521056                    );
     
    10931097                            curl_setopt($ch, CURLOPT_TIMEOUT, self::API_TIMEOUT);
    10941098                            curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
    1095                             curl_setopt($ch, CURLOPT_USERAGENT, 'ezflippr-wp ('.self::getVersion().')');
     1099                            curl_setopt($ch, CURLOPT_USERAGENT, 'ezflippr-wp ('.self::getVersion().'+'.self::getPHPVersion().')');
    10961100                            try{
    10971101                                curl_exec($ch);
  • ezflippr/trunk/readme.txt

    r1380937 r1386301  
    8989
    9090== Changelog ==
     91= 1.1.30 =
     92* Fixed bug with url_fopen POST parameters. Thanks to Chris Backes for reporting this.
     93
    9194= 1.1.29 =
    9295* Fixed Javascript bug with jQuery.
Note: See TracChangeset for help on using the changeset viewer.