aboutsummaryrefslogtreecommitdiffstats
path: root/admin/element_set_ranks.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2011-12-27 05:26:44 +0000
committerrvelices <rv-github@modusoptimus.com>2011-12-27 05:26:44 +0000
commit753f58d6a966a1051dcd62a3eeab8fc18798bcac (patch)
tree2ebbfec86d511aa980e0d23c170bfa5006a8793e /admin/element_set_ranks.php
parente77e68b7db17c28c1ca44f4865758f2afb871d07 (diff)
feature 2541 multisize
- core implementation + usage on most public/admin pages - still to do: sync process, upload, gui/persistence for size parameters, migration script, center of interest ... git-svn-id: http://piwigo.org/svn/trunk@12796 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/element_set_ranks.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/admin/element_set_ranks.php b/admin/element_set_ranks.php
index 972a13a19..6de933904 100644
--- a/admin/element_set_ranks.php
+++ b/admin/element_set_ranks.php
@@ -199,7 +199,8 @@ SELECT
id,
file,
path,
- tn_ext,
+ representative_ext,
+ width, height,
name,
rank
FROM '.IMAGES_TABLE.'
@@ -214,11 +215,12 @@ if (pwg_db_num_rows($result) > 0)
$current_rank = 1;
$thumbnail_info=array();
$clipping=array();
+ $derivativeParams = ImageStdParams::get_by_type(IMG_SQUARE);
while ($row = pwg_db_fetch_assoc($result))
{
- $src = get_thumbnail_url($row);
+ $derivative = new DerivativeImage($derivativeParams, new SrcImage($row));
- $thumbnail_size = getimagesize($src);
+ $thumbnail_size = $derivative->get_size();
if ( !empty( $row['name'] ) )
{
$thumbnail_name = $row['name'];
@@ -233,7 +235,7 @@ if (pwg_db_num_rows($result) > 0)
'width' => $thumbnail_size[0],
'height' => $thumbnail_size[1],
'id' => $row['id'],
- 'tn_src' => $src,
+ 'tn_src' => $derivative->get_url(),
'rank' => $current_rank * 10,
);
if ($thumbnail_size[0]<=128 and $thumbnail_size[1]<=128)