Fix #101
This commit is contained in:
parent
ad6cb61b3b
commit
f81bbe60fe
@ -53,7 +53,7 @@ class DocumentController extends Controller{
|
||||
|
||||
$filename = isset($sessionData['genesis_url']) ? $sessionData['genesis_url'] : '';
|
||||
$documentsView = new View('/' . $sessionData['owner']);
|
||||
$download = new Download($documentsView->initDocumentsView(), $filename);
|
||||
$download = new Download($documentsView->initDocumentsView($sessionData['owner']), $filename);
|
||||
$download->sendResponse();
|
||||
}
|
||||
|
||||
@ -90,4 +90,4 @@ class DocumentController extends Controller{
|
||||
|
||||
\OCP\JSON::success(array('documents' => $documents,'sessions' => $sessions,'members' => $members));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ class Db_Session extends \OCA\Documents\Db {
|
||||
list($ownerView, $path) = $file->getOwnerViewAndPath();
|
||||
|
||||
// Create a directory to store genesis
|
||||
$docView = $ownerView->initDocumentsView();
|
||||
$docView = $ownerView->initDocumentsView($file->getOwner());
|
||||
|
||||
$oldSession = new Db_Session();
|
||||
$oldSession->loadBy('file_id', $file->getFileId());
|
||||
|
10
lib/view.php
10
lib/view.php
@ -15,12 +15,12 @@ class View extends \OC\Files\View{
|
||||
const DOCUMENTS_DIRNAME='/documents';
|
||||
protected static $documentsView;
|
||||
|
||||
public function initDocumentsView(){
|
||||
if (!$this->is_dir(self::DOCUMENTS_DIRNAME)) {
|
||||
$this->mkdir(self::DOCUMENTS_DIRNAME);
|
||||
public function initDocumentsView($owner){
|
||||
$ownerView = new View('/' . $owner);
|
||||
if (!$ownerView->is_dir(self::DOCUMENTS_DIRNAME)) {
|
||||
$ownerView->mkdir(self::DOCUMENTS_DIRNAME);
|
||||
}
|
||||
|
||||
return new \OC\Files\View( $this->getRoot() . self::DOCUMENTS_DIRNAME);
|
||||
return $ownerView;
|
||||
}
|
||||
|
||||
public function getFilePermissions($path){
|
||||
|
Loading…
x
Reference in New Issue
Block a user