Auth: Replace hardcoded strings: MDL-8069
This commit is contained in:
@@ -18,7 +18,7 @@ if (!isset($config->changepasswordurl)) {
|
||||
<table cellspacing="0" cellpadding="5" border="0" align="center">
|
||||
|
||||
<tr valign="top" class="required">
|
||||
<td align="right"> host: </td>
|
||||
<td align="right"><?php print_string('auth_imaphost_key', 'auth') ?>: </td>
|
||||
<td>
|
||||
<input name="host" type="text" size="30" value="<?php echo $config->host ?>" />
|
||||
<?php
|
||||
@@ -40,7 +40,7 @@ if (!isset($config->changepasswordurl)) {
|
||||
</tr>
|
||||
|
||||
<tr valign="top" class="required">
|
||||
<td align="right"> type: </td>
|
||||
<td align="right"><?php print_string('auth_imaptype_key', 'auth') ?>: </td>
|
||||
<td>
|
||||
<?php
|
||||
|
||||
@@ -56,7 +56,7 @@ if (!isset($config->changepasswordurl)) {
|
||||
</tr>
|
||||
|
||||
<tr valign="top" class="required">
|
||||
<td align="right"> port: </td>
|
||||
<td align="right"><?php print_string('auth_imapport_key', 'auth') ?>: </td>
|
||||
<td>
|
||||
<input name="port" type="text" size="6" value="<?php echo $config->port ?>" />
|
||||
<?php
|
||||
@@ -71,7 +71,7 @@ if (!isset($config->changepasswordurl)) {
|
||||
</tr>
|
||||
|
||||
<tr valign="top">
|
||||
<td align="right"> changepasswordurl: </td>
|
||||
<td align="right"><?php print_string('auth_imapchangepasswordurl_key', 'auth') ?>: </td>
|
||||
<td>
|
||||
<input name="changepasswordurl" type="text" value="<?php echo $config->changepasswordurl ?>" />
|
||||
<?php
|
||||
|
||||
+6
-6
@@ -82,7 +82,7 @@ class auth_plugin_ldap {
|
||||
}
|
||||
else {
|
||||
@ldap_close($ldapconnection);
|
||||
error("LDAP-module cannot connect to server: $this->config->host_url");
|
||||
print_error('auth_ldap_noconnect','auth',$this->config->host_url);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -249,7 +249,7 @@ class auth_plugin_ldap {
|
||||
$newuser['userpassword']=$plainpass;
|
||||
break;
|
||||
default:
|
||||
error('auth: ldap user_create() does not support selected usertype:"'.$this->config->user_type.'" (..yet)');
|
||||
print_error('auth_ldap_unsupportedusertype','auth',$this->config->user_type);
|
||||
}
|
||||
$uadd = $this->ldap_add($ldapconnection, "{$this->config->user_attribute}={$userobject->username},{$this->config->create_context}", $newuser);
|
||||
ldap_close($ldapconnection);
|
||||
@@ -428,7 +428,7 @@ class auth_plugin_ldap {
|
||||
|
||||
if (!$ldapconnection) {
|
||||
@ldap_close($ldapconnection);
|
||||
notify("LDAP-module cannot connect to server: $CFG->ldap_host_url");
|
||||
notify(get_string('auth_ldap_noconnect','auth',$this->config->host_url));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1224,7 +1224,7 @@ class auth_plugin_ldap {
|
||||
$result = $time * DAYSECS; //The shadowExpire contains the number of DAYS between 01/01/1970 and the actual expiration date
|
||||
break;
|
||||
default:
|
||||
error('config.user_type not defined or function ldap_expirationtime2unix does not support selected type!');
|
||||
print_error('auth_ldap_usertypeundefined', 'auth');
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
@@ -1245,7 +1245,7 @@ class auth_plugin_ldap {
|
||||
$result = $time ; //Already in correct format
|
||||
break;
|
||||
default:
|
||||
error('config.user_type not defined or function ldap_unixi2expirationtime does not support selected type!');
|
||||
print_error('auth_ldap_usertypeundefined2', 'auth');
|
||||
}
|
||||
return $result;
|
||||
|
||||
@@ -1366,7 +1366,7 @@ class auth_plugin_ldap {
|
||||
}
|
||||
|
||||
//If any of servers are alive we have already returned connection
|
||||
error("LDAP-module cannot connect any LDAP servers : $debuginfo");
|
||||
print_error('auth_ldap_noconnect_all','auth',$this->config->user_type);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -54,9 +54,7 @@
|
||||
$yesno = array( get_string('no'), get_string('yes') );
|
||||
|
||||
if (!function_exists('ldap_connect')) { // Is php4-ldap really there?
|
||||
print '<tr><td><p align="center"><font color="red"><strong>Warning:
|
||||
The PHP LDAP module does not seem to be present.
|
||||
Please ensure it is installed and enabled.</strong></font></p></td></tr>';
|
||||
notify(get_string('auth_ldap_noextension','auth'));
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@@ -112,6 +112,10 @@ $string['auth_imaphost'] = 'The IMAP server address. Use the IP number, not DNS
|
||||
$string['auth_imapport'] = 'IMAP server port number. Usually this is 143 or 993.';
|
||||
$string['auth_imaptitle'] = 'Use an IMAP server';
|
||||
$string['auth_imaptype'] = 'The IMAP server type. IMAP servers can have different types of authentication and negotiation.';
|
||||
$string['auth_imaptype_key'] = 'Type';
|
||||
$string['auth_imaphost_key'] = 'Host';
|
||||
$string['auth_imapport_key'] = 'Port';
|
||||
$string['auth_imapchangepasswordurl_key'] = 'Password-change URL';
|
||||
|
||||
// LDAP plugin
|
||||
$string['auth_ldap_bind_dn'] = 'If you want to use bind-user to search users, specify it here. Something like \'cn=ldapuser,ou=public,o=org\'';
|
||||
@@ -169,6 +173,12 @@ $string['auth_ldap_gracelogin_key'] = 'Grace login attribute';
|
||||
$string['auth_ldap_auth_user_create_key'] = 'Create users externally';
|
||||
$string['auth_ldap_create_context_key'] = 'Context for new users';
|
||||
$string['auth_ldap_creators_key'] = 'Creators';
|
||||
$string['auth_ldap_noconnect'] = 'LDAP-module cannot connect to server: $a';
|
||||
$string['auth_ldap_noconnect_all'] = 'LDAP-module cannot connect to any servers: $a';
|
||||
$string['auth_ldap_unsupportedusertype'] = 'auth: ldap user_create() does not support selected usertype:"$a" (..yet)';
|
||||
$string['auth_ldap_usertypeundefined'] = 'config.user_type not defined or function ldap_expirationtime2unix does not support selected type!';
|
||||
$string['auth_ldap_usertypeundefined2'] = 'config.user_type not defined or function ldap_unixi2expirationtime does not support selected type!';
|
||||
$string['auth_ldap_noextension'] = 'Warning: The PHP LDAP module does not seem to be present. Please ensure it is installed and enabled.';
|
||||
|
||||
$string['auth_ldapextrafields'] = 'These fields are optional. You can choose to pre-fill some Moodle user fields with information from the <b>LDAP fields</b> that you specify here. <p>If you leave these fields blank, then nothing will be transferred from LDAP and Moodle defaults will be used instead.</p><p>In either case, the user will be able to edit all of these fields after they log in.</p>';
|
||||
$string['auth_ldaptitle'] = 'Use an LDAP server';
|
||||
|
||||
Reference in New Issue
Block a user