Révision 32700c57
Ajouté par Assos Assos il y a environ 5 ans
drupal7/sites/all/modules/ldap/ldap_query/ldap_query.install | ||
---|---|---|
19 | 19 |
|
20 | 20 |
} |
21 | 21 |
|
22 |
|
|
23 | 22 |
/** |
24 | 23 |
* Implements hook_schema(). |
25 | 24 |
*/ |
25 |
|
|
26 | 26 |
/** |
27 | 27 |
* Implements hook_schema(). |
28 | 28 |
*/ |
29 | 29 |
function ldap_query_schema() { |
30 | 30 |
|
31 |
$schema['ldap_query'] = array(
|
|
32 |
'export' => array(
|
|
31 |
$schema['ldap_query'] = [
|
|
32 |
'export' => [
|
|
33 | 33 |
'key' => 'qid', |
34 | 34 |
'key name' => 'Query Name', |
35 | 35 |
'identifier' => 'qid', |
36 | 36 |
'primary key' => 'query_numeric_id', |
37 |
'api' => array(
|
|
37 |
'api' => [
|
|
38 | 38 |
'owner' => 'ldap_query', |
39 | 39 |
'api' => 'ldap_query', |
40 | 40 |
'minimum_version' => 1, |
41 | 41 |
'current_version' => 1, |
42 |
),
|
|
43 |
),
|
|
42 |
],
|
|
43 |
],
|
|
44 | 44 |
|
45 | 45 |
'description' => "LDAP Query Data leveraged by other LDAP Modules", |
46 |
'primary key' => array('query_numeric_id'),
|
|
47 |
'foreign keys' => array(
|
|
48 |
'sid' => array(
|
|
46 |
'primary key' => ['query_numeric_id'],
|
|
47 |
'foreign keys' => [
|
|
48 |
'sid' => [
|
|
49 | 49 |
'table' => 'ldap_servers', |
50 |
'columns' => array('sid' => 'sid'),
|
|
51 |
),
|
|
52 |
),
|
|
53 |
);
|
|
50 |
'columns' => ['sid' => 'sid'],
|
|
51 |
],
|
|
52 |
],
|
|
53 |
];
|
|
54 | 54 |
module_load_include('module', 'ldap_servers'); |
55 | 55 |
ldap_servers_module_load_include('php', 'ldap_query', 'LdapQuery.class'); |
56 | 56 |
$fields = LdapQuery::fields(); |
... | ... | |
68 | 68 |
*/ |
69 | 69 |
function ldap_query_update_7100() { |
70 | 70 |
module_load_include('inc', 'ldap_servers', 'ldap_servers.functions'); |
71 |
ldap_servers_module_load_include('module', 'ldap_servers', 'ldap_servers'); // get LDAP_SCOPE_SUBTREE constant |
|
72 |
// make sure 'create_consumers' field is there for old 7.x-1.x-dev versions |
|
71 |
// Get LDAP_SCOPE_SUBTREE constant. |
|
72 |
ldap_servers_module_load_include('module', 'ldap_servers', 'ldap_servers'); |
|
73 |
// Make sure 'create_consumers' field is there for old 7.x-1.x-dev versions. |
|
73 | 74 |
if (!db_field_exists('ldap_query', 'scope')) { |
74 |
db_add_field('ldap_query', 'scope', array(
|
|
75 |
db_add_field('ldap_query', 'scope', [
|
|
75 | 76 |
'type' => 'int', |
76 | 77 |
'size' => 'small', |
77 | 78 |
'not null' => FALSE, |
78 | 79 |
'default' => LDAP_SCOPE_SUBTREE, |
79 |
));
|
|
80 |
]);
|
|
80 | 81 |
return t('"scope" field added to ldap_query table'); |
81 | 82 |
} |
82 | 83 |
else { |
... | ... | |
86 | 87 |
} |
87 | 88 |
|
88 | 89 |
/** |
89 |
* Make filter field type 'text' for longer filters |
|
90 |
* Make filter field type 'text' for longer filters.
|
|
90 | 91 |
*/ |
91 | 92 |
function ldap_query_update_7101() { |
92 |
db_change_field('ldap_query', 'filter', 'filter', array(
|
|
93 |
db_change_field('ldap_query', 'filter', 'filter', [
|
|
93 | 94 |
'type' => 'text', |
94 | 95 |
'not null' => FALSE, |
95 |
));
|
|
96 |
]);
|
|
96 | 97 |
|
97 | 98 |
return t('ldap_query table field "filter" changed to type "text"'); |
98 | 99 |
} |
99 | 100 |
|
100 |
|
|
101 | 101 |
/** |
102 |
* make ldap_query.scope field small int instead of tiny int for ctools bug
|
|
102 |
* Make ldap_query.scope field small int instead of tiny int for ctools bug.
|
|
103 | 103 |
*/ |
104 | 104 |
function ldap_query_update_7102() { |
105 | 105 |
|
106 |
db_change_field('ldap_query', 'scope', 'scope', array(
|
|
106 |
db_change_field('ldap_query', 'scope', 'scope', [
|
|
107 | 107 |
'type' => 'int', |
108 | 108 |
'size' => 'small', |
109 | 109 |
'not null' => TRUE, |
110 | 110 |
'default' => 0, |
111 |
));
|
|
111 |
]);
|
|
112 | 112 |
|
113 | 113 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules