Changeset 16281
- Timestamp:
- Jul 2, 2012, 3:30:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.4/admin/history.php
r14688 r16281 304 304 IF(name IS NULL, file, name) AS label, 305 305 filesize, 306 high_filesize,307 306 file, 308 307 path, … … 314 313 $label_of_image = array(); 315 314 $filesize_of_image = array(); 316 $high_filesize_of_image = array();317 315 $file_of_image = array(); 318 316 $path_of_image = array(); … … 329 327 } 330 328 331 if (isset($row['high_filesize']))332 {333 $high_filesize_of_image[ $row['id'] ] = $row['high_filesize'];334 }335 336 329 $file_of_image[ $row['id'] ] = $row['file']; 337 330 $path_of_image[ $row['id'] ] = $row['path']; 338 331 $representative_ext_of_image[ $row['id'] ] = $row['representative_ext']; 339 332 } 340 341 // echo '<pre>'; print_r($high_filesize_of_image); echo '</pre>';342 333 } 343 334 … … 361 352 foreach ($history_lines as $line) 362 353 { 363 // FIXME when we watch the representative of a non image element, it is 364 // the not the representative filesize that is counted (as it is 365 // unknown) but the non image element filesize. Proposed solution: add 366 // #images.representative_filesize and add 'representative' in the 367 // choices of #history.image_type. 368 369 if (isset($line['image_type'])) 370 { 371 if ($line['image_type'] == 'high') 372 { 373 if (isset($high_filesize_of_image[$line['image_id']])) 374 { 375 $summary['total_filesize']+= 376 $high_filesize_of_image[$line['image_id']]; 377 } 378 } 379 else 380 { 381 if (isset($filesize_of_image[$line['image_id']])) 382 { 383 $summary['total_filesize']+= 384 $filesize_of_image[$line['image_id']]; 385 } 354 if (isset($line['image_type']) and $line['image_type'] == 'high') 355 { 356 if (isset($filesize_of_image[$line['image_id']])) 357 { 358 $summary['total_filesize'] += $filesize_of_image[$line['image_id']]; 386 359 } 387 360 } … … 549 522 $page['nb_lines'] 550 523 ), 551 'FILESIZE' => $summary['total_filesize'] .' KB',524 'FILESIZE' => $summary['total_filesize'] != 0 ? ceil($summary['total_filesize']/1024).' MB' : '', 552 525 'USERS' => l10n_dec( 553 526 '%d user', '%d users',
Note: See TracChangeset
for help on using the changeset viewer.