Révision bc175c27
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/ldap/ldap_help/ldap_help.status.inc | ||
---|---|---|
17 | 17 |
$phpinfo = ldap_help_parsePHPModules(); |
18 | 18 |
$status['server'] = ldap_help_get_server($phpinfo, $info); |
19 | 19 |
$reporting_text = _ldap_help_parse_status_to_text($status['server'], $heading); |
20 |
$content = "<h3>$heading</h3>" . theme('status_report', array('requirements' => $status['server'])); // . ldap_help_phpinfo();
|
|
20 |
$content = "<h3>$heading</h3>" . theme('status_report', array('requirements' => $status['server'])); // . ldap_help_phpinfo(); |
|
21 | 21 |
|
22 | 22 |
$status['user_settings'] = ldap_help_get_user_settings(); |
23 |
$content .= "<h3>User Settings</h3>" . theme('status_report', array('requirements' => $status['user_settings']));
|
|
23 |
$content .= "<h3>User Settings</h3>" . theme('status_report', array('requirements' => $status['user_settings'])); |
|
24 | 24 |
|
25 | 25 |
if (module_exists('ldap_servers')) { |
26 | 26 |
list($status['ldap_servers'], $servers) = ldap_help_get_ldap_servers(); |
27 |
$content .= "<h3>General Settings</h3>" . theme('status_report', array('requirements' => $status['ldap_servers']));
|
|
27 |
$content .= "<h3>General Settings</h3>" . theme('status_report', array('requirements' => $status['ldap_servers'])); |
|
28 | 28 |
|
29 | 29 |
foreach ($servers as $sid => $server) { |
30 |
$content .= "<h3>Server: " . $server[1]['value'] . "</h3>" . theme('status_report', array('requirements' => $server));
|
|
30 |
$content .= "<h3>Server: " . $server[1]['value'] . "</h3>" . theme('status_report', array('requirements' => $server)); |
|
31 | 31 |
} |
32 | 32 |
} |
33 | 33 |
|
34 | 34 |
if (module_exists('ldap_authentication')) { |
35 | 35 |
$status['ldap_authentication'] = ldap_help_get_ldap_authentication(); |
36 |
$content .= "<h3>LDAP Authentication Settings</h3>" . theme('status_report', array('requirements' => $status['ldap_authentication']));
|
|
36 |
$content .= "<h3>LDAP Authentication Settings</h3>" . theme('status_report', array('requirements' => $status['ldap_authentication'])); |
|
37 | 37 |
} |
38 | 38 |
if (module_exists('ldap_authorization')) { |
39 | 39 |
$status['ldap_authorizations'] = ldap_help_get_ldap_authorization(); |
40 | 40 |
if (count($status['ldap_authorizations'])) { |
41 | 41 |
foreach ($status['ldap_authorizations'] as $sid => $mapping) { |
42 |
$content .= "<h3>LDAP Authorization Mapping</h3>" . theme('status_report', array('requirements' => $mapping));
|
|
42 |
$content .= "<h3>LDAP Authorization Mapping</h3>" . theme('status_report', array('requirements' => $mapping)); |
|
43 | 43 |
} |
44 | 44 |
} |
45 | 45 |
} |
... | ... | |
135 | 135 |
$status[] = array('title' => 'Drupal', 'value' => VERSION , 'severity' => "0"); |
136 | 136 |
|
137 | 137 |
foreach ( $ldapmodules as $ldapmodule) { |
138 |
$status[] = array('title' => $ldapmodule, 'value' => $info[$ldapmodule]['text'], 'severity' => "0");
|
|
138 |
$status[] = array('title' => $ldapmodule, 'value' => $info[$ldapmodule]['text'], 'severity' => "0"); |
|
139 | 139 |
} |
140 | 140 |
return $status; |
141 | 141 |
} |
142 | 142 |
|
143 | 143 |
function ldap_help_get_ldapauth(&$info) { |
144 | 144 |
|
145 |
$status[] = array(
|
|
145 |
$status[] = array( |
|
146 | 146 |
'title' => 'Authentication mode', |
147 |
value => $info['ldapauth']['login_process_text'] ,
|
|
147 |
value => $info['ldapauth']['login_process_text'] , |
|
148 | 148 |
'severity' => "0"); |
149 | 149 |
|
150 |
$status[] = array(
|
|
150 |
$status[] = array( |
|
151 | 151 |
'title' => 'Conflict Resolve Feature', |
152 |
value => $info['ldapauth']['login_conflict_text'],
|
|
152 |
value => $info['ldapauth']['login_conflict_text'], |
|
153 | 153 |
'severity' => "0"); |
154 | 154 |
|
155 | 155 |
$info['ldapauth']['ldapauth_disable_pass_change_text'] = (LDAPAUTH_FORGET_PASSWORDS == TRUE) ? "Do not " : "Do"; |
156 | 156 |
$info['ldapauth']['ldapauth_disable_pass_change_text'] .= 'store users\' passwords during sessions.'; |
157 | 157 |
|
158 |
$status[] = array('title' => 'Security Options', value => $info['ldapauth']['ldapauth_disable_pass_change_text'], 'severity' => "0");
|
|
158 |
$status[] = array('title' => 'Security Options', value => $info['ldapauth']['ldapauth_disable_pass_change_text'], 'severity' => "0"); |
|
159 | 159 |
|
160 | 160 |
$info['ldapauth']['ldapauth_disable_pass_change_text'] = (LDAPAUTH_DISABLE_PASS_CHANGE == TRUE) ? "R" : "Do not R"; |
161 | 161 |
$info['ldapauth']['ldapauth_disable_pass_change_text'] .= 'emove password change fields from user edit form'; |
162 | 162 |
$info['ldapauth']['ldapauth_alter_email_field_text'] = 'ldapauth_alter_email_field: ' . LDAPAUTH_ALTER_EMAIL_FIELD ; |
163 | 163 |
|
164 |
$status[] = array('title' => 'LDAP UI Options', value => $info['ldapauth']['ldapauth_disable_pass_change_text'] . "<br/>" . $info['ldapauth']['ldapauth_alter_email_field_text'], 'severity' => "0");
|
|
164 |
$status[] = array('title' => 'LDAP UI Options', value => $info['ldapauth']['ldapauth_disable_pass_change_text'] . "<br/>" . $info['ldapauth']['ldapauth_alter_email_field_text'], 'severity' => "0"); |
|
165 | 165 |
|
166 | 166 |
return $status; |
167 | 167 |
} |
... | ... | |
192 | 192 |
// array("\r\n","\r\n","\r\n","\r\n","\r\n"),$item['value'] ); |
193 | 193 |
$item['value'] = str_replace(array_keys($replacements), array_values($replacements), $item['value'] ); |
194 | 194 |
$item['title'] = str_replace(array_keys($replacements), array_values($replacements), $item['title'] ); |
195 |
$content .= $item['title'] . $name_val_del . $item['value'] . $var_del;
|
|
195 |
$content .= $item['title'] . $name_val_del . $item['value'] . $var_del; |
|
196 | 196 |
} |
197 | 197 |
return $content; |
198 | 198 |
} |
... | ... | |
216 | 216 |
$s = preg_replace('/<td[^>]*>([^<]+)<\/td>/', "<info>\\1</info>", $s); |
217 | 217 |
$vtmp = preg_split('/(<h2>[^<]+<\/h2>)/', $s, -1, PREG_SPLIT_DELIM_CAPTURE); |
218 | 218 |
$vmodules = array(); |
219 |
for ($i=1; $i<count($vtmp); $i++) {
|
|
219 |
for ($i = 1; $i < count($vtmp); $i++) {
|
|
220 | 220 |
if (preg_match('/<h2>([^<]+)<\/h2>/', $vtmp[$i], $vmat)) { |
221 | 221 |
$vname = trim($vmat[1]); |
222 |
$vtmp2 = explode("\n", $vtmp[$i+1]);
|
|
222 |
$vtmp2 = explode("\n", $vtmp[$i + 1]);
|
|
223 | 223 |
foreach ($vtmp2 AS $vone) { |
224 | 224 |
$vpat = '<info>([^<]+)<\/info>'; |
225 | 225 |
$vpat3 = "/$vpat\s*$vpat\s*$vpat/"; |
... | ... | |
292 | 292 |
); |
293 | 293 |
} |
294 | 294 |
|
295 |
$ldaps = (strpos(drupal_strtolower($server_object->address), 'ldaps') !== FALSE) ? 'y' : 'n';
|
|
295 |
$ldaps = (strpos(drupal_strtolower($server_object->address), 'ldaps') !== FALSE) ? 'y' : 'n'; |
|
296 | 296 |
$servers[$sid][] = array( |
297 | 297 |
'title' => 'ldaps in address', |
298 | 298 |
'value' => $ldaps, |
... | ... | |
443 | 443 |
break; |
444 | 444 |
} |
445 | 445 |
if ($items[$fieldset_name][$field_name] == 'empty') { |
446 |
$value = ((boolean)trim($value)) ? 'populated': 'empty';
|
|
446 |
$value = ((boolean)trim($value)) ? 'populated' : 'empty';
|
|
447 | 447 |
} |
448 | 448 |
$status[] = array( |
449 | 449 |
'title' => $field_name, |
Formats disponibles : Unified diff
Weekly update of contrib modules