Revision 2b3c8cc1
Added by Assos Assos about 9 years ago
drupal7/sites/all/modules/media/media.views.inc | ||
---|---|---|
74 | 74 |
$files = file_load_multiple($fids); |
75 | 75 |
|
76 | 76 |
// Render the preview for each file. |
77 |
$params = media_get_browser_params(); |
|
78 |
$view_mode = isset($params['view_mode']) ? $params['view_mode'] : 'preview'; |
|
79 |
|
|
77 | 80 |
foreach ($vars['rows'] as $index => $row) { |
78 | 81 |
$file = $files[$row->fid]; |
79 | 82 |
// Add url/preview to the file object. |
80 |
media_browser_build_media_item($file); |
|
83 |
media_browser_build_media_item($file, $view_mode);
|
|
81 | 84 |
$vars['rows'][$index] = $file; |
82 | 85 |
$vars['rows'][$index]->preview = $file->preview; |
83 | 86 |
} |
... | ... | |
126 | 129 |
* Implements hook_views_invalidate_cache(). |
127 | 130 |
*/ |
128 | 131 |
function media_views_invalidate_cache() { |
129 |
cache_clear_all('media:browser:plugin', 'cache', TRUE); |
|
130 | 132 |
drupal_static_reset('media_get_browser_plugin_info'); |
131 | 133 |
} |
Also available in: Unified diff
Weekly update of contrib modules