import v2.0.0.0_RC3 | 2012-07-01
https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
* @package Zend_Feed_Reader
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Atom.php 16966 2009-07-22 15:22:18Z padraic $
|
||||
* @version $Id: Atom.php 19193 2009-11-23 16:11:15Z padraic $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -76,7 +76,7 @@ class Zend_Feed_Reader_Entry_Atom extends Zend_Feed_Reader_EntryAbstract impleme
|
||||
$this->_extensions['Thread_Entry'] = new $threadClass($entry, $entryKey, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Get the specified author
|
||||
*
|
||||
* @param int $index
|
||||
@ -295,7 +295,7 @@ class Zend_Feed_Reader_Entry_Atom extends Zend_Feed_Reader_EntryAbstract impleme
|
||||
return $this->_data['commentcount'];
|
||||
}
|
||||
|
||||
$commentcount = $this->getExtension('Thread')>getCommentCount();
|
||||
$commentcount = $this->getExtension('Thread')->getCommentCount();
|
||||
|
||||
if (!$commentcount) {
|
||||
$commentcount = $this->getExtension('Atom')->getCommentCount();
|
||||
|
@ -16,7 +16,7 @@
|
||||
* @package Zend_Feed_Reader
|
||||
* @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
|
||||
* @license http://framework.zend.com/license/new-bsd New BSD License
|
||||
* @version $Id: Rss.php 16966 2009-07-22 15:22:18Z padraic $
|
||||
* @version $Id: Rss.php 18367 2009-09-22 14:55:59Z padraic $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -255,19 +255,19 @@ class Zend_Feed_Reader_Entry_Rss extends Zend_Feed_Reader_EntryAbstract implemen
|
||||
) {
|
||||
$dateModified = $this->_xpath->evaluate('string('.$this->_xpathQueryRss.'/pubDate)');
|
||||
if ($dateModified) {
|
||||
$date = new Zend_Date();
|
||||
try {
|
||||
$date->set($dateModified, Zend_Date::RFC_822);
|
||||
} catch (Zend_Date_Exception $e) {
|
||||
$dateStandards = array(Zend_Date::RSS, Zend_Date::RFC_822,
|
||||
Zend_Date::RFC_2822, Zend_Date::DATES);
|
||||
$date = new Zend_Date;
|
||||
foreach ($dateStandards as $standard) {
|
||||
try {
|
||||
$date->set($dateModified, Zend_Date::RFC_2822);
|
||||
$date->set($dateModified, $standard);
|
||||
break;
|
||||
} catch (Zend_Date_Exception $e) {
|
||||
try {
|
||||
$date->set($dateModified, Zend_Date::DATES);
|
||||
} catch (Zend_Date_Exception $e) {
|
||||
if ($standard == Zend_Date::DATES) {
|
||||
require_once 'Zend/Feed/Exception.php';
|
||||
throw new Zend_Feed_Exception(
|
||||
'Could not load date due to unrecognised format (should follow RFC 822 or 2822): '
|
||||
'Could not load date due to unrecognised'
|
||||
.' format (should follow RFC 822 or 2822):'
|
||||
. $e->getMessage()
|
||||
);
|
||||
}
|
||||
@ -335,7 +335,6 @@ class Zend_Feed_Reader_Entry_Rss extends Zend_Feed_Reader_EntryAbstract implemen
|
||||
|
||||
/**
|
||||
* Get the entry enclosure
|
||||
* TODO: Is this supported by RSS? Could delegate to Atom Extension if not.
|
||||
* @return string
|
||||
*/
|
||||
public function getEnclosure()
|
||||
@ -357,6 +356,10 @@ class Zend_Feed_Reader_Entry_Rss extends Zend_Feed_Reader_EntryAbstract implemen
|
||||
}
|
||||
}
|
||||
|
||||
if (!$enclosure) {
|
||||
$enclosure = $this->getExtension('Atom')->getEnclosure();
|
||||
}
|
||||
|
||||
$this->_data['enclosure'] = $enclosure;
|
||||
|
||||
return $this->_data['enclosure'];
|
||||
|
Reference in New Issue
Block a user