Project

General

Profile

Revision 1f142f4f

Added by Florent Torregrosa over 8 years ago

Issue #592: Update file_entity to version 7.x-2.0-beta2.

View differences:

drupal7/sites/all/modules/file_entity/file_entity.admin.inc
331 331
  $query = db_select('file_managed', 'fm')->extend('PagerDefault')->extend('TableSort');
332 332
  $query->leftJoin('file_usage', 'fu', 'fm.fid = fu.fid');
333 333
  $query->groupBy('fm.fid');
334
  $query->groupBy('fm.uid');
335
  $query->groupBy('fm.timestamp');
334 336
  $query->addExpression('SUM(fu.count)', 'total_count');
335 337
  file_entity_build_filter_query($query);
336 338

  
......
354 356
  $options = array();
355 357
  foreach ($files as $file) {
356 358
    $file_type = file_type_load($file->type);
359
    $account = isset($accounts[$file->uid]) ? $accounts[$file->uid] : NULL;
357 360
    $options[$file->fid] = array(
358 361
      'title' => array(
359 362
        'data' => array(
......
364 367
      ),
365 368
      'type' => $file_type ? check_plain($file_type->label) : FILE_TYPE_NONE,
366 369
      'size' => format_size($file->filesize),
367
      'author' => theme('username', array('account' => $accounts[$file->uid])),
370
      'author' => theme('username', array('account' => $account)),
368 371
      'timestamp' => format_date($file->timestamp, 'short'),
369 372
      'usage' => format_plural((int) $result[$file->fid]->total_count, '1 place', '@count places'),
370 373
    );

Also available in: Unified diff