Fix preview URLs

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/2037/head
Joas Schilling 8 years ago committed by Roeland Jago Douma
parent 5f15020b9b
commit 9296038d78
No known key found for this signature in database
GPG Key ID: 1E152838F164D13B

@ -186,14 +186,14 @@ function mimetype_icon( $mimetype ) {
* @return link to the preview
*/
function preview_icon( $path ) {
return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_preview', ['x' => 32, 'y' => 32, 'file' => $path]);
return \OC::$server->getURLGenerator()->linkToRoute('core.Preview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path]);
}
/**
* @param string $path
*/
function publicPreview_icon ( $path, $token ) {
return \OC::$server->getURLGenerator()->linkToRoute('core_ajax_public_preview', ['x' => 32, 'y' => 32, 'file' => $path, 't' => $token]);
return \OC::$server->getURLGenerator()->linkToRoute('files_sharing.PublicPreview.getPreview', ['x' => 32, 'y' => 32, 'file' => $path, 't' => $token]);
}
/**

Loading…
Cancel
Save