Changeset 1306

Show
Ignore:
Timestamp:
05/22/08 16:01:30 (5 months ago)
Author:
donncha
Message:

Use snoopy all the time, avoids problems with fopen()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/wpmu-upgrade-site.php

    r1289 r1306  
    11<?php 
    22require_once('admin.php'); 
    3  
    4 $http_fopen = ini_get("allow_url_fopen"); 
    5 if( !$http_fopen ) { 
    6         require_once('../wp-includes/class-snoopy.php'); 
    7 
     3require_once( ABSPATH . 'wp-includes/class-snoopy.php' ); 
    84 
    95$title = __('WordPress MU &rsaquo; Admin &rsaquo; Upgrade Site'); 
     
    2824                                        $siteurl = $wpdb->get_var("SELECT option_value from {$wpdb->base_prefix}{$details['blog_id']}_options WHERE option_name = 'siteurl'"); 
    2925                                        echo "<li>$siteurl</li>"; 
    30                                         if( $http_fopen ) { 
    31                                                 $fp = fopen( $siteurl . "wp-admin/upgrade.php?step=1", "r" ); 
    32                                                 if( $fp ) { 
    33                                                         while( feof( $fp ) == false ) { 
    34                                                                 fgets($fp, 4096); 
    35                                                         } 
    36                                                         fclose( $fp ); 
    37                                                 } 
    38                                         } else { 
    39                                                 $client = new Snoopy(); 
    40                                                 @$client->fetch($siteurl . "wp-admin/upgrade.php?step=1"); 
    41                                         } 
     26                                        $client = new Snoopy(); 
     27                                        @$client->fetch($siteurl . "wp-admin/upgrade.php?step=1"); 
    4228                                } 
    4329                        }