From 77d1dc07824440c7894515d95f0790eec7555d9d Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 28 Feb 2021 10:13:17 +0300 Subject: updates for core changes --- init.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/init.php b/init.php index 07d44f3..7e6cdd5 100644 --- a/init.php +++ b/init.php @@ -174,10 +174,6 @@ class Api_Resize_Media extends Plugin { } } } else { - global $fetch_last_error; - global $fetch_last_error_code; - global $fetch_last_error_content; - if (function_exists("imagecreate") && !isset($_REQUEST["text"])) { $img = imagecreate(450, 75); @@ -188,7 +184,7 @@ class Api_Resize_Media extends Plugin { imagestring($img, 5, 5, 5, "Proxy request failed", $textcolor); imagestring($img, 5, 5, 30, truncate_middle($url, 46, "..."), $textcolor); - imagestring($img, 5, 5, 55, "HTTP Code: $fetch_last_error_code", $textcolor); + imagestring($img, 5, 5, 55, "HTTP Code: ".UrlHelper::$fetch_last_error_code, $textcolor); header("Content-type: image/png"); print imagepng($img); @@ -200,7 +196,7 @@ class Api_Resize_Media extends Plugin { http_response_code(400); print "Proxy request failed.\n". - "Fetch error $fetch_last_error ($fetch_last_error_code)\n". + "Fetch error ".UrlHelper::$fetch_last_error." (".UrlHelper::$fetch_last_error_code.")\n". "Requested URL: $url"; } } -- cgit v1.2.3 From 689bf732c82e9791fb464430767b2a2e5c63f68c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 1 Mar 2021 12:13:19 +0300 Subject: show version from git --- init.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.php b/init.php index 7e6cdd5..b540d1b 100644 --- a/init.php +++ b/init.php @@ -10,7 +10,7 @@ class Api_Resize_Media extends Plugin { private $cache; function about() { - return array(1.0, + return array(null, "Resizes media on the fly (for API clients or web UI)", "fox"); } -- cgit v1.2.3 From acd6835b4ca38a0fcd48cba4212a2a3c0d4ebe78 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Fri, 5 Mar 2021 10:11:37 +0300 Subject: add a more info link --- init.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init.php b/init.php index 7e6cdd5..3dd171a 100644 --- a/init.php +++ b/init.php @@ -10,9 +10,11 @@ class Api_Resize_Media extends Plugin { private $cache; function about() { - return array(1.0, + return array(null, "Resizes media on the fly (for API clients or web UI)", - "fox"); + "fox", + false, + "https://git.tt-rss.org/fox/ttrss-api-resize"); } function is_public_method($method) { -- cgit v1.2.3