Make WordPress Core

Ticket #5037: update_checks.diff

File update_checks.diff, 1.0 KB (added by xknown, 17 years ago)

check if fsockopen has been disabled

  • wp-admin/includes/update.php

     
    4242
    4343function wp_update_plugins() {
    4444        global $wp_version;
     45
     46        if ( !function_exists('fsockopen') )
     47                return ;
     48
    4549        $plugins = get_plugins();
    4650        $active  = get_option( 'active_plugins' );
    4751        $current = get_option( 'update_plugins' );
  • wp-includes/update.php

     
    22
    33// A simple set of functions to check our version 1.0 update service
    44
    5 function wp_version_check() {
    6         if ( strpos($_SERVER['PHP_SELF'], 'install.php') !== false || defined('WP_INSTALLING') )
     5function wp_version_check() {   
     6        if ( !is_admin() || !function_exists('fsockopen') || strpos($_SERVER['PHP_SELF'], 'install.php') !== false || defined('WP_INSTALLING') )
    77                return;
    88
    99        global $wp_version;