$cached_filename = CACHE_DIR . '/images/' . sha1($src);
if (file_exists($cached_filename)) {
- $src = get_self_url_prefix() . '/public.php?op=cached_url&hash=' . sha1($src);
+
+ // this is strictly cosmetic
+ if ($entry->tagName == 'img') {
+ $suffix = ".png";
+ } else if ($entry->parentNode && $entry->parentNode->tagName == "video") {
+ $suffix = ".mp4";
+ } else if ($entry->parentNode && $entry->parentNode->tagName == "audio") {
+ $suffix = ".ogg";
+ } else {
+ $suffix = "";
+ }
+
+ $src = get_self_url_prefix() . '/public.php?op=cached_url&hash=' . sha1($src) . $suffix;
if ($entry->hasAttribute('srcset')) {
$entry->removeAttribute('srcset');
}
} // function encrypt_password
- function load_filters($feed_id, $owner_uid, $action_id = false) {
+ function load_filters($feed_id, $owner_uid) {
$filters = array();
$cat_id = (int)getFeedCategory($feed_id);
return true;
}
- function format_tags_string($tags, $id) {
+ function format_tags_string($tags) {
if (!is_array($tags) || count($tags) == 0) {
return __("no tags");
} else {
}
}
- function format_article_labels($labels, $id) {
+ function format_article_labels($labels) {
if (!is_array($labels)) return '';
$rv .= $retval;
} else {
- if (preg_match("/image/", $entry["type"]) ||
- preg_match("/\.(jpe?g|png|gif|bmp)/i", $entry["filename"])) {
+ if (preg_match("/image/", $entry["type"])) {
if (!$hide_images) {
$encsize = '';
return false;
}
+ /**
+ * @SuppressWarnings(unused)
+ */
function error_json($code) {
require_once "errors.php";