From: dongsheng Date: Mon, 28 Jul 2008 08:24:55 +0000 (+0000) Subject: "MDL-13766, repository settings page" X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=19add4c03a91fed02990b97d15eb08d5e7021eef;p=moodle.git "MDL-13766, repository settings page" --- diff --git a/lang/en_utf8/repository.php b/lang/en_utf8/repository.php new file mode 100644 index 0000000000..05932628a7 --- /dev/null +++ b/lang/en_utf8/repository.php @@ -0,0 +1,6 @@ +dirroot.'/repository/boxnet/'.'boxlibphp5.php'); class repository_boxnet extends repository{ private $box; + public $type = 'boxnet'; public function __construct($repositoryid, $context = SITEID, $options = array()){ global $SESSION, $action; @@ -55,6 +56,16 @@ class repository_boxnet extends repository{ parent::__construct($repositoryid, $context, $options); } + public function get_login(){ + global $DB; + $repository = new stdclass; + $repository->id = $this->repositoryid; + if ($entry = $DB->get_record('repository', $repository)) { + $ret->username = $entry->username; + $ret->password = $entry->password; + } + return $ret; + } public function get_listing($path = '/', $search = ''){ global $CFG; $list = array(); @@ -104,16 +115,17 @@ class repository_boxnet extends repository{ } else { $t = $this->box->getTicket(); if(empty($this->options['auth_token'])) { + $ret = $this->get_login(); $str = ''; $str .= '
'; $str .= ''; $str .= ''; $str .= '