Changeset 1386301
- Timestamp:
- 04/04/2016 01:16:12 PM (10 years ago)
- Location:
- ezflippr/trunk
- Files:
-
- 2 edited
-
ezflippr.php (modified) (8 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
ezflippr/trunk/ezflippr.php
r1380937 r1386301 4 4 * Plugin URI: http://www.nuagelab.com/wordpress-plugins/ezflippr 5 5 * Description: Adds rich flipbooks made from PDF through ezFlippr.com 6 * Version: 1.1. 296 * Version: 1.1.30 7 7 * Author: NuageLab <wordpress-plugins@nuagelab.com> 8 8 * Author URI: http://www.nuagelab.com/wordpress-plugins … … 263 263 $message .= 'PHP: '.self::getPHPVersion().PHP_EOL; 264 264 $message .= 'WordPress: '.self::getWordPressVersion().PHP_EOL; 265 $message .= 'Plugin: '. ezFlippr::getVersion().PHP_EOL;265 $message .= 'Plugin: '.self::getVersion().PHP_EOL; 266 266 $message .= 'Access Key: '.ezFlippr::getOption('accesskey').PHP_EOL; 267 267 $message .= 'Locale: '.get_locale().PHP_EOL; … … 410 410 add_action('manage_ezflippr_flipbook_posts_custom_column', array($this,'manage_flipbook_columns'), 10, 2); 411 411 412 // Update every 4 hours413 if (self::getOption('lastupdate')+ 3600 < time()) {412 // Update every half hour 413 if (self::getOption('lastupdate')+1800 < time()) { 414 414 $this->refreshList(false); 415 415 } … … 653 653 public static function supportsCurl() 654 654 { 655 return function_exists('curl_exec') ;655 return function_exists('curl_exec') && (!self::getOption('disable_curl')); 656 656 } 657 657 … … 694 694 curl_setopt($conn, CURLOPT_CONNECTTIMEOUT, 0); 695 695 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().')'); 697 697 if ($params !== null) { 698 698 curl_setopt($conn, CURLOPT_POST, count($params)); 699 699 curl_setopt($conn, CURLOPT_POSTFIELDS, $params); 700 700 } 701 try {701 try { 702 702 $response = curl_exec($conn); 703 703 $error = curl_getinfo($conn, CURLINFO_HTTP_CODE); 704 } catch(Exception $e) {704 } catch(Exception $e) { 705 705 } 706 706 if (curl_errno($conn)) { … … 712 712 $opts = array( 713 713 'http'=>array( 714 'header'=>'User-Agent: ezflippr-wp ('.self::getVersion().' )'."r\n",714 'header'=>'User-Agent: ezflippr-wp ('.self::getVersion().'+'.self::getPHPVersion().')'."r\n", 715 715 ), 716 716 ); 717 if ($params !== null) { 718 $opts['http']['method'] = 'POST'; 719 $opts['http']['content'] = http_build_query($params); 720 } 717 721 $context = stream_context_create($opts); 718 722 $response = file_get_contents($url, false, $context); … … 1048 1052 $opts = array( 1049 1053 'http'=>array( 1050 'header'=>'User-Agent: ezflippr-wp ('.self::getVersion().' )'."\r\n",1054 'header'=>'User-Agent: ezflippr-wp ('.self::getVersion().'+'.self::getPHPVersion().')'."\r\n", 1051 1055 ), 1052 1056 ); … … 1093 1097 curl_setopt($ch, CURLOPT_TIMEOUT, self::API_TIMEOUT); 1094 1098 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().')'); 1096 1100 try{ 1097 1101 curl_exec($ch); -
ezflippr/trunk/readme.txt
r1380937 r1386301 89 89 90 90 == Changelog == 91 = 1.1.30 = 92 * Fixed bug with url_fopen POST parameters. Thanks to Chris Backes for reporting this. 93 91 94 = 1.1.29 = 92 95 * Fixed Javascript bug with jQuery.
Note: See TracChangeset
for help on using the changeset viewer.