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_authentication/ldap_authentication.install
10 10
 */
11 11
function ldap_authentication_requirements($phase) {
12 12

  
13
  $requirements = array();
13
  $requirements = [];
14 14
  if ($phase != "install" && db_table_exists('ldapauth')) {
15 15
    $requirements['ldap_authentication_ldap_integration']['title'] = t('LDAP Integration LDAP Auth Upgrade Concern');
16 16
    $requirements['ldap_authentication_ldap_integration']['severity'] = REQUIREMENT_WARNING;
......
40 40
}
41 41

  
42 42
/**
43
 * ldap_authentication and ldap_sso.  enable ldap_sso if sso was enabled in ldap_authentication previously
43
 * Ldap_authentication and ldap_sso.  enable ldap_sso if sso was enabled in ldap_authentication previously.
44 44
 */
45 45
function ldap_authentication_update_7100() {
46
  // if sso is enabled in ldap authentication, enable module ldap_sso
46
  // If sso is enabled in ldap authentication, enable module ldap_sso.
47 47
  module_load_include('inc', 'ldap_servers', 'ldap_servers.functions');
48 48
  ldap_servers_module_load_include('php', 'ldap_authentication', 'LdapAuthenticationConfAdmin.class');
49 49
  $sso_enabled = LdapAuthenticationConfAdmin::getSaveableProperty('ssoEnabled');
50 50
  if ($sso_enabled) {
51
    module_enable(array('ldap_sso'));
51
    module_enable(['ldap_sso']);
52 52
    return t('Enabled new LDAP SSO module if Single Sign on was previously enabled.  Code for LDAP Single Sign On was moved to new "LDAP SSO" included module.');
53 53
  }
54 54
}
55

  
56

  
57
function ldap_authentication_ldap_integration6_to_ldap7() {
58

  
59
 // fix authmaps
60
 // UPDATE {authmap} SET module = 'ldap_authentication' WHERE module = 'ldapauth'
61

  
62
 // load all users and setup user data array
63

  
64
/**
65
 * CREATE TABLE `ldapauth` (
66
	`sid` TINYINT(4) NOT NULL AUTO_INCREMENT,
67
	`name` VARCHAR(255) NOT NULL,
68
	`status` TINYINT(4) NOT NULL DEFAULT '0',
69
	`server` VARCHAR(255) NOT NULL,
70
	`port` INT(11) NOT NULL DEFAULT '389',
71
	`tls` TINYINT(4) NOT NULL DEFAULT '0',
72
	`encrypted` TINYINT(4) NOT NULL DEFAULT '0',
73
	`basedn` TEXT NULL,
74
	`user_attr` VARCHAR(255) NULL DEFAULT NULL,
75
	`mail_attr` VARCHAR(255) NULL DEFAULT NULL,
76
	`binddn` VARCHAR(255) NULL DEFAULT NULL,
77
	`bindpw` VARCHAR(255) NULL DEFAULT NULL,
78
	`login_php` TEXT NULL,
79
	`filter_php` TEXT NULL,
80
	`weight` INT(11) NOT NULL DEFAULT '0',
81
	`ldapgroups_in_dn` TINYINT(4) NOT NULL DEFAULT '0',
82
	`ldapgroups_dn_attribute` VARCHAR(255) NULL DEFAULT NULL,
83
	`ldapgroups_attr` VARCHAR(255) NULL DEFAULT NULL,
84
	`ldapgroups_in_attr` TINYINT(4) NOT NULL DEFAULT '0',
85
	`ldapgroups_as_entries` TINYINT(4) NOT NULL DEFAULT '0',
86
	`ldapgroups_entries` TEXT NULL,
87
	`ldapgroups_entries_attribute` VARCHAR(255) NULL DEFAULT NULL,
88
	`ldapgroups_mappings` TEXT NULL,
89
	`ldapgroups_mappings_filter` TINYINT(4) NOT NULL DEFAULT '0',
90
	`ldapgroups_filter_php` TEXT NULL,
91
	`ldapgroups_groups` TEXT NULL,
92
	PRIMARY KEY (`name`),
93
	INDEX `sid` (`sid`)
94
)
95
COLLATE='utf8_general_ci'
96
ENGINE=InnoDB
97
ROW_FORMAT=DEFAULT
98
AUTO_INCREMENT=2
99
 */
100
}

Formats disponibles : Unified diff