summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-08-15 20:28:34 +0300
committerAndrew Dolgov <[email protected]>2019-08-15 20:28:34 +0300
commit8aba83daa5b0e4246d6f823de23d4ce679a69a66 (patch)
treea4911d1d9ba8ab8ed5600efb4e2a8bb5b5ee75f8
parentd8942eceafbe424c8aa057defed02859f39e1a8f (diff)
use get_public_method_url() helper of pluginhost
-rw-r--r--init.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/init.php b/init.php
index d4b9338..582dfea 100644
--- a/init.php
+++ b/init.php
@@ -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]);
}
}
}