aboutsummaryrefslogtreecommitdiffstats
path: root/i.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2012-07-24 20:50:20 +0000
committerrvelices <rv-github@modusoptimus.com>2012-07-24 20:50:20 +0000
commit663f6273a714b4fc5468a1d6787d6a529fad1d60 (patch)
treeb930c976c93fefe51e1cf07a9b58e4b7b30be424 /i.php
parent0bb3361cf1594d620bf82c4ac398a8340419ae1a (diff)
bug 2682: Watermark sizing calculation is made on the requested size not on the final one (merge from trunk)
git-svn-id: http://piwigo.org/svn/branches/2.4@16990 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--i.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/i.php b/i.php
index f7201cd13..d6d58f2ed 100644
--- a/i.php
+++ b/i.php
@@ -104,6 +104,7 @@ function ierror($msg, $code)
header('Request-URI: '.$url);
header('Content-Location: '.$url);
header('Location: '.$url);
+ ilog('WARN', $code, $url, $_SERVER['REQUEST_URI']);
exit;
}
if ($code>=400)
@@ -203,7 +204,7 @@ function parse_request()
{
preg_match($conf['sync_chars_regex'], $token) or ierror('Invalid chars in request', 400);
}
-
+
$page['derivative_path'] = PHPWG_ROOT_PATH.PWG_DERIVATIVE_DIR.$req;
$pos = strrpos($req, '.');
@@ -452,7 +453,7 @@ SELECT *
FROM '.$prefixeTable.'images
WHERE path=\''.$page['src_location'].'\'
;';
-
+
if ( ($row=pwg_db_fetch_assoc(pwg_query($query))) )
{
if (isset($row['width']))
@@ -464,7 +465,7 @@ SELECT *
if (!isset($row['rotation']))
{
$page['rotation_angle'] = pwg_image::get_rotation_angle($page['src_path']);
-
+
single_update(
$prefixeTable.'images',
array('rotation' => pwg_image::get_rotation_code_from_angle($page['rotation_angle'])),
@@ -540,7 +541,7 @@ if ($params->sharpen)
$timing['sharpen'] = time_step($step);
}
-if ($params->use_watermark)
+if ($params->will_watermark($d_size))
{
$wm = ImageStdParams::get_watermark();
$wm_image = new pwg_image(PHPWG_ROOT_PATH.$wm->file);