Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
"MDL-23072, rename class variable"
  • Loading branch information
Dongsheng Cai committed Jul 28, 2010
1 parent dc45a43 commit e8c3e06
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions repository/alfresco/lib.php
Expand Up @@ -28,10 +28,10 @@
*/

class repository_alfresco extends repository {
private $instance = null;
private $ticket = null;
private $user_session = null;
private $store = null;
private $alfresco;

public function __construct($repositoryid, $context = SYSCONTEXTID, $options = array()) {
global $SESSION, $CFG;
Expand All @@ -42,27 +42,27 @@ public function __construct($repositoryid, $context = SYSCONTEXTID, $options = a
require_once($CFG->libdir . '/alfresco/Service/Session.php');
require_once($CFG->libdir . '/alfresco/Service/SpacesStore.php');
require_once($CFG->libdir . '/alfresco/Service/Node.php');
// setup alfresco instance
// setup alfresco
$server_url = '';
if (!empty($this->options['alfresco_url'])) {
$server_url = $this->options['alfresco_url'];
} else {
return;
}
$this->instance = new Alfresco_Repository($this->options['alfresco_url']);
$this->alfresco = new Alfresco_Repository($this->options['alfresco_url']);
$this->username = optional_param('al_username', '', PARAM_RAW);
$this->password = optional_param('al_password', '', PARAM_RAW);
try{
// deal with user logging in
if (empty($SESSION->{$this->sessname}) && !empty($this->username) && !empty($this->password)) {
$this->ticket = $this->instance->authenticate($this->username, $this->password);
$this->ticket = $this->alfresco->authenticate($this->username, $this->password);
$SESSION->{$this->sessname} = $this->ticket;
} else {
if (!empty($SESSION->{$this->sessname})) {
$this->ticket = $SESSION->{$this->sessname};
}
}
$this->user_session = $this->instance->createSession($this->ticket);
$this->user_session = $this->alfresco->createSession($this->ticket);
$this->store = new SpacesStore($this->user_session);
} catch (Exception $e) {
$this->logout();
Expand Down

0 comments on commit e8c3e06

Please sign in to comment.