"MDL-15350, boxnet plugin, assign session name before calling parent construct function"

This commit is contained in:
dongsheng 2009-05-29 09:17:51 +00:00
parent 7d554b649a
commit a36670da44

View File

@ -24,10 +24,10 @@ class repository_boxnet extends repository {
$options['username'] = optional_param('boxusername', '', PARAM_RAW);
$options['password'] = optional_param('boxpassword', '', PARAM_RAW);
$options['ticket'] = optional_param('ticket', '', PARAM_RAW);
parent::__construct($repositoryid, $context, $options);
$this->api_key = $this->get_option('api_key');
$sess_name = 'box_token'.$this->id;
$this->sess_name = 'box_token'.$this->id;
parent::__construct($repositoryid, $context, $options);
$this->api_key = $this->get_option('api_key');
// do login
if(!empty($options['username']) && !empty($options['password']) && !empty($options['ticket']) ) {
$this->box = new boxclient($this->api_key);