You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
522 B
PHP
26 lines
522 B
PHP
<?php
|
|
|
|
namespace OCA\Office;
|
|
|
|
// Check if we are a user
|
|
\OCP\User::checkLoggedIn();
|
|
|
|
$genesis = @$_POST['genesis'];
|
|
|
|
$uid = \OCP\User::getUser();
|
|
$officeView = View::initOfficeView($uid);
|
|
if (!$officeView->file_exists($genesis)){
|
|
$genesisPath = View::storeDocument($uid, $genesis);
|
|
} else {
|
|
$genesisPath = $genesis;
|
|
}
|
|
|
|
if ($genesisPath){
|
|
$session = Session::getSessionByPath($genesisPath);
|
|
if (!$session){
|
|
$session = Session::addSession($genesisPath);
|
|
}
|
|
\OCP\JSON::success($session);
|
|
exit();
|
|
}
|
|
\OCP\JSON::error(); |