aboutsummaryrefslogtreecommitdiffstats
path: root/admin/picture_modify.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2015-12-03 16:04:02 +0100
committerplegall <plg@piwigo.org>2015-12-03 16:04:02 +0100
commit8e098d502a8f0e413b9c085db27d6a62a6c0909f (patch)
tree04bdf84e30becac7b8ed7b0b98fa7696b9979d5e /admin/picture_modify.php
parent27389102d1275cdefcaee9c5a4a93297fc797b8c (diff)
feature #379 multiple format, step 1: add formats
* new table piwigo_image_format (each photo can have 0 to many formats) * only compatible with synchronization for now. Formats must be in sub-directory pwg_format * formats are visible on edition page only for now
Diffstat (limited to '')
-rw-r--r--admin/picture_modify.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/admin/picture_modify.php b/admin/picture_modify.php
index bf0e458e6..cdb7ccbbe 100644
--- a/admin/picture_modify.php
+++ b/admin/picture_modify.php
@@ -306,6 +306,25 @@ SELECT
$intro_vars['stats'].= ', '.sprintf(l10n('Rated %d times, score : %.2f'), $row['nb_rates'], $row['rating_score']);
}
+$query = '
+SELECT *
+ FROM '.IMAGE_FORMAT_TABLE.'
+ WHERE image_id = '.$row['id'].'
+;';
+$formats = query2array($query);
+
+if (!empty($formats))
+{
+ $format_strings = array();
+
+ foreach ($formats as $format)
+ {
+ $format_strings[] = sprintf('%s (%.2fMB)', $format['ext'], $format['filesize']/1024);
+ }
+
+ $intro_vars['formats'] = l10n('Formats: %s', implode(', ', $format_strings));
+}
+
$template->assign('INTRO', $intro_vars);