Browse Source

Zend_Feed_Reader: Restricted Atom parsing to return feed categories but exclude entry cats. Issue caused by a loose XPath query. Fixes ZF-8467
Zend_Feed_Pubsubhubbub: Fixed a test file include where file to include contained a bad path and was not required.


git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@19823 44c647ce-9c0f-0410-b52a-842ac1e357ba

padraic 16 năm trước cách đây
mục cha
commit
920796fb70

+ 2 - 2
library/Zend/Feed/Reader/Extension/Atom/Feed.php

@@ -425,7 +425,7 @@ class Zend_Feed_Reader_Extension_Atom_Feed
         }
 
         if ($this->getType() == Zend_Feed_Reader::TYPE_ATOM_10) {
-            $list = $this->_xpath->query($this->getXpathPrefix() . '//atom:category');
+            $list = $this->_xpath->query($this->getXpathPrefix() . '/atom:category');
         } else {
             /**
              * Since Atom 0.3 did not support categories, it would have used the
@@ -433,7 +433,7 @@ class Zend_Feed_Reader_Extension_Atom_Feed
              * may have been retrofittied to use Atom 1.0 instead.
              */
             $this->_xpath->registerNamespace('atom10', Zend_Feed_Reader::NAMESPACE_ATOM_10);
-            $list = $this->_xpath->query($this->getXpathPrefix() . '//atom10:category');
+            $list = $this->_xpath->query($this->getXpathPrefix() . '/atom10:category');
         }
 
         if ($list->length) {

+ 0 - 2
tests/Zend/Feed/Pubsubhubbub/Subscriber/CallbackTest.php

@@ -19,8 +19,6 @@
  * @version    $Id$
  */
 
-require_once dirname(dirname(dirname(dirname(dirname(__FILE__))))) . DIRECTORY_SEPARATOR . 'TestHelper.php';
-
 require_once 'Zend/Feed/Pubsubhubbub/Subscriber/Callback.php';
 require_once 'Zend/Feed/Pubsubhubbub/Model/Subscription.php';
 require_once 'Zend/Db/Table/Rowset/Abstract.php';