Révision 32700c57
Ajouté par Assos Assos il y a environ 5 ans
drupal7/sites/all/modules/ldap/ldap_authorization/ldap_authorization.admin.inc | ||
---|---|---|
27 | 27 |
foreach ($consumers as $consumer_type => $consumer) { |
28 | 28 |
$consumers[$consumer_type] = ldap_authorization_get_consumer_object($consumer_type); |
29 | 29 |
} |
30 |
return theme('ldap_authorization_admin_index', array('consumers' => $consumers));
|
|
30 |
return theme('ldap_authorization_admin_index', ['consumers' => $consumers]);
|
|
31 | 31 |
|
32 | 32 |
} |
33 | 33 |
|
34 | 34 |
/** |
35 | 35 |
* Form for adding, updating, and deleting a single ldap authorization configuration. |
36 | 36 |
* |
37 |
* @param form array $form
|
|
38 |
* @param form state array $form_state
|
|
37 |
* @param array $form |
|
38 |
* @param array $form_state |
|
39 | 39 |
* @param string $op |
40 | 40 |
* (add, edit, or delete) |
41 | 41 |
* @param string $consumer_type |
42 | 42 |
* e.g. drupal_roles, og_group, etc. Only needed for adds. |
43 | 43 |
* |
44 |
* @return drupal form array
|
|
44 |
* @return array |
|
45 | 45 |
*/ |
46 | 46 |
function ldap_authorization_admin_form($form, &$form_state, $consumer_type, $op = NULL) { |
47 | 47 |
ldap_servers_module_load_include('php', 'ldap_authorization', 'LdapAuthorizationConsumerConfAdmin.class'); |
... | ... | |
50 | 50 |
if ($op == 'add' && is_object($consumer->consumerConf) && $consumer->consumerConf->inDatabase) { |
51 | 51 |
drupal_set_message(t('Only one configuration is allowed per consumer type. |
52 | 52 |
Configuration already exists for the cosumer type %consumer_type. Please edit that configuration.', |
53 |
array('%consumer_type' => $consumer_type)), 'warning');
|
|
53 |
['%consumer_type' => $consumer_type]), 'warning');
|
|
54 | 54 |
drupal_goto(LDAP_SERVERS_MENU_BASE_PATH . '/authorization'); |
55 | 55 |
} |
56 | 56 |
|
... | ... | |
105 | 105 |
$consumer_conf->drupalFormSubmit($op, $values); |
106 | 106 |
|
107 | 107 |
if ($consumer_conf->hasError == FALSE) { |
108 |
drupal_set_message(t('LDAP Authorization %name !verb', array('!verb' => $op_past_tense, '%name' => $consumer->name)), 'status');
|
|
108 |
drupal_set_message(t('LDAP Authorization %name !verb', ['!verb' => $op_past_tense, '%name' => $consumer->name]), 'status');
|
|
109 | 109 |
drupal_goto(LDAP_SERVERS_MENU_BASE_PATH . '/authorization'); |
110 | 110 |
} |
111 | 111 |
|
... | ... | |
148 | 148 |
break; |
149 | 149 |
} |
150 | 150 |
|
151 |
return array($consumer, $op, $op_past_tense, $new);
|
|
151 |
return [$consumer, $op, $op_past_tense, $new];
|
|
152 | 152 |
|
153 | 153 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules