From bfb8eadc8bada18c144e239706bca9cd20c95aff Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 19 Jun 2013 23:22:08 +0200 Subject: [PATCH] pingback to u-in-reply-to also when it is not in e-content --- src/stapibas/Feed/UpdateEntries.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/stapibas/Feed/UpdateEntries.php b/src/stapibas/Feed/UpdateEntries.php index 119b207..975f6a9 100644 --- a/src/stapibas/Feed/UpdateEntries.php +++ b/src/stapibas/Feed/UpdateEntries.php @@ -176,9 +176,17 @@ class Feed_UpdateEntries $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') . ']' - . '//*[(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); -- 2.30.2