Projet

Général

Profil

Révision 2b3c8cc1

Ajouté par Assos Assos il y a presque 9 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/media/media.install
104 104
function media_requirements($phase) {
105 105
  $t = get_t();
106 106
  // Make sure that file_entity module is 2.x version.
107
  // We can't add this check in .info file because drupal.org testbot cant
107
  // We can't add this check in .info file because drupal.org testbot can't
108 108
  // handle it. See #1734648.
109 109
  $requirements = array();
110 110

  
......
139 139
 * Create the media_type table from the media_types variable.
140 140
 */
141 141
function media_update_7002() {
142
  if (db_table_exists('media_type')) {
143
    return;
144
  }
145

  
142 146
  $schema['media_type'] = array(
143 147
    'description' => 'Stores the settings for media types.',
144 148
    'fields' => array(
......
190 194
  db_create_table('media_type', $schema['media_type']);
191 195

  
192 196
  drupal_load('module', 'media');
193
  $old_types = variable_get('media_types');
197
  $old_types = variable_get('media_types', array());
194 198
  foreach ($old_types as $type) {
195 199
    // Was an error in the original creation.
196 200
    if (isset($type->callbacks)) {
......
496 500
  }
497 501
}
498 502

  
503
/**
504
 * Rerun media_update_7002() due to a typo that would prevent table creation.
505
 */
506
function media_update_7021() {
507
  media_update_7002();
508
}
509

  
499 510
/**
500 511
 * Replace 'view media' perm from all users having the role with 'view file'.
501 512
 */
......
1160 1171
}
1161 1172

  
1162 1173
/**
1163
 * Accommodate the introduction of a new permission which restricts access to
1164
 * the media browser by granting it to existing users who were able to access
1165
 * it.
1174
 * Grant existing user access to new media browser permission.
1166 1175
 */
1167 1176
function media_update_7226() {
1168 1177
  $roles = user_roles(FALSE, 'create files');

Formats disponibles : Unified diff