Projet

Général

Profil

Révision 08475715

Ajouté par Assos Assos il y a plus de 7 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/field_permissions/field_permissions.install
16 16
    ->execute();
17 17
}
18 18

  
19
/**
20
 * Implements hook_uninstall().
21
 */
22
function field_permissions_uninstall() {
23

  
24
  // Collect all the field data that reference "field_permissions", within
25
  // the field_config table.
26
  //
27
  $records = db_query("SELECT * FROM field_config WHERE data LIKE '%field_permissions%'");
28

  
29
  foreach ($records as $record) {
30
    $data = $record->data;
31
    $data = unserialize($data);
32
    unset($data['field_permissions']);
33
    $data = serialize($data);
34

  
35
    // Update the record.
36
    db_query("UPDATE field_config SET data = :data WHERE id = :id",
37
      array(':data' => $data, ':id' => $record->id));
38
  }
39
}
40

  
19 41
/**
20 42
 * Sets a larger weight for the module so that the Field Permissions become available.
21 43
 */

Formats disponibles : Unified diff