Révision 18596a08
Ajouté par Assos Assos il y a presque 7 ans
drupal7/sites/all/modules/media/media.media.inc | ||
---|---|---|
108 | 108 |
$query->condition($or); |
109 | 109 |
} |
110 | 110 |
} |
111 |
|
|
112 |
/** |
|
113 |
* Implements hook_form_FORM_ID_alter(). |
|
114 |
*/ |
|
115 |
function media_form_views_exposed_form_alter(&$form, &$form_state, $form_id) { |
|
116 |
$view = $form_state['view']; |
|
117 |
$display = $form_state['display']; |
|
118 |
|
|
119 |
if ($view->name == 'media_default' && $display->id == 'media_browser_1') { |
|
120 |
$params = media_get_browser_params(); |
|
121 |
|
|
122 |
// Remove any unsupported types from the 'Type' filter. |
|
123 |
if (!empty($form['type']) && !empty($params['types'])) { |
|
124 |
foreach (array_keys($form['type']['#options']) as $type) { |
|
125 |
if ($type != 'All' && !in_array($type, $params['types'])) { |
|
126 |
unset($form['type']['#options'][$type]); |
|
127 |
} |
|
128 |
} |
|
129 |
} |
|
130 |
} |
|
131 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules