Projet

Général

Profil

Révision 32700c57

Ajouté par Assos Assos il y a environ 5 ans

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ldap/ldap_authorization/ldap_authorization_og/ldap_authorization_og.module
9 9
 * Implements hook_ldap_authorization_consumer().
10 10
 */
11 11
function ldap_authorization_og_ldap_authorization_consumer() {
12
  $types['og_group'] = array(
12
  $types['og_group'] = [
13 13
    'consumer_name' => t('OG group'),
14 14
    'consumer_name_plural' => t('OG groups'),
15 15
    'consumer_short_name' => t('group'),
......
18 18
    'consumer_class_name' => 'LdapAuthorizationConsumerOG',
19 19
    'consumer_class_file' => 'LdapAuthorizationConsumerOG.class.php',
20 20
    'consumer_module' => 'ldap_authorization_og',
21
  );
21
  ];
22 22

  
23 23
  $types['og_group']['consumer_mapping_directions'] = 'Mappings should be of form:<br/>
24 24
    <code>[raw authorization id]|[og entity type]:[og entity id or title]:[og role id]</code>
......
85 85
    }
86 86
  }
87 87

  
88
  return array($group_entity, $group_entity_id);
88
  return [$group_entity, $group_entity_id];
89 89

  
90 90
}
91 91

  
......
95 95
function ldap_authorization_og2_has_consumer_id($consumer_id, $uid) {
96 96
  $parts = explode(':', $consumer_id);
97 97
  $result = FALSE;
98
  $watchdog_tokens = array(
98
  $watchdog_tokens = [
99 99
    '%consumer_id' => $consumer_id,
100 100
    '%uid' => $uid,
101
  );
101
  ];
102 102
  if (count($parts) == 3) {
103 103
    list($group_type, $gid, $rid) = $parts;
104 104
    // Need to make sure entity exists before calling og_get_user_roles which will throw fatal error.
......
154 154
 *
155 155
 */
156 156
function ldap_authorization_og_get_all_group_entities() {
157
  $entities = array();
157
  $entities = [];
158 158
  $group_entity_types = og_get_all_group_bundle();
159 159
  foreach ($group_entity_types as $entity_type => $group) {
160 160
    $entity_ids = og_get_all_group('node');

Formats disponibles : Unified diff