/**
  * Constructor
  *
  * @access protected
  * @param string $storage
  * @param array 	$options 	optional parameters
  */
 protected function __construct($store = 'none', $options = array())
 {
     //Need to destroy any existing sessions started with session.auto_start
     if (session_id()) {
         session_unset();
         session_destroy();
     }
     //set default sessios save handler
     ini_set('session.save_handler', 'files');
     //disable transparent sid support
     ini_set('session.use_trans_sid', '0');
     //create handler
     if ($store != 'none' || $store != 'file') {
         require_once FRAMEWORK . '/session/SessionStorage.class.php';
         $this->_store = SessionStorage::getInstance($store, $options);
     }
     //set options
     $this->_setOptions($options);
     //load the session
     $this->_start();
     //initialise the session
     $this->_setCounter();
     $this->_setTimers();
     $this->_state = 'active';
     // perform security checks
     $this->_validate();
 }
Example #2
0
 function __construct()
 {
     $this->_storage = SessionStorage::getInstance();
     if (isset($this->_storage->path->fileName)) {
         $this->_pathname = $this->_storage->path->filePath;
         $this->_name = $this->_storage->path->fileName;
     }
 }
Example #3
0
 public function init()
 {
     $this->_logger = Zend_Registry::get('logger');
     $this->_storage = SessionStorage::getInstance();
     $this->_user = new User();
     $this->view->loggedIn = $this->_user->loggedIn;
     $this->view->active = $this->_storage->project;
 }
Example #4
0
 /**
  * Constructor recreates current directory array
  */
 function __construct()
 {
     $this->_logger = Zend_Registry::get('logger');
     $this->_storage = SessionStorage::getInstance();
     $this->_pathBase = $this->_storage->getDataPath();
     //$this->_logger->log($this->_pathBase, Zend_Log::INFO);
     $this->_dirArray = $this->_storage->getDirArray();
     $this->_updatePath();
 }
Example #5
0
 function __construct()
 {
     $this->_db = Zend_Registry::get('dbAdapter');
     $this->_storage = SessionStorage::getInstance();
     $this->init();
 }
Example #6
0
 public function cloneRepo($name, $email, $owner, $uid)
 {
     $ownerPath2 = substr($this->_worktree, 0, -strlen(strrchr($this->_worktree, '/')));
     $ownerPath = substr($ownerPath2, 0, -strlen(strrchr($ownerPath2, '/'))) . '/' . $owner . '/';
     $clonePath = SessionStorage::getInstance()->getGitClonePath();
     $properPath = $this->_worktree;
     //worktree needs to be set up for ssh based git shells
     $this->_worktree = $clonePath;
     chdir($this->_worktree);
     $target = $uid;
     $this->_logger->log($clonePath, Zend_Log::INFO);
     $this->_logger->log($target, Zend_Log::INFO);
     $result = $this->_run(self::cloneRepo, array($ownerPath, $target));
     //after running clone the proper user folder should exist now
     $this->_worktree = $properPath;
     chdir($this->_worktree);
     $this->_run(self::config_name, $name);
     $this->_run(self::config_email, $email);
 }