mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Compress the secureImg. TinyMce also decoding theme SEF image URLs now.
This commit is contained in:
@@ -94,7 +94,7 @@
|
|||||||
ExpiresByType text/x-javascript "access plus 1 month"
|
ExpiresByType text/x-javascript "access plus 1 month"
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
### Gzip Compression Module
|
### Gzip Compression Module
|
||||||
<ifmodule mod_deflate.c>
|
<ifmodule mod_deflate.c>
|
||||||
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/xml text/xml application/rss+xml
|
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/x-javascript application/javascript application/xml text/xml application/rss+xml
|
||||||
</ifmodule>
|
</ifmodule>
|
||||||
|
@@ -391,10 +391,10 @@ class secure_image
|
|||||||
switch($type)
|
switch($type)
|
||||||
{
|
{
|
||||||
case "jpeg":
|
case "jpeg":
|
||||||
imagejpeg($image);
|
imagejpeg($image, null, 60 );
|
||||||
break;
|
break;
|
||||||
case "png":
|
case "png":
|
||||||
imagepng($image);
|
imagepng($image, null, 9);
|
||||||
break;
|
break;
|
||||||
case "gif":
|
case "gif":
|
||||||
imagegif($image);
|
imagegif($image);
|
||||||
|
@@ -249,6 +249,19 @@ TEMPL;
|
|||||||
$hKey => $match[4]
|
$hKey => $match[4]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
elseif(preg_match('/theme\/img\/(a)?([\d]*)x(a)?([\d]*)\/(.*)/', $url, $match)) // Theme-image SEF Urls
|
||||||
|
{
|
||||||
|
$wKey = $match[1].'w';
|
||||||
|
$hKey = $match[3].'h';
|
||||||
|
|
||||||
|
$ret = array(
|
||||||
|
'src'=> 'e_THEME/'.$match[5],
|
||||||
|
$wKey => $match[2],
|
||||||
|
$hKey => $match[4]
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return $ret;
|
return $ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user