MDL-19380 uploadlib cleanup before readding of antivirus integration

This commit is contained in:
Petr Skoda
2010-07-14 08:40:48 +00:00
parent d354ba0965
commit f728d49b00
15 changed files with 50 additions and 187 deletions
+5 -9
View File
@@ -43,7 +43,7 @@ class user_editadvanced_form extends moodleform {
$auth_options[$auth] = get_string('pluginname', "auth_{$auth}");
}
$mform->addElement('select', 'auth', get_string('chooseauthmethod','auth'), $auth_options);
$mform->addHelpButton('auth', 'chooseauthmethod', 'auth');
$mform->addHelpButton('auth', 'chooseauthmethod', 'auth');
if (!empty($CFG->passwordpolicy)){
$mform->addElement('static', 'passwordpolicyinfo', '', print_password_policy());
@@ -117,9 +117,9 @@ class user_editadvanced_form extends moodleform {
global $CFG, $DB;
$usernew = (object)$usernew;
$usernew->username = trim($usernew->username);
$user = $DB->get_record('user', array('id'=>$usernew->id));
$usernew->username = trim($usernew->username);
$user = $DB->get_record('user', array('id'=>$usernew->id));
$err = array();
if (!empty($usernew->newpassword)) {
@@ -137,7 +137,7 @@ class user_editadvanced_form extends moodleform {
if ($DB->record_exists('user', array('username'=>$usernew->username, 'mnethostid'=>$CFG->mnet_localhost_id))) {
$err['username'] = get_string('usernameexists');
}
//check allowed characters
//check allowed characters
if ($usernew->username !== moodle_strtolower($usernew->username)) {
$err['username'] = get_string('usernamelowercase');
} else {
@@ -164,10 +164,6 @@ class user_editadvanced_form extends moodleform {
return $err;
}
}
function get_um() {
return $this->_upload_manager;
}
}