Plugin Directory

Changeset 1509000


Ignore:
Timestamp:
10/05/2016 09:46:07 PM (9 years ago)
Author:
newsplugin.com
Message:

Few changes around curl to match WordPress/Requests behaviour ...

Location:
newsplugin
Files:
3 edited
4 copied

Legend:

Unmodified
Added
Removed
  • newsplugin/tags/1.0.7/news-plugin-utils.php

    r1508894 r1509000  
    3737    static function http_remote_get_curl($url) {
    3838        if(!function_exists('curl_version')) {
    39             return(array('', 'Error: CURL disabled'));
     39            return(array('', 'Error: CURL disabled or not installed'));
     40        }
     41        if (!function_exists('curl_init') || !function_exists('curl_exec')) {
     42            return(array('', 'Error: CURL disabled by security settings'));
    4043        }
    4144        $ch = curl_init($url);
     
    176179    static function get_system_info() {
    177180        $my_theme = wp_get_theme();
    178         $curl_ver = curl_version();
    179181        $curl_test = self::http_remote_get_curl_test();
    180182        $socket_test = self::http_remote_get_socket_test();
     
    182184        $socket_ping = self::http_remote_get_socket_ping();
    183185        $user_info = self::get_user_info();
     186
     187        if(function_exists('curl_version')) {
     188          $curl_ver = curl_version();
     189          $curl_status = 'Enabled';
     190          if (!function_exists('curl_init') || !function_exists('curl_exec')) {
     191            $curl_status = 'Disabled by security settings';
     192          }
     193        } else {
     194          $curl_status = 'Disabled';
     195        }
    184196
    185197        $system_info = array(
     
    209221                'mysql_client_info'     => mysql_get_client_info(),
    210222                'mysql_proto_info'      => mysql_get_proto_info(),
    211                 'is_Curl'               => function_exists('curl_version') ? 'Enabled' : 'Disabled',
     223                'is_Curl'               => $curl_status,
    212224                'curl_version'          => $curl_ver['version'],
    213225                'curl_ssl'              => $curl_ver['ssl_version'],
  • newsplugin/tags/1.0.7/news-plugin.php

    r1508894 r1509000  
    55Description: Create custom newsfeeds for your website. Choose keywords, number of articles and other settings, put the feed wherever you want using widgets or shortcodes, and watch the fresh relevant news headlines appear on your pages (or approve and publish them manually). You can always shape the news right from your website, remove unwanted articles or star the good ones. Thanks for using the NewsPlugin, and we hope you like it.
    66Author: newsplugin.com
    7 Version: 1.0.6
     7Version: 1.0.7
    88Author URI: http://newsplugin.com/
    99*/
  • newsplugin/tags/1.0.7/readme.txt

    r1508895 r1509000  
    33Tags: news, news plugin, news feed, news feeds, newsfeed, newsfeeds, news syndication, shortcode, shortcodes, widget, widgets, widget area, widget areas
    44Requires at least: 3.9
    5 Tested up to: 4.5.3
    6 Stable tag: 1.0.6
     5Tested up to: 4.6.1
     6Stable tag: 1.0.7
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7373== Changelog ==
    7474
     75= 1.0.7 =
     76Release Date: October 5, 2016
     77* Minor improvements related to Wordpress version 4.6
     78
    7579= 1.0.6 =
    7680Release Date: October 5, 2016
  • newsplugin/trunk/news-plugin-utils.php

    r1508894 r1509000  
    3737    static function http_remote_get_curl($url) {
    3838        if(!function_exists('curl_version')) {
    39             return(array('', 'Error: CURL disabled'));
     39            return(array('', 'Error: CURL disabled or not installed'));
     40        }
     41        if (!function_exists('curl_init') || !function_exists('curl_exec')) {
     42            return(array('', 'Error: CURL disabled by security settings'));
    4043        }
    4144        $ch = curl_init($url);
     
    176179    static function get_system_info() {
    177180        $my_theme = wp_get_theme();
    178         $curl_ver = curl_version();
    179181        $curl_test = self::http_remote_get_curl_test();
    180182        $socket_test = self::http_remote_get_socket_test();
     
    182184        $socket_ping = self::http_remote_get_socket_ping();
    183185        $user_info = self::get_user_info();
     186
     187        if(function_exists('curl_version')) {
     188          $curl_ver = curl_version();
     189          $curl_status = 'Enabled';
     190          if (!function_exists('curl_init') || !function_exists('curl_exec')) {
     191            $curl_status = 'Disabled by security settings';
     192          }
     193        } else {
     194          $curl_status = 'Disabled';
     195        }
    184196
    185197        $system_info = array(
     
    209221                'mysql_client_info'     => mysql_get_client_info(),
    210222                'mysql_proto_info'      => mysql_get_proto_info(),
    211                 'is_Curl'               => function_exists('curl_version') ? 'Enabled' : 'Disabled',
     223                'is_Curl'               => $curl_status,
    212224                'curl_version'          => $curl_ver['version'],
    213225                'curl_ssl'              => $curl_ver['ssl_version'],
  • newsplugin/trunk/news-plugin.php

    r1508894 r1509000  
    55Description: Create custom newsfeeds for your website. Choose keywords, number of articles and other settings, put the feed wherever you want using widgets or shortcodes, and watch the fresh relevant news headlines appear on your pages (or approve and publish them manually). You can always shape the news right from your website, remove unwanted articles or star the good ones. Thanks for using the NewsPlugin, and we hope you like it.
    66Author: newsplugin.com
    7 Version: 1.0.6
     7Version: 1.0.7
    88Author URI: http://newsplugin.com/
    99*/
  • newsplugin/trunk/readme.txt

    r1508895 r1509000  
    33Tags: news, news plugin, news feed, news feeds, newsfeed, newsfeeds, news syndication, shortcode, shortcodes, widget, widgets, widget area, widget areas
    44Requires at least: 3.9
    5 Tested up to: 4.5.3
    6 Stable tag: 1.0.6
     5Tested up to: 4.6.1
     6Stable tag: 1.0.7
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7373== Changelog ==
    7474
     75= 1.0.7 =
     76Release Date: October 5, 2016
     77* Minor improvements related to Wordpress version 4.6
     78
    7579= 1.0.6 =
    7680Release Date: October 5, 2016
Note: See TracChangeset for help on using the changeset viewer.