mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-06-01 20:04:51 +02:00
multisize - avoid php warning for rotation_angle; better error logging; javascript avoid navigation to empty # anchor
git-svn-id: http://piwigo.org/svn/trunk@15551 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -275,7 +275,7 @@ class pwg_image
|
||||
|
||||
static function get_rotation_angle_from_code($rotation_code)
|
||||
{
|
||||
switch($rotation_code)
|
||||
switch($rotation_code%4)
|
||||
{
|
||||
case 0: return 0;
|
||||
case 1: return 90;
|
||||
@@ -623,7 +623,7 @@ class image_ext_imagick implements imageInterface
|
||||
ilog($exec);
|
||||
if (is_array($returnarray) && (count($returnarray)>0) )
|
||||
{
|
||||
ilog($returnarray);
|
||||
ilog('ERROR', $returnarray);
|
||||
}
|
||||
return is_array($returnarray);
|
||||
}
|
||||
|
||||
@@ -293,6 +293,7 @@ jQuery(document).ready(function(){
|
||||
var sizeName = jQuery(this).attr("id").split("-")[1];
|
||||
jQuery("#sizeEdit-"+sizeName).toggle();
|
||||
jQuery(this).hide();
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery(".cropToggle").click(function() {
|
||||
@@ -490,6 +491,7 @@ jQuery(document).ready(function() {
|
||||
|
||||
jQuery(".addWatermarkOpen").click(function(){
|
||||
jQuery("#addWatermark, #selectWatermark").toggle();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
{/literal}{/footer_script}
|
||||
|
||||
@@ -116,6 +116,7 @@ function ierror($msg, $code)
|
||||
}
|
||||
//todo improve
|
||||
echo $msg;
|
||||
ilog('ERROR', $code, $msg, $_SERVER['REQUEST_URI']);
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -486,6 +487,10 @@ SELECT *
|
||||
ilog("db error", $e->getMessage());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$page['rotation_angle'] = 0;
|
||||
}
|
||||
mysql_close($pwg_db_link);
|
||||
|
||||
try_switch_source($params, $src_mtime);
|
||||
@@ -504,7 +509,7 @@ $timing['load'] = time_step($step);
|
||||
$changes = 0;
|
||||
|
||||
// rotate
|
||||
if (0 != (int)$page['rotation_angle'])
|
||||
if (0 != $page['rotation_angle'])
|
||||
{
|
||||
$image->rotate($page['rotation_angle']);
|
||||
$changes++;
|
||||
|
||||
@@ -257,12 +257,10 @@ y.callService(
|
||||
if (e) e.innerHTML = rating.score;
|
||||
e = document.getElementById("ratingCount");
|
||||
if (e) {ldelim}
|
||||
if (rating.count == 1) {ldelim}
|
||||
if (rating.count == 1)
|
||||
e.innerHTML = "({'%d rate'|@translate|@escape:'javascript'})".replace( "%d", rating.count);
|
||||
{rdelim}
|
||||
else {ldelim}
|
||||
else
|
||||
e.innerHTML = "({'%d rates'|@translate|@escape:'javascript'})".replace( "%d", rating.count);
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
{rdelim}{rdelim} );
|
||||
{/footer_script}
|
||||
|
||||
Reference in New Issue
Block a user