diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-06-14 13:47:14 +0300 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-06-14 13:47:14 +0300 |
| commit | cc51487f080166b2a21eb529f1d4fc29994d9ff1 (patch) | |
| tree | e87e5ce6c96a233b9f50c8fb456b02834a585ec1 /classes/Feeds.php | |
| parent | 66db7dc0ac996f528f6ff9d71f3cc7ec30d65278 (diff) | |
| parent | 9e6684e9277dace834ef10dab21c5b585f291675 (diff) | |
Merge branch 'master' into weblate-integration
Diffstat (limited to 'classes/Feeds.php')
| -rw-r--r-- | classes/Feeds.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/classes/Feeds.php b/classes/Feeds.php index 88128cc48..64674b2d2 100644 --- a/classes/Feeds.php +++ b/classes/Feeds.php @@ -453,7 +453,7 @@ class Feeds extends Handler_Protected { if ($num_errors > 0) { $reply['content'] .= "<br/>"; - $reply['content'] .= "<a class=\"text-muted\" href=\"#\" onclick=\"CommonDialogs.showFeedsWithErrors()\">" . + $reply['content'] .= "<a class=\"text-muted\" href=\"#\" onclick=\"CommonDialogs.showFeedsWithErrors(); return false\">" . __('Some feeds have update errors (click for details)') . "</a>"; } $reply['content'] .= "</span></p></div>"; @@ -603,7 +603,7 @@ class Feeds extends Handler_Protected { if ($num_errors > 0) { $reply['headlines']['content'] .= "<br/>"; - $reply['headlines']['content'] .= "<a class=\"text-muted\" href=\"#\" onclick=\"CommonDialogs.showFeedsWithErrors()\">". + $reply['headlines']['content'] .= "<a class=\"text-muted\" href=\"#\" onclick=\"CommonDialogs.showFeedsWithErrors(); return false\">". __('Some feeds have update errors (click for details)')."</a>"; } $reply['headlines']['content'] .= "</span></p>"; @@ -2097,8 +2097,8 @@ class Feeds extends Handler_Protected { $doc = new DOMDocument(); if (@$doc->loadHTML($content)) { $xpath = new DOMXPath($doc); - $entries = $xpath->query('/html/head/link[@rel="alternate" and '. - '(contains(@type,"rss") or contains(@type,"atom"))]|/html/head/link[@rel="feed"]'); + $entries = $xpath->query('/html/*[self::head or self::body]/link[@rel="alternate" and '. + '(contains(@type,"rss") or contains(@type,"atom"))]|/html/*[self::head or self::body]/link[@rel="feed"]'); foreach ($entries as $entry) { if ($entry->hasAttribute('href')) { @@ -2127,7 +2127,7 @@ class Feeds extends Handler_Protected { $cat->delete(); } - static function _add_cat(string $title, int $owner_uid, int $parent_cat = null, int $order_id = 0): bool { + static function _add_cat(string $title, int $owner_uid, ?int $parent_cat = null, int $order_id = 0): bool { $cat = ORM::for_table('ttrss_feed_categories') ->where('owner_uid', $owner_uid) |