when choosing enclosures to embed or rewrite (af_zz_imgproxy) only use content type instead of "filename"-based hacks

master
Andrew Dolgov 8 years ago
parent 388d4dfa88
commit dc2c4b13d4

@ -2000,8 +2000,7 @@
$rv .= $retval; $rv .= $retval;
} else { } else {
if (preg_match("/image/", $entry["type"]) || if (preg_match("/image/", $entry["type"])) {
preg_match("/\.(jpe?g|png|gif|bmp)/i", $entry["filename"])) {
if (!$hide_images) { if (!$hide_images) {
$encsize = ''; $encsize = '';

@ -23,7 +23,7 @@ class Af_Zz_ImgProxy extends Plugin {
} }
function hook_enclosure_entry($enc) { function hook_enclosure_entry($enc) {
if (preg_match("/image/", $enc["content_type"]) || preg_match("/\.(jpe?g|png|gif|bmp)$/i", $enc["filename"])) { if (preg_match("/image/", $enc["content_type"])) {
$proxy_all = $this->host->get($this, "proxy_all"); $proxy_all = $this->host->get($this, "proxy_all");
$enc["content_url"] = $this->rewrite_url_if_needed($enc["content_url"], $proxy_all); $enc["content_url"] = $this->rewrite_url_if_needed($enc["content_url"], $proxy_all);

Loading…
Cancel
Save