diff options
author | Andrew Dolgov <[email protected]> | 2019-08-15 20:28:34 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-08-15 20:28:34 +0300 |
commit | 8aba83daa5b0e4246d6f823de23d4ce679a69a66 (patch) | |
tree | a4911d1d9ba8ab8ed5600efb4e2a8bb5b5ee75f8 | |
parent | d8942eceafbe424c8aa057defed02859f39e1a8f (diff) |
use get_public_method_url() helper of pluginhost
-rw-r--r-- | init.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -211,12 +211,12 @@ class Api_Resize_Media extends Plugin { $local_filename = sha1($url) . "-$width"; - if ($this->cache->exists($local_filename)) { + if (!$this->cache->exists($local_filename)) { return $this->cache->getUrl($local_filename); } else { if ($this->cache->touch(sha1($url) . ".flag")) { - return get_self_url_prefix() . "/public.php?op=pluginhandler&plugin=api_resize_media&pmethod=api_resize&url=" . - urlencode($url) . "&width=" . $width . "&force_stamp=" . $force_stamp; + return $this->host->get_public_method_url($this, "api_resize", + ["url" => $url, "width" => $width, "force_stamp" => $force_stamp]); } } } |