enable shared view of the same document
This commit is contained in:
parent
fafd5e8cf7
commit
7e43957711
@ -143,13 +143,15 @@ class DocumentController extends Controller{
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = $view->file_get_contents($path);
|
|
||||||
|
|
||||||
// copy; the first user gets a predictable filename so that cloudsuite
|
|
||||||
// uses the tile cache, others get tempnam
|
|
||||||
$filename = dirname(__DIR__) . self::CLOUDSUITE_TMP_PATH . 'ccs-' . $fileId;
|
$filename = dirname(__DIR__) . self::CLOUDSUITE_TMP_PATH . 'ccs-' . $fileId;
|
||||||
if (file_exists($filename))
|
if (file_exists($filename)) {
|
||||||
$filename = tempnam(dirname(__DIR__) . self::CLOUDSUITE_TMP_PATH, 'ccs-' . $fileId . '-');
|
return array(
|
||||||
|
'status' => 'success', 'filename' => $filename,
|
||||||
|
'basename' => basename($filename)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$content = $view->file_get_contents($path);
|
||||||
|
|
||||||
file_put_contents($filename, $content);
|
file_put_contents($filename, $content);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user