Projet

Général

Profil

Révision bc175c27

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

Weekly update of contrib modules

Voir les différences:

drupal7/sites/all/modules/ldap/ldap_servers/LdapServerAdmin.class.php
81 81
    $this->groupNested = trim($values['grp_nested']);
82 82

  
83 83
    $this->groupUserMembershipsAttrExists = trim($values['grp_user_memb_attr_exists']);
84
    $this->groupUserMembershipsAttr =  drupal_strtolower(trim($values['grp_user_memb_attr']));
84
    $this->groupUserMembershipsAttr = drupal_strtolower(trim($values['grp_user_memb_attr']));
85 85

  
86 86
    $this->groupMembershipsAttr = drupal_strtolower(trim($values['grp_memb_attr']));
87 87

  
88
    $this->groupMembershipsAttrMatchingUserAttr =  drupal_strtolower(trim($values['grp_memb_attr_match_user_attr']));
88
    $this->groupMembershipsAttrMatchingUserAttr = drupal_strtolower(trim($values['grp_memb_attr_match_user_attr']));
89 89

  
90 90
    $this->groupDeriveFromDn = trim($values['grp_derive_from_dn']);
91 91
    $this->groupDeriveFromDnAttr = drupal_strtolower(trim($values['grp_derive_from_dn_attr']));
......
183 183
  public function getLdapServerActions() {
184 184
    $switch = ($this->status ) ? 'disable' : 'enable';
185 185
    $actions = array();
186
    $actions[] =  l(t('edit'), LDAP_SERVERS_MENU_BASE_PATH . '/servers/edit/' . $this->sid);
186
    $actions[] = l(t('edit'), LDAP_SERVERS_MENU_BASE_PATH . '/servers/edit/' . $this->sid);
187 187
    if (property_exists($this, 'type')) {
188 188
      if ($this->type == 'Overridden') {
189 189
          $actions[] = l(t('revert'), LDAP_SERVERS_MENU_BASE_PATH . '/servers/delete/' . $this->sid);
......
282 282

  
283 283
  if (!function_exists('ldap_set_rebind_proc')) {
284 284
    $form['server']['followrefs']['#disabled'] = TRUE;
285
    $form['server']['followrefs']['#description'] =  t('This functionality is disabled because the function ldap_set_rebind_proc can not be found on this server.  Perhaps your version of php does not have this function.  See php.net/manual/en/function.ldap-set-rebind-proc.php') . $form['server']['followrefs']['#description'];
285
    $form['server']['followrefs']['#description'] = t('This functionality is disabled because the function ldap_set_rebind_proc can not be found on this server.  Perhaps your version of php does not have this function.  See php.net/manual/en/function.ldap-set-rebind-proc.php') . $form['server']['followrefs']['#description'];
286 286
  }
287 287

  
288 288
  $form['server']['tls']['#required'] = FALSE;
......
366 366

  
367 367

  
368 368
    if (!is_numeric($this->port)) {
369
      $errors['port'] =  t('The TCP/IP port must be an integer.');
369
      $errors['port'] = t('The TCP/IP port must be an integer.');
370 370
    }
371 371

  
372 372
    if ($this->bind_method == LDAP_SERVERS_BIND_METHOD_USER && !$this->user_dn_expression) {
373
      $errors['user_dn_expression'] =  t('When using "Bind with Users Credentials", Expression for user DN is required');
373
      $errors['user_dn_expression'] = t('When using "Bind with Users Credentials", Expression for user DN is required');
374 374
    }
375 375

  
376 376
    if ($this->mail_attr && $this->mail_template) {
377
      $errors['mail_attr'] =  t('Mail attribute or Mail Template may be used.  Not both.');
377
      $errors['mail_attr'] = t('Mail attribute or Mail Template may be used.  Not both.');
378 378
    }
379 379

  
380 380
    if ($this->bind_method == LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT && !$this->binddn) {
381
      $errors['binddn'] =  t('When using "Bind with Service Account", Bind DN is required.');
381
      $errors['binddn'] = t('When using "Bind with Service Account", Bind DN is required.');
382 382
    }
383 383
    if ($op == 'add') {
384 384
      if ($this->bind_method == LDAP_SERVERS_BIND_METHOD_SERVICE_ACCT &&
385 385
        (($op == 'add' && !$this->bindpw_new) || ($op != 'add' && !$this->bindpw))
386 386
      ) {
387
        $errors['bindpw'] =  t('When using "Bind with Service Account", Bind password is required.');
387
        $errors['bindpw'] = t('When using "Bind with Service Account", Bind password is required.');
388 388
      }
389 389
    }
390 390

  
......
414 414
      $defaults = ldap_servers_ldaps_option_array();
415 415
      if (isset($defaults['user']['user_attr']) && ($this->user_attr != $defaults['user']['user_attr'])) {
416 416
        $tokens = array('%name' => $defaults['name'], '%default' => $defaults['user']['user_attr'], '%user_attr' => $this->user_attr);
417
        $warnings['user_attr'] =  t('The standard UserName attribute in %name is %default.  You have %user_attr. This may be correct
417
        $warnings['user_attr'] = t('The standard UserName attribute in %name is %default.  You have %user_attr. This may be correct
418 418
          for your particular LDAP.', $tokens);
419 419
      }
420 420

  
421 421
      if (isset($defaults['user']['mail_attr']) && $this->mail_attr && ($this->mail_attr != $defaults['user']['mail_attr'])) {
422 422
        $tokens = array('%name' => $defaults['name'], '%default' => $defaults['user']['mail_attr'], '%mail_attr' => $this->mail_attr);
423
        $warnings['mail_attr'] =  t('The standard mail attribute in %name is %default.  You have %mail_attr.  This may be correct
423
        $warnings['mail_attr'] = t('The standard mail attribute in %name is %default.  You have %mail_attr.  This may be correct
424 424
          for your particular LDAP.', $tokens);
425 425
      }
426 426
    }
......
429 429
   // }
430 430

  
431 431
    if (!$this->mail_attr && !$this->mail_template) {
432
      $warnings['mail_attr'] =  t('Mail attribute or Mail Template should be used for most user account functionality.');
432
      $warnings['mail_attr'] = t('Mail attribute or Mail Template should be used for most user account functionality.');
433 433
    }
434 434

  
435 435
   // commented out validation because too many false positives present usability errors.
......
583 583
        ),
584 584
      ),
585 585

  
586
      'ldap_type' =>  array(
586
      'ldap_type' => array(
587 587
        'form' => array(
588 588
          'fieldset' => 'server',
589 589
          '#type' => 'select',
590
          '#options' =>  ldap_servers_ldaps_option_array(),
590
          '#options' => ldap_servers_ldaps_option_array(),
591 591
          '#title' => t('LDAP Server Type'),
592 592
          '#description' => t('This field is informative.  It\'s purpose is to assist with default values and give validation warnings.'),
593 593
        ),
......
910 910
        ),
911 911
      ),
912 912

  
913
      'ldap_to_drupal_user' =>  array(
913
      'ldap_to_drupal_user' => array(
914 914
        'form' => array(
915 915
          'fieldset' => 'users',
916 916
          '#disabled' => (!module_exists('php')),
......
933 933
        ),
934 934
      ),
935 935

  
936
     'testing_drupal_username' =>  array(
936
     'testing_drupal_username' => array(
937 937
        'form' => array(
938 938
          'fieldset' => 'users',
939 939
          '#type' => 'textfield',
......
948 948
        ),
949 949
      ),
950 950

  
951
     'testing_drupal_user_dn' =>  array(
951
     'testing_drupal_user_dn' => array(
952 952
        'form' => array(
953 953
          'fieldset' => 'users',
954 954
          '#type' => 'textfield',
......
978 978
        ),
979 979
      ),
980 980

  
981
     'grp_object_cat' =>  array(
981
     'grp_object_cat' => array(
982 982
        'form' => array(
983 983
          'fieldset' => 'groups',
984 984
          '#type' => 'textfield',
......
1042 1042
        ),
1043 1043
      ),
1044 1044

  
1045
      'grp_user_memb_attr' =>  array(
1045
      'grp_user_memb_attr' => array(
1046 1046
        'form' => array(
1047 1047
          'fieldset' => 'groups',
1048 1048
          '#type' => 'textfield',
......
1065 1065
        ),
1066 1066
      ),
1067 1067

  
1068
      'grp_memb_attr' =>  array(
1068
      'grp_memb_attr' => array(
1069 1069
        'form' => array(
1070 1070
          'fieldset' => 'groups',
1071 1071
          '#type' => 'textfield',
......
1085 1085
        ),
1086 1086
      ),
1087 1087

  
1088
      'grp_memb_attr_match_user_attr' =>  array(
1088
      'grp_memb_attr_match_user_attr' => array(
1089 1089
        'form' => array(
1090 1090
          'fieldset' => 'groups',
1091 1091
          '#type' => 'textfield',
......
1128 1128
        ),
1129 1129
      ),
1130 1130

  
1131
      'grp_derive_from_dn_attr' =>  array(
1131
      'grp_derive_from_dn_attr' => array(
1132 1132
        'form' => array(
1133 1133
          'fieldset' => 'groups',
1134 1134
          '#type' => 'textfield',
......
1151 1151
        ),
1152 1152
      ),
1153 1153

  
1154
     'grp_test_grp_dn' =>  array(
1154
     'grp_test_grp_dn' => array(
1155 1155
        'form' => array(
1156 1156
          'fieldset' => 'groups',
1157 1157
          '#type' => 'textfield',
......
1171 1171
        ),
1172 1172
      ),
1173 1173

  
1174
     'grp_test_grp_dn_writeable' =>  array(
1174
     'grp_test_grp_dn_writeable' => array(
1175 1175
        'form' => array(
1176 1176
          'fieldset' => 'groups',
1177 1177
          '#type' => 'textfield',
......
1206 1206
        ),
1207 1207
      ),
1208 1208

  
1209
     'search_page_size' =>  array(
1209
     'search_page_size' => array(
1210 1210
        'form' => array(
1211 1211
          'fieldset' => 'pagination',
1212 1212
          '#type' => 'textfield',
......
1232 1232
        ),
1233 1233
      ),
1234 1234

  
1235
      'weight' =>  array(
1235
      'weight' => array(
1236 1236
        'schema' => array(
1237 1237
          'type' => 'int',
1238 1238
          'not null' => FALSE,

Formats disponibles : Unified diff