summaryrefslogtreecommitdiff
path: root/plugins/af_zz_imgproxy
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2017-02-13 15:49:41 +0300
committerAndrew Dolgov <[email protected]>2017-02-13 15:49:41 +0300
commit093d463320a86b14ebc182da2e1499c47a3edb91 (patch)
treebaade40e20b5fc5b6bb36e1fa17a592c0179c96c /plugins/af_zz_imgproxy
parentbf6398650a7956a84418c216f0876c0e35d8e56c (diff)
af_zz_imgproxy: truncate url in error png
Diffstat (limited to 'plugins/af_zz_imgproxy')
-rw-r--r--plugins/af_zz_imgproxy/init.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/af_zz_imgproxy/init.php b/plugins/af_zz_imgproxy/init.php
index 07177bb7c..0bd14cab9 100644
--- a/plugins/af_zz_imgproxy/init.php
+++ b/plugins/af_zz_imgproxy/init.php
@@ -78,15 +78,15 @@ class Af_Zz_ImgProxy extends Plugin {
global $fetch_last_error_content;
if (function_exists("imagecreate")) {
- $img = imagecreate(400, 75);
+ $img = imagecreate(450, 75);
$bg = imagecolorallocate($img, 255, 255, 255);
$textcolor = imagecolorallocate($img, 255, 0, 0);
- imagerectangle($img, 0, 0, 400-1, 75-1, $textcolor);
+ imagerectangle($img, 0, 0, 450-1, 75-1, $textcolor);
imagestring($img, 5, 5, 5, "Proxy request failed", $textcolor);
- imagestring($img, 5, 5, 30, $url, $textcolor);
+ imagestring($img, 5, 5, 30, truncate_middle($url, 46, "..."), $textcolor);
imagestring($img, 5, 5, 55, "HTTP Code: $fetch_last_error_code", $textcolor);
header("Content-type: image/png");