summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2015-07-06 12:10:31 +0300
committerAndrew Dolgov <[email protected]>2015-07-06 12:10:31 +0300
commit6affdc59a31e41c9142c6e2ed8191564a4cbd79b (patch)
tree1769942364da2e107e20335d5b8026f0f809199b
parent5956f312b7cc0951df79a45ddc6ad17d082563d9 (diff)
parent09897321072550a84236df0eeadb487e1e560557 (diff)
Merge branch 'master' of git.fakecake.org:tt-rss
-rw-r--r--.gitignore2
-rw-r--r--plugins/af_redditimgur/init.php7
2 files changed, 5 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index 97ba8f64f..6aad45ceb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+/deploy.exclude
+/deploy.sh
/messages.mo
*~
*.DS_Store
diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php
index 6b4487642..c680ee322 100644
--- a/plugins/af_redditimgur/init.php
+++ b/plugins/af_redditimgur/init.php
@@ -84,9 +84,8 @@ class Af_RedditImgur extends Plugin {
$found = true;
}
- if (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9])?$/i", $entry->getAttribute("href"))) {
-
- $img = $doc->createElement('img');
+ if (preg_match("/\.(jpg|jpeg|gif|png)(\?[0-9][0-9]*)?$/i", $entry->getAttribute("href"))) {
+ $img = $doc->createElement('img');
$img->setAttribute("src", $entry->getAttribute("href"));
$br = $doc->createElement('br');
@@ -133,7 +132,7 @@ class Af_RedditImgur extends Plugin {
}
// linked albums, ffs
- if (preg_match("/^https?:\/\/imgur.com\/(a|album)\/[^\.]+$/", $entry->getAttribute("href"), $matches)) {
+ if (preg_match("/^https?:\/\/imgur.com\/(a|album|gallery)\/[^\.]+$/", $entry->getAttribute("href"), $matches)) {
$album_content = fetch_file_contents($entry->getAttribute("href"),
false, false, false, false, 10);