Index: /trunk/admin/history.php =================================================================== --- /trunk/admin/history.php (revision 16281) +++ /trunk/admin/history.php (revision 16282) @@ -304,5 +304,4 @@ IF(name IS NULL, file, name) AS label, filesize, - high_filesize, file, path, @@ -314,5 +313,4 @@ $label_of_image = array(); $filesize_of_image = array(); - $high_filesize_of_image = array(); $file_of_image = array(); $path_of_image = array(); @@ -329,15 +327,8 @@ } - if (isset($row['high_filesize'])) - { - $high_filesize_of_image[ $row['id'] ] = $row['high_filesize']; - } - $file_of_image[ $row['id'] ] = $row['file']; $path_of_image[ $row['id'] ] = $row['path']; $representative_ext_of_image[ $row['id'] ] = $row['representative_ext']; } - - // echo '
'; print_r($high_filesize_of_image); echo ''; } @@ -361,27 +352,9 @@ foreach ($history_lines as $line) { - // FIXME when we watch the representative of a non image element, it is - // the not the representative filesize that is counted (as it is - // unknown) but the non image element filesize. Proposed solution: add - // #images.representative_filesize and add 'representative' in the - // choices of #history.image_type. - - if (isset($line['image_type'])) - { - if ($line['image_type'] == 'high') - { - if (isset($high_filesize_of_image[$line['image_id']])) - { - $summary['total_filesize']+= - $high_filesize_of_image[$line['image_id']]; - } - } - else - { - if (isset($filesize_of_image[$line['image_id']])) - { - $summary['total_filesize']+= - $filesize_of_image[$line['image_id']]; - } + if (isset($line['image_type']) and $line['image_type'] == 'high') + { + if (isset($filesize_of_image[$line['image_id']])) + { + $summary['total_filesize'] += $filesize_of_image[$line['image_id']]; } } @@ -549,5 +522,5 @@ $page['nb_lines'] ), - 'FILESIZE' => $summary['total_filesize'].' KB', + 'FILESIZE' => $summary['total_filesize'] != 0 ? ceil($summary['total_filesize']/1024).' MB' : '', 'USERS' => l10n_dec( '%d user', '%d users',