Révision 81b16cc2
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/media/media.install | ||
---|---|---|
112 | 112 |
|
113 | 113 |
if ($phase == 'update') { |
114 | 114 |
$info = system_get_info('module', 'file_entity'); |
115 |
if (strpos($info['version'], '7.x-2') === FALSE) { |
|
115 |
$file_entity_installed_date = $info['datestamp']; |
|
116 |
$file_entity_version = $info['version']; |
|
117 |
$file_entity_minimum_date = 1495439635; |
|
118 |
// Time of 2017-05-22 07:53:55 is most recent commit in 7.x-2.0. |
|
119 |
if ($file_entity_installed_date < $file_entity_minimum_date) { |
|
120 |
$description = $t('Media 2.10 or newer requires <a href="@url">File entity 2.0 or newer (2.4 or higher recommended)</a>. Please download the correct version and make sure you have deleted the file_entity folder inside the media module directory.', array('@url' => 'http://drupal.org/project/file_entity')); |
|
121 |
$requirements['file_entity']['description'] = $description; |
|
122 |
$requirements['file_entity']['severity'] = REQUIREMENT_ERROR; |
|
123 |
$requirements['file_entity']['value'] = $file_entity_version; |
|
124 |
$requirements['file_entity']['title'] = $t('Fieldable Files (file_entity) module 7.x-2.0 or newer is required by Media'); |
|
125 |
drupal_set_message($description, 'error', TRUE); |
|
126 |
} |
|
127 |
if (strpos($info['version'], '7.x-2') === FALSE && |
|
128 |
strpos($info['version'], '7.x-3') === FALSE) { |
|
116 | 129 |
$requirements['file_entity'] = array( |
117 |
'title' => $t('File entity 2.x'), |
|
130 |
'title' => $t('File entity 2.x or 3.x required.'),
|
|
118 | 131 |
'value' => $t('Wrong version'), |
119 | 132 |
'severity' => REQUIREMENT_ERROR, |
120 |
'description' => $t('Media 2.x requires <a href="@url">File entity 2.x</a>. Please download the correct version and make sure you have deleted the file_entity folder inside the media module directory.', array('@url' => 'http://drupal.org/project/file_entity')),
|
|
133 |
'description' => $t('Media requires <a href="@url">File entity 2.x or 3.x</a>. Please download the correct version and make sure you have deleted the file_entity folder inside the media module directory.', array('@url' => 'http://drupal.org/project/file_entity')),
|
|
121 | 134 |
); |
122 | 135 |
} |
123 | 136 |
} |
... | ... | |
138 | 151 |
$requirements['entity_translation']['severity'] = REQUIREMENT_ERROR; |
139 | 152 |
$requirements['entity_translation']['value'] = $et_installed_version; |
140 | 153 |
$requirements['entity_translation']['title'] = $t('Entity translation (when installed) with Media'); |
141 |
drupal_set_message($description, 'error', TRUE);
|
|
154 |
drupal_set_message($description, 'error', TRUE);
|
|
142 | 155 |
} |
143 | 156 |
} |
144 | 157 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules