Skip to content

Commit

Permalink
Add (Gallery) to titles
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephDeFazio committed Sep 24, 2021
1 parent 44f33fa commit 0203d93
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rss.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,12 @@
if($item["data"]["domain"]) {
$itemTitle .= " (" . $item["data"]["domain"] . ")";
}
if(strpos($itemDataUrl,"imgur") !== false && strpos($itemDataUrl,"gallery") !== false) {
if (
// Check for an imgur gallery or a Reddit gallery
(strpos($itemDataUrl,"imgur") !== false &&
strpos($itemDataUrl,"gallery") !== false) ||
isset($item["data"]["gallery_data"])
) {
$itemTitle .= " (Gallery)";
}
$titleNode = $itemNode->appendChild($xml->createElement("title", $itemTitle));
Expand Down

0 comments on commit 0203d93

Please sign in to comment.