Show
Ignore:
Timestamp:
07/13/08 05:26:43 (4 months ago)
Author:
rickc
Message:

Plugin: Feedburner. RemoteRequest returns boolean true or an error. Also, loop was stopping after reaching the first error rather than trying the other feeds.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • plugins/feedburner/trunk/feedburner.plugin.php

    r610 r673  
    131131    private function get_stats() 
    132132    { 
    133         $stats= array(); 
     133        $stats = array(); 
    134134        foreach ( self::$feed_groups as $type => $feeds ) { 
    135             $readers= array(); 
    136             $reach= array(); 
    137             $reader_str= "FeedBurner Readers ({$type})"; 
    138             $reach_str= "FeedBurner Reach ({$type})"; 
     135            $readers = array(); 
     136            $reach = array(); 
     137            $reader_str = "FeedBurner Readers ({$type})"; 
     138            $reach_str = "FeedBurner Reach ({$type})"; 
    139139            foreach ( $feeds as $feed ) { 
    140140                if ( $feed_url = Options::get( 'feedburner__' . $feed ) ) { 
    141                     $awareness_api= 'http://api.feedburner.com/awareness/1.0/GetFeedData?uri=' . $feed_url; 
    142                     $request= new RemoteRequest( $awareness_api ); 
    143                     if ( !$request->execute() ) { 
    144                         return; 
    145                     } 
     141                    $awareness_api = 'http://api.feedburner.com/awareness/1.0/GetFeedData?uri=' . $feed_url; 
     142                    $request = new RemoteRequest( $awareness_api ); 
     143                    if ( Error::is_error( $request->execute() ) ) { 
     144                        continue; 
     145                    } 
     146 
    146147                    $xml= simplexml_load_string( $request->get_response_body() ); 
    147148                    if ( $xml['stat'] == 'fail' ) {