MDL-15350, fix a bug in boxnet plugin

This commit is contained in:
dongsheng 2008-07-29 03:21:26 +00:00
parent 1101dac08d
commit fdca53eaf1
2 changed files with 2 additions and 3 deletions

View File

@ -104,6 +104,7 @@ var create_cb = {
}
if(ret == 200) {
alert('Create Repository Instances successfully!');
location.reload();
btn.value='Done';
} else {
alert('Failed to create repository instances.');

View File

@ -58,9 +58,7 @@ class repository_boxnet extends repository{
public function get_login(){
global $DB;
$repository = new stdclass;
$repository->id = $this->repositoryid;
if ($entry = $DB->get_record('repository', $repository)) {
if ($entry = $DB->get_record('repository', array('id'=>$this->repositoryid))) {
$ret->username = $entry->username;
$ret->password = $entry->password;
}