cleanup
This commit is contained in:
parent
9c4da055a8
commit
89f2dd905f
@ -127,8 +127,9 @@ var odfViewer = {
|
||||
$.ajax({type: 'GET',
|
||||
url: OC.filePath('richdocuments', 'ajax', 'generate.php'),
|
||||
data: {id: context.$file.attr('data-id')},
|
||||
async: false, success: function(result) {
|
||||
if(result.status=="success"){
|
||||
async: false,
|
||||
success: function(result) {
|
||||
if(result.status==='success'){
|
||||
var $chatroom = $('<div />');
|
||||
$chatroom.attr('id','chatroom');
|
||||
$chatroom.data('chatroom-password',result.password);
|
||||
|
@ -260,7 +260,8 @@ class DocumentController extends Controller {
|
||||
if (empty($id)) {
|
||||
return array(
|
||||
'status' => 'error',
|
||||
'message' => 'no id received');
|
||||
'message' => 'no id received'
|
||||
);
|
||||
}
|
||||
$view = \OC\Files\Filesystem::getView();
|
||||
try {
|
||||
@ -273,16 +274,19 @@ class DocumentController extends Controller {
|
||||
return array(
|
||||
'status' => 'success',
|
||||
'password' => $chatRoomPassword,
|
||||
'name' => $chatRoomName);
|
||||
'name' => $chatRoomName
|
||||
);
|
||||
} else {
|
||||
return array(
|
||||
'status' => 'error',
|
||||
'message' => 'user unauthorised to view file');
|
||||
'message' => 'user unauthorised to view file'
|
||||
);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return array(
|
||||
'status' => 'error',
|
||||
'message' => 'user unauthorised to view file');
|
||||
'message' => 'user unauthorised to view file'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user