WordPress.org

Plugin Directory

Changeset 593720


Ignore:
Timestamp:
09/02/12 17:32:53 (20 months ago)
Author:
SteveAtty
Message:

Version 2.1.16 - Curl IPv6 fixes

Location:
wordbooker
Files:
5 edited
17 copied

Legend:

Unmodified
Added
Removed
  • wordbooker/tags/2.1.15/includes/wordbooker_facebook_curl.php

    r590242 r593720  
    129129    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    130130    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    131     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     131    @curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    132132        $response = curl_exec($ch); 
    133133    $err_no=curl_errno($ch); 
     
    150150    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    151151    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    152     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     152    @curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    153153        $response = curl_exec($ch); 
    154154    $err_no=curl_errno($ch); 
     
    172172    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    173173    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    174     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     174    @curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    175175     curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
    176176        $response = curl_exec($ch); 
  • wordbooker/tags/2.1.16/includes/wordbooker_facebook_curl.php

    r590242 r593720  
    129129    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    130130    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    131     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     131    @curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    132132        $response = curl_exec($ch); 
    133133    $err_no=curl_errno($ch); 
     
    150150    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    151151    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    152     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     152    @curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    153153        $response = curl_exec($ch); 
    154154    $err_no=curl_errno($ch); 
     
    172172    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    173173    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    174     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     174    @curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    175175     curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
    176176        $response = curl_exec($ch); 
  • wordbooker/tags/2.1.16/includes/wordbooker_options.php

    r590242 r593720  
    542542        echo '<label for="fb_comment_count">'.__("Number of comments to display", 'wordbooker'). ' :</label>'; 
    543543        if (strlen($wordbooker_settings["fb_comment_box_count"])<1) {$wordbooker_settings["fb_comment_box_count"]=20;} 
    544         if ($wordbooker_settings["fb_comment_box_count"]<2) {$wordbooker_settings["fb_comment_box_count"]=2;} 
     544        if ($wordbooker_settings["fb_comment_box_count"]<0) {$wordbooker_settings["fb_comment_box_count"]=0;} 
    545545        echo' <INPUT NAME="wordbooker_settings[fb_comment_box_count]" size=3 maxlength=3 value="'.stripslashes($wordbooker_settings["fb_comment_box_count"]).'"> <br />'; 
    546546 
     
    617617        echo '<label for="wb_disable">'.__("Disable ALL Wordbooker functionality", 'wordbooker'). ' : </label>'; 
    618618        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_disabled]" '.$checked_flag[$wordbooker_settings["wordbooker_disabled"]].' /></P>'; 
     619        if (WORDBOOKER_IPV=='6'){ 
     620          echo '<label for="wordbooker_use_curl_4">'.__("Force Curl IP Resolution to IPv4", 'wordbooker'). ' : </label>'; 
     621          echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_use_curl_4]" '.$checked_flag[$wordbooker_settings["wordbooker_use_curl_4"]].' ></P><p>'; 
     622          } 
    619623 
    620624        echo '<input type="hidden" name="wordbooker_settings[wordbooker_page_post]" value="-100" />'; 
  • wordbooker/tags/2.1.16/readme.txt

    r590242 r593720  
    66Requires at least: 2.9 
    77Tested up to: 3.4.1 
    8 Stable tag: 2.1.15 
     8Stable tag: 2.1.16 
    99 
    1010This plugin allows you to cross-post your blog posts to your Facebook Wall and to any Facebook Fan Page / Group that you are an administrator for.  
     
    115115 
    116116== Changelog == 
     117 
     118= Version 2.1.16  02/09/2012 = 
     119- Changes to the IPv6 options to curl - option is disabled unless IPv6 available in curl 
     120- Added IPv6 Fail back to IPv4 for DNS resolution in Advanced Options section 
     121- Replaced two backticks with quotes to fix problems with Use Site URL not Blog Description in Wall Posts 
     122- Changed minimum number of FB comments from 2 to 0. 
    117123 
    118124= Version 2.1.15 25/08/2012 = 
     
    370376== Upgrade Notice == 
    371377 
    372 = 2.1.15 = 
    373 Adds some extra Curl diagnostics and also fixes a problem with Curl running in combined IP6 and IP4 environments. Plus fixed up some other minor bugs. 
     378= 2.1.16 = 
     379Adds code to supress warnings related to curl options plus a couple of other minor bugs. 
  • wordbooker/tags/2.1.16/wordbooker.php

    r590242 r593720  
    66Author: Steve Atty  
    77Author URI: http://wordbooker.tty.org.uk 
    8 Version: 2.1.15 
     8Version: 2.1.16 
    99*/ 
    1010 
     
    3939define('WORDBOOKER_DEBUG', false); 
    4040define('WORDBOOKER_TESTING', false); 
    41 define('WORDBOOKER_CODE_RELEASE',"2.1.15 R00 - A Decent Cup of Tea"); 
     41define('WORDBOOKER_CODE_RELEASE',"2.1.16 R00 - Machine Beside Machine"); 
    4242 
    4343# For Troubleshooting  
     
    108108} else { 
    109109    define('WORDBOOKER_SIMPLEXML', 'is missing - this is a problem'); 
     110} 
     111$curlv2=curl_version(); 
     112$bitfields = Array('CURL_VERSION_IPV6'); 
     113foreach($bitfields as $feature) 
     114{ 
     115  if ($curlv2['features'] & constant($feature)) {define('WORDBOOKER_IPV', '6');} else { define('WORDBOOKER_IPV', '4');} 
    110116} 
    111117 
     
    12781284       curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/includes/fb_ca_chain_bundle.crt'); 
    12791285       curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0'); 
     1286       if (WORDBOOKER_IPV==6 && isset($wordbooker_settings['wordbooker_use_curl_4'])) { 
    12801287       curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     1288       } 
    12811289       $mtime = microtime();  
    12821290       $mtime = explode(' ', $mtime);  
     
    16371645    if (isset($wordbooker_settings['wordbooker_use_url_not_slug'])) 
    16381646    { 
    1639         $wordbooker_fb_post['caption'] = get_bloginfo(‘url’); 
     1647        $wordbooker_fb_post['caption'] = get_bloginfo('url'); 
    16401648    } 
    16411649    $wordbooker_fb_post['caption']=wordwrap($wordbooker_fb_post['caption'],900); 
  • wordbooker/trunk/includes/wordbooker_facebook_curl.php

    r590242 r593720  
    129129    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    130130    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    131     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     131    @curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    132132        $response = curl_exec($ch); 
    133133    $err_no=curl_errno($ch); 
     
    150150    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    151151    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    152     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     152    @curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    153153        $response = curl_exec($ch); 
    154154    $err_no=curl_errno($ch); 
     
    172172    curl_setopt($ch, CURLOPT_TIMEOUT, 60); 
    173173    curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/fb_ca_chain_bundle.crt'); 
    174     curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     174    @curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
    175175     curl_setopt($ch, CURLOPT_POSTFIELDS, $data); 
    176176        $response = curl_exec($ch); 
  • wordbooker/trunk/includes/wordbooker_options.php

    r590242 r593720  
    542542        echo '<label for="fb_comment_count">'.__("Number of comments to display", 'wordbooker'). ' :</label>'; 
    543543        if (strlen($wordbooker_settings["fb_comment_box_count"])<1) {$wordbooker_settings["fb_comment_box_count"]=20;} 
    544         if ($wordbooker_settings["fb_comment_box_count"]<2) {$wordbooker_settings["fb_comment_box_count"]=2;} 
     544        if ($wordbooker_settings["fb_comment_box_count"]<0) {$wordbooker_settings["fb_comment_box_count"]=0;} 
    545545        echo' <INPUT NAME="wordbooker_settings[fb_comment_box_count]" size=3 maxlength=3 value="'.stripslashes($wordbooker_settings["fb_comment_box_count"]).'"> <br />'; 
    546546 
     
    617617        echo '<label for="wb_disable">'.__("Disable ALL Wordbooker functionality", 'wordbooker'). ' : </label>'; 
    618618        echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_disabled]" '.$checked_flag[$wordbooker_settings["wordbooker_disabled"]].' /></P>'; 
     619        if (WORDBOOKER_IPV=='6'){ 
     620          echo '<label for="wordbooker_use_curl_4">'.__("Force Curl IP Resolution to IPv4", 'wordbooker'). ' : </label>'; 
     621          echo '<INPUT TYPE=CHECKBOX NAME="wordbooker_settings[wordbooker_use_curl_4]" '.$checked_flag[$wordbooker_settings["wordbooker_use_curl_4"]].' ></P><p>'; 
     622          } 
    619623 
    620624        echo '<input type="hidden" name="wordbooker_settings[wordbooker_page_post]" value="-100" />'; 
  • wordbooker/trunk/readme.txt

    r590242 r593720  
    66Requires at least: 2.9 
    77Tested up to: 3.4.1 
    8 Stable tag: 2.1.15 
     8Stable tag: 2.1.16 
    99 
    1010This plugin allows you to cross-post your blog posts to your Facebook Wall and to any Facebook Fan Page / Group that you are an administrator for.  
     
    115115 
    116116== Changelog == 
     117 
     118= Version 2.1.16  02/09/2012 = 
     119- Changes to the IPv6 options to curl - option is disabled unless IPv6 available in curl 
     120- Added IPv6 Fail back to IPv4 for DNS resolution in Advanced Options section 
     121- Replaced two backticks with quotes to fix problems with Use Site URL not Blog Description in Wall Posts 
     122- Changed minimum number of FB comments from 2 to 0. 
    117123 
    118124= Version 2.1.15 25/08/2012 = 
     
    370376== Upgrade Notice == 
    371377 
    372 = 2.1.15 = 
    373 Adds some extra Curl diagnostics and also fixes a problem with Curl running in combined IP6 and IP4 environments. Plus fixed up some other minor bugs. 
     378= 2.1.16 = 
     379Adds code to supress warnings related to curl options plus a couple of other minor bugs. 
  • wordbooker/trunk/wordbooker.php

    r590242 r593720  
    66Author: Steve Atty  
    77Author URI: http://wordbooker.tty.org.uk 
    8 Version: 2.1.15 
     8Version: 2.1.16 
    99*/ 
    1010 
     
    3939define('WORDBOOKER_DEBUG', false); 
    4040define('WORDBOOKER_TESTING', false); 
    41 define('WORDBOOKER_CODE_RELEASE',"2.1.15 R00 - A Decent Cup of Tea"); 
     41define('WORDBOOKER_CODE_RELEASE',"2.1.16 R00 - Machine Beside Machine"); 
    4242 
    4343# For Troubleshooting  
     
    108108} else { 
    109109    define('WORDBOOKER_SIMPLEXML', 'is missing - this is a problem'); 
     110} 
     111$curlv2=curl_version(); 
     112$bitfields = Array('CURL_VERSION_IPV6'); 
     113foreach($bitfields as $feature) 
     114{ 
     115  if ($curlv2['features'] & constant($feature)) {define('WORDBOOKER_IPV', '6');} else { define('WORDBOOKER_IPV', '4');} 
    110116} 
    111117 
     
    12781284       curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/includes/fb_ca_chain_bundle.crt'); 
    12791285       curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0'); 
     1286       if (WORDBOOKER_IPV==6 && isset($wordbooker_settings['wordbooker_use_curl_4'])) { 
    12801287       curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 ); 
     1288       } 
    12811289       $mtime = microtime();  
    12821290       $mtime = explode(' ', $mtime);  
     
    16371645    if (isset($wordbooker_settings['wordbooker_use_url_not_slug'])) 
    16381646    { 
    1639         $wordbooker_fb_post['caption'] = get_bloginfo(‘url’); 
     1647        $wordbooker_fb_post['caption'] = get_bloginfo('url'); 
    16401648    } 
    16411649    $wordbooker_fb_post['caption']=wordwrap($wordbooker_fb_post['caption'],900); 
Note: See TracChangeset for help on using the changeset viewer.