From 611e5ba37dbfc191601339d4321a23e3805868b4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 5 Jul 2015 15:04:51 +0300 Subject: [PATCH 1/3] update .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) 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 From 5f58daa2fbc4be8623b18030e76617e6b0046b02 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 5 Jul 2015 17:47:53 +0300 Subject: [PATCH 2/3] af_redditimgur: better handling of image urls with multiple-character numeric suffixes --- plugins/af_redditimgur/init.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 6b4487642..809792dd8 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'); From 09897321072550a84236df0eeadb487e1e560557 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 6 Jul 2015 00:58:55 +0300 Subject: [PATCH 3/3] af_redditimgur: add yet another imgur album variant --- plugins/af_redditimgur/init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/af_redditimgur/init.php b/plugins/af_redditimgur/init.php index 809792dd8..c680ee322 100644 --- a/plugins/af_redditimgur/init.php +++ b/plugins/af_redditimgur/init.php @@ -132,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);