Changeset 2538

Show
Ignore:
Timestamp:
06/16/08 14:30:25 (2 months ago)
Author:
www-ttrss
Message:

[project @ bump simplepie to 1.1.1]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • simplepie/simplepie.inc

    r2260 r2538  
    66 * Takes the hard work out of managing a complete RSS/Atom solution. 
    77 * 
    8  * Copyright (c) 2004-2007, Ryan Parman and Geoffrey Sneddon 
     8 * Copyright (c) 2004-2008, Ryan Parman and Geoffrey Sneddon 
    99 * All rights reserved. 
    1010 * 
     
    3434 * 
    3535 * @package SimplePie 
    36  * @version 1.1 
    37  * @copyright 2004-2007 Ryan Parman, Geoffrey Sneddon 
     36 * @version 1.1.1 
     37 * @copyright 2004-2008 Ryan Parman, Geoffrey Sneddon 
    3838 * @author Ryan Parman 
    3939 * @author Geoffrey Sneddon 
     
    5252 * SimplePie Version 
    5353 */ 
    54 define('SIMPLEPIE_VERSION', '1.1'); 
     54define('SIMPLEPIE_VERSION', '1.1.1'); 
    5555 
    5656/** 
    5757 * SimplePie Build 
     58 * @todo Hardcode for release (there's no need to have to call SimplePie_Misc::parse_date() only every load of simplepie.inc) 
    5859 */ 
    59 define('SIMPLEPIE_BUILD', 20080102221556); 
     60define('SIMPLEPIE_BUILD', 20080315205903); 
     61//define('SIMPLEPIE_BUILD', gmdate('YmdHis', SimplePie_Misc::parse_date(substr('$Date: 2008-03-15 15:28:23 -0700 (Sat, 15 Mar 2008) $', 7, 25)) ? SimplePie_Misc::parse_date(substr('$Date: 2008-03-15 15:28:23 -0700 (Sat, 15 Mar 2008) $', 7, 25)) : filemtime(__FILE__))); 
    6062 
    6163/** 
     
    311313 */ 
    312314define('SIMPLEPIE_NAMESPACE_MEDIARSS', 'http://search.yahoo.com/mrss/'); 
     315 
     316/** 
     317 * Wrong Media RSS Namespace 
     318 */ 
     319define('SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG', 'http://search.yahoo.com/mrss'); 
    313320 
    314321/** 
     
    836843        function set_raw_data($data) 
    837844        { 
    838                 $this->raw_data = trim($data)
     845                $this->raw_data = $data
    839846        } 
    840847 
     
    43274334                        unset($parent); 
    43284335 
     4336                        // Attributes 
     4337                        $bitrate = null; 
     4338                        $channels = null; 
     4339                        $duration = null; 
     4340                        $expression = null; 
     4341                        $framerate = null; 
     4342                        $height = null; 
     4343                        $javascript = null; 
     4344                        $lang = null; 
     4345                        $length = null; 
     4346                        $medium = null; 
     4347                        $samplingrate = null; 
     4348                        $type = null; 
     4349                        $url = null; 
     4350                        $width = null; 
     4351 
     4352                        // Elements 
     4353                        $captions = null; 
     4354                        $categories = null; 
     4355                        $copyrights = null; 
     4356                        $credits = null; 
     4357                        $description = null; 
     4358                        $hashes = null; 
     4359                        $keywords = null; 
     4360                        $player = null; 
     4361                        $ratings = null; 
     4362                        $restrictions = null; 
     4363                        $thumbnails = null; 
     4364                        $title = null; 
     4365 
    43294366                        // If we have media:group tags, loop through them. 
    43304367                        foreach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'group') as $group) 
     
    54585495                        } 
    54595496 
    5460                         if (sizeof($this->data['enclosures']) == 0
     5497                        if (sizeof($this->data['enclosures']) == 0 && ($url || $type || $length || $bitrate || $captions_parent || $categories_parent || $channels || $copyrights_parent || $credits_parent || $description_parent || $duration_parent || $expression || $framerate || $hashes_parent || $height || $keywords_parent || $lang || $medium || $player_parent || $ratings_parent || $restrictions_parent || $samplingrate || $thumbnails_parent || $title_parent || $width)
    54615498                        { 
    54625499                                // Since we don't have group or content for these, we'll just pass the '*_parent' variables directly to the constructor 
     
    55335570         * @return mixed URL if feed exists, false otherwise 
    55345571         */ 
    5535         function add_to_service($item_url, $title_url = null
     5572        function add_to_service($item_url, $title_url = null, $summary_url = null
    55365573        { 
    55375574                if ($this->get_permalink() !== null) 
     
    55425579                                $return .= $this->sanitize($title_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->get_title()); 
    55435580                        } 
     5581                        if ($summary_url !== null && $this->get_description() !== null) 
     5582                        { 
     5583                                $return .= $this->sanitize($summary_url, SIMPLEPIE_CONSTRUCT_IRI) . rawurlencode($this->get_description()); 
     5584                        } 
    55445585                        return $return; 
    55455586                } 
     
    55675608        function add_to_digg() 
    55685609        { 
    5569                 return $this->add_to_service('http://digg.com/submit?phase=2&URL='); 
     5610                return $this->add_to_service('http://digg.com/submit?url=', '&title=', '&bodytext='); 
    55705611        } 
    55715612 
     
    75837624                                        curl_setopt($fp, CURLOPT_MAXREDIRS, $redirects); 
    75847625                                } 
    7585                                  
     7626 
     7627                                /* Enable Digest authentication and SSL -fox */ 
    75867628                                curl_setopt($fp, CURLOPT_SSL_VERIFYPEER, false);  
    75877629                                curl_setopt($fp, CURLOPT_HTTPAUTH, CURLAUTH_ANY); 
     
    76167658                                                        return $this->SimplePie_File($location, $timeout, $redirects, $headers, $useragent, $force_fsockopen); 
    76177659                                                } 
    7618                                         } 
    7619                                         // No feed fount at error correction. 
    7620                                         // according to http://simplepie.org/support/viewtopic.php?id=1430 
    7621                                         else { 
    7622                                                 $this->success = false; 
    76237660                                        } 
    76247661                                } 
     
    78547891                } 
    78557892                $this->data = ''; 
    7856                 if ($this->state === 'emit'
     7893                if ($this->state === 'emit' || $this->state === 'body'
    78577894                { 
    78587895                        return true; 
     
    1241612453                $this->timeout = $timeout; 
    1241712454                $this->max_checked_feeds = $max_checked_feeds; 
    12418                 $this->content_type_sniffer_class
     12455                $this->content_type_sniffer_class = $content_type_sniffer_class
    1241912456        } 
    1242012457 
     
    1290912946                                        $namespace = SIMPLEPIE_NAMESPACE_ITUNES; 
    1291012947                                } 
     12948 
     12949                                // Normalize the Media RSS namespaces 
     12950                                if ($namespace === SIMPLEPIE_NAMESPACE_MEDIARSS_WRONG) 
     12951                                { 
     12952                                        $namespace = SIMPLEPIE_NAMESPACE_MEDIARSS; 
     12953                                } 
    1291112954                                $cache[$string] = array($namespace, $local_name); 
    1291212955                        } 
     
    1292112964 
    1292212965/** 
    12923  * @todo Move to using an actual HTML parser (this will allow tags to be properly stripped, and to switch between HTML and XHTML), this will also make it easier to shortern a string while preserving HTML tags 
     12966 * @todo Move to using an actual HTML parser (this will allow tags to be properly stripped, and to switch between HTML and XHTML), this will also make it easier to shorten a string while preserving HTML tags 
    1292412967 */ 
    1292512968class SimplePie_Sanitize