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.theme.inc
11 11
function theme_ldap_authorization_admin_index(&$variables) {
12 12
  $consumers = $variables['consumers'];
13 13

  
14
  $table = array(
15
    'header' => array(t('LDAP Server ID'), t('Description'), t('Module'), t('Consumer Type'), t('Enabled'), t('Operations')),
16
    'attributes' => array('id' => 'ldap_consumer_confs', 'class' => 'data'),
17
    'colgroups' => array(),
14
  $table = [
15
    'header' => [t('LDAP Server ID'), t('Description'), t('Module'), t('Consumer Type'), t('Enabled'), t('Operations')],
16
    'attributes' => ['id' => 'ldap_consumer_confs', 'class' => 'data'],
17
    'colgroups' => [],
18 18
    'sticky' => FALSE,
19 19
    'empty' => '',
20 20
    'caption' => t('LDAP Authorization Configurations'),
21
    'rows' => array(),
22
  );
21
    'rows' => [],
22
  ];
23 23

  
24 24
  foreach ($consumers as $consumer_type => $consumer) {
25 25

  
......
31 31
      $actions = l(t('add'), LDAP_SERVERS_MENU_BASE_PATH . '/authorization/add/' . $consumer->consumerType);
32 32
    }
33 33

  
34
    $table['rows'][] = array(
34
    $table['rows'][] = [
35 35
      $consumer->consumerConf->sid,
36 36
      $consumer->name,
37 37
      $consumer->consumerModule,
38 38
      $consumer_type,
39 39
      ($consumer->consumerConf->status) ? t('Yes') : t('No'),
40 40
      $actions,
41
    );
41
    ];
42 42
  }
43 43
  return theme('table', $table);
44 44

  
......
55 55
  $consumer_conf_link = l($consumer->consumerType, LDAP_SERVERS_MENU_BASE_PATH . '/authorization/edit/' . $consumer->consumerType);
56 56
  $server_link = l($consumer->consumerConf->sid, LDAP_SERVERS_MENU_BASE_PATH . '/servers/edit/' . $consumer->consumerConf->sid);
57 57

  
58
  $table = array(
59
    'header' => array(t('Drupal Username'), t('Authorization Type'), t('Authorization IDs'), t('Configuration'), t('LDAP Server Configuration')),
60
    'attributes' => array('id' => 'ldap_authorization_authorizations', 'class' => 'data'),
61
    'colgroups' => array(),
58
  $table = [
59
    'header' => [t('Drupal Username'), t('Authorization Type'), t('Authorization IDs'), t('Configuration'), t('LDAP Server Configuration')],
60
    'attributes' => ['id' => 'ldap_authorization_authorizations', 'class' => 'data'],
61
    'colgroups' => [],
62 62
    'sticky' => FALSE,
63 63
    'empty' => '',
64
    'caption' => t('LDAP Authorizations Test Results for consumer %consumer', array('%consumer' => $consumer->name)),
65
    'rows' => array(),
66
  );
64
    'caption' => t('LDAP Authorizations Test Results for consumer %consumer', ['%consumer' => $consumer->name]),
65
    'rows' => [],
66
  ];
67 67

  
68 68
  if (count($results)) {
69 69
    foreach ($results as $username => $user_results) {
70
      $row = array();
70
      $row = [];
71 71
      if ($user = user_load_by_name($username)) {
72 72
        $username_link = l($username, 'user/' . $user->uid . '/edit');
73 73
      }
74 74
      foreach ($user_results as $consumer_type => $authorizations) {
75 75
        if (is_array($authorizations) && count($authorizations) > 0) {
76 76
          $authorizations = $consumer->convertToFriendlyAuthorizationIds($authorizations);
77
          $authorizations_text = theme('item_list', array('items' => array_values($authorizations), 'title' => NULL, 'type' => 'ul', 'attributes' => array()));
77
          $authorizations_text = theme('item_list', ['items' => array_values($authorizations), 'title' => NULL, 'type' => 'ul', 'attributes' => []]);
78 78
        }
79 79
        else {
80 80
          $authorizations_text = "";
81 81
        }
82
        $row = array($username, $consumer->name, $authorizations_text, $consumer_conf_link, $server_link);
82
        $row = [$username, $consumer->name, $authorizations_text, $consumer_conf_link, $server_link];
83 83
        $table['rows'][] = $row;
84 84
      }
85 85

  
......
93 93
            $authorizations_text .= ldap_authorization_map_errors($notification, $consumer_conf_link);
94 94
          }
95 95
        }
96
        $row = array($username_link, $consumer->name, $authorizations_text, $consumer_conf_link, $server_link);
96
        $row = [$username_link, $consumer->name, $authorizations_text, $consumer_conf_link, $server_link];
97 97
        $table['rows'][] = $row;
98 98
      }
99 99
    }
......
110 110
 */
111 111
function ldap_authorization_map_errors($err_id, $consumer_conf_link) {
112 112

  
113
  $tokens = array('%consumer_conf_link' => $consumer_conf_link);
113
  $tokens = ['%consumer_conf_link' => $consumer_conf_link];
114 114
  switch ($err_id) {
115 115

  
116 116
    case  LDAP_AUTHORIZATION_USER_LDAP_NOT_FOUND:

Formats disponibles : Unified diff