diff options
author | Andrew Dolgov <[email protected]> | 2021-02-15 19:14:43 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2021-02-15 19:14:43 +0300 |
commit | 3a4df432278e5af525f7fcab46696aae77ba6d7b (patch) | |
tree | d4f3aba5428193f441cb42c3a58199323d7e2035 | |
parent | d292140233a239c02f68e9a02cfa0c205092095e (diff) | |
parent | c73615343eadc5c4d4f9b3bfddd9517a51c70fa3 (diff) |
Merge branch 'master' of git.tt-rss.org:fox/ttrss-api-resize
-rw-r--r-- | init.php | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -105,7 +105,6 @@ class Api_Resize_Media extends Plugin { } } - /** @noinspection PhpUnused */ public function api_resize() { $url = validate_url($_REQUEST["url"]); @@ -304,16 +303,14 @@ class Api_Resize_Media extends Plugin { return $article; } - /** @noinspection PhpUnused */ function hook_article_image($enclosures, $content, $site_url) { - $width = (int) clean($_REQUEST["resize_width"]); + $width = (int) clean($_REQUEST["resize_width"] ?? 0); $article = $this->process_article(["headline" => ["content" => $content]], $width); return ["", "", $article["content"]]; } - /** @noinspection PhpUnused */ function hook_enclosure_entry($enc) { $force_width = (int) $this->host->get($this, "force_width", 0); @@ -322,23 +319,20 @@ class Api_Resize_Media extends Plugin { return $enc; } - /** @noinspection PhpUnused */ function hook_render_article_cdm($row) { $force_width = (int) $this->host->get($this, "force_width", 0); return $this->process_article(["article" => $row], $force_width); } - /** @noinspection PhpUnused */ function hook_render_article($row) { $force_width = (int) $this->host->get($this, "force_width", 0); return $this->process_article(["article" => $row], $force_width); } - /** @noinspection PhpUnused */ function hook_render_article_api($row) { - $width = (int) clean($_REQUEST["resize_width"]); + $width = (int) clean($_REQUEST["resize_width"] ?? 0); return $this->process_article($row, $width); } |