Reflect recent master changes
This commit is contained in:
parent
8f3bc0daa8
commit
d8cee62f76
@ -90,13 +90,16 @@ class DocumentController extends Controller{
|
|||||||
public static function listAll(){
|
public static function listAll(){
|
||||||
self::preDispatch();
|
self::preDispatch();
|
||||||
|
|
||||||
$documents = Storage::getDocuments();
|
$found = Storage::getDocuments();
|
||||||
|
|
||||||
$fileIds = array();
|
$fileIds = array();
|
||||||
|
$documents = array();
|
||||||
//$previewAvailable = \OCP\Preview::show($file);
|
foreach ($found as $key=>$document) {
|
||||||
foreach ($documents as $key=>$document) {
|
if (is_object($document)){
|
||||||
//\OCP\Preview::show($document['path']);
|
$documents[] = $document->getData();
|
||||||
|
} else {
|
||||||
|
$documents[$key] = $document;
|
||||||
|
}
|
||||||
$documents[$key]['icon'] = preg_replace('/\.png$/', '.svg', \OC_Helper::mimetypeIcon($document['mimetype']));
|
$documents[$key]['icon'] = preg_replace('/\.png$/', '.svg', \OC_Helper::mimetypeIcon($document['mimetype']));
|
||||||
$fileIds[] = $document['fileid'];
|
$fileIds[] = $document['fileid'];
|
||||||
}
|
}
|
||||||
|
@ -714,9 +714,9 @@ var Files = Files || {
|
|||||||
|
|
||||||
if ( $('#isPublic').length ) {
|
if ( $('#isPublic').length ) {
|
||||||
urlSpec.t = $('#dirToken').val();
|
urlSpec.t = $('#dirToken').val();
|
||||||
previewURL = OC.Router.generate('core_ajax_public_preview', urlSpec);
|
previewURL = OC.generateUrl('core_ajax_public_preview/{url_spec}', {url_spec : urlSpec});
|
||||||
} else {
|
} else {
|
||||||
previewURL = OC.Router.generate('core_ajax_preview', urlSpec);
|
previewURL = OC.generateUrl('core_ajax_preview/{url_spec}', {url_spec : urlSpec});
|
||||||
}
|
}
|
||||||
previewURL = previewURL.replace('(', '%28');
|
previewURL = previewURL.replace('(', '%28');
|
||||||
previewURL = previewURL.replace(')', '%29');
|
previewURL = previewURL.replace(')', '%29');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user