Projet

Général

Profil

Révision cfceb792

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/acl/acl.api.php
15 15
  return "ACL (id=$acl_id) grants access to $name/$number to the listed user(s).";
16 16
}
17 17

  
18
/**
19
 * Inform ACL module that the client module is enabled.
20
 *
21
 * ACL will not return its NA records for your module if your module does not
22
 * confirm that it's active.
23
 *
24
 * If you use the example below, you can disable ACL on hook_disable using:
25
 * @code
26
 * function MYMODULE_disable() {
27
 *   MYMODULE_enabled(FALSE);
28
 * }
29
 * @endcode
30
 */
31
function hook_enabled($set = NULL) {
32
  static $enabled = TRUE; // not drupal_static!
33

  
34
  if ($set !== NULL) {
35
    $enabled = $set;
36
  }
37
  return $enabled;
38
}

Formats disponibles : Unified diff