pingback to u-in-reply-to also when it is not in e-content
authorChristian Weiske <cweiske@cweiske.de>
Wed, 19 Jun 2013 21:22:08 +0000 (23:22 +0200)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 19 Jun 2013 21:22:08 +0000 (23:22 +0200)
src/stapibas/Feed/UpdateEntries.php

index 119b207277d9cce897578a51180e18ba9165350e..975f6a9a5304407bc137c6c324f47897f536aac5 100644 (file)
@@ -176,9 +176,17 @@ class Feed_UpdateEntries
 
         $xpath = new \DOMXPath($doc);
         $xpath->registerNamespace('h', 'http://www.w3.org/1999/xhtml');
 
         $xpath = new \DOMXPath($doc);
         $xpath->registerNamespace('h', 'http://www.w3.org/1999/xhtml');
+        // all links in e-content AND u-in-reply-to links
         $query = '//*[' . $this->xpc('h-entry') . ' or ' . $this->xpc('hentry') . ']'
             . '//*[' . $this->xpc('e-content') . ' or ' . $this->xpc('entry-content') . ']'
         $query = '//*[' . $this->xpc('h-entry') . ' or ' . $this->xpc('hentry') . ']'
             . '//*[' . $this->xpc('e-content') . ' or ' . $this->xpc('entry-content') . ']'
-            . '//*[(self::a or self::h:a) and @href and not(starts-with(@href, "#"))]';
+            . '//*[(self::a or self::h:a) and @href and not(starts-with(@href, "#"))]'
+            . ' | '
+            . '//*[' . $this->xpc('h-entry') . ' or ' . $this->xpc('hentry') . ']'
+            . '//*['
+            . '(self::a or self::h:a) and @href and not(starts-with(@href, "#"))'
+            . 'and ' . $this->xpc('u-in-reply-to')
+            . ']';
+;
         $links = $xpath->query($query);
         $this->log->info('%d links found', $links->length);
 
         $links = $xpath->query($query);
         $this->log->info('%d links found', $links->length);