Changeset 27572 for trunk/admin/history.php
- Timestamp:
- Mar 6, 2014, 9:54:48 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/admin/history.php
r27240 r27572 226 226 } 227 227 228 /*TODO - no need to get a huge number of rows from db (should take only what needed for display + SQL_CALC_FOUND_ROWS*/ 228 229 $data = trigger_event('get_history', array(), $page['search'], $types); 229 230 usort($data, 'history_compare'); … … 285 286 WHERE id IN ('.implode(',', array_keys($category_ids)).') 286 287 ;'; 287 $uppercats_of = simple_hash_from_query($query, 'id', 'uppercats');288 $uppercats_of = query2array($query, 'id', 'uppercats'); 288 289 289 290 $name_of_category = array(); … … 310 311 WHERE id IN ('.implode(',', array_keys($image_ids)).') 311 312 ;'; 312 // $label_of_image = simple_hash_from_query($query, 'id', 'label'); 313 $label_of_image = array(); 314 $filesize_of_image = array(); 315 $file_of_image = array(); 316 $path_of_image = array(); 317 $representative_ext_of_image = array(); 318 319 $result = pwg_query($query); 320 while ($row = pwg_db_fetch_assoc($result)) 321 { 322 $label_of_image[ $row['id'] ] = trigger_event('render_element_description', $row['label']); 323 324 if (isset($row['filesize'])) 325 { 326 $filesize_of_image[ $row['id'] ] = $row['filesize']; 327 } 328 329 $file_of_image[ $row['id'] ] = $row['file']; 330 $path_of_image[ $row['id'] ] = $row['path']; 331 $representative_ext_of_image[ $row['id'] ] = $row['representative_ext']; 332 } 313 $image_infos = query2array($query, 'id'); 333 314 } 334 315 … … 361 342 if (isset($line['image_type']) and $line['image_type'] == 'high') 362 343 { 363 if (isset($filesize_of_image[$line['image_id']])) 364 { 365 $summary['total_filesize'] += $filesize_of_image[$line['image_id']]; 366 } 344 $summary['total_filesize'] += @intval($image_infos[$line['image_id']]['filesize']); 367 345 } 368 346 … … 422 400 ); 423 401 424 if (isset($ file_of_image[$line['image_id']]))402 if (isset($image_infos[$line['image_id']])) 425 403 { 426 404 $element = array( 427 405 'id' => $line['image_id'], 428 'file' => $ file_of_image[$line['image_id']],429 'path' => $ path_of_image[$line['image_id']],430 'representative_ext' => $ representative_ext_of_image[$line['image_id']],406 'file' => $image_infos[$line['image_id']]['file'], 407 'path' => $image_infos[$line['image_id']]['path'], 408 'representative_ext' => $image_infos[$line['image_id']]['representative_ext'], 431 409 ); 432 410 $thumbnail_display = $page['search']['fields']['display_thumbnail']; … … 439 417 $image_title = '('.$line['image_id'].')'; 440 418 441 if (isset($ label_of_image[$line['image_id']]))419 if (isset($image_infos[$line['image_id']]['label'])) 442 420 { 443 $image_title.= ' '. $label_of_image[$line['image_id']];421 $image_title.= ' '.trigger_event('render_element_description', $image_infos[$line['image_id']]['label']); 444 422 } 445 423 else … … 660 638 $template->assign( 661 639 array( 662 'user_options' => simple_hash_from_query($query, 'id','username'),640 'user_options' => query2array($query, 'id','username'), 663 641 'user_options_selected' => array(@$form['user']) 664 642 )
Note: See TracChangeset
for help on using the changeset viewer.