diff options
author | rvelices <rv-github@modusoptimus.com> | 2012-04-02 20:17:33 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2012-04-02 20:17:33 +0000 |
commit | 9c6f27c0e127ba1d54435ade0045c591da0de65a (patch) | |
tree | 5f6dac8cf641a5786f6c0d96cbb70278715c49ab /i.php | |
parent | 5fb052cf0a2524c6d7bb6cfeaa9915912d0a8b77 (diff) |
feature 2604 multisize rotation - fix creation of derivatives for representatives of non image elements + avoid unnecessary sql update query
git-svn-id: http://piwigo.org/svn/trunk@13864 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'i.php')
-rw-r--r-- | i.php | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -438,6 +438,7 @@ if (!$need_generate) exit; } +include_once(PHPWG_ROOT_PATH . 'admin/include/image.class.php'); $page['coi'] = null; if (strpos($page['src_location'], '/pwg_representative/')===false && strpos($page['src_location'], 'themes/')===false @@ -446,12 +447,7 @@ if (strpos($page['src_location'], '/pwg_representative/')===false try { $query = ' -SELECT - id, - coi, - width, - height, - rotation +SELECT * FROM '.$prefixeTable.'images WHERE path=\''.$page['src_location'].'\' ;'; @@ -464,9 +460,7 @@ SELECT } $page['coi'] = $row['coi']; - include_once(PHPWG_ROOT_PATH . 'admin/include/image.class.php'); - - if (empty($row['rotation'])) + if (!isset($row['rotation'])) { $page['rotation_angle'] = pwg_image::get_rotation_angle($page['src_path']); |