From 59a2616105e82d3f17d3eea188ce79fbc107eafa Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Thu, 10 May 2012 23:04:27 -0400 Subject: [PATCH] Fix music file action i.e. click to play, make OC.filePath act like OC_Helper::linkTo() for index.php links --- apps/media/templates/player.php | 1 - core/js/js.js | 11 +++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/media/templates/player.php b/apps/media/templates/player.php index 4d478ec5f5..6c14006f83 100755 --- a/apps/media/templates/player.php +++ b/apps/media/templates/player.php @@ -1,6 +1,5 @@ printPage(); exit; diff --git a/core/js/js.js b/core/js/js.js index 4b0978cfb5..90f1207780 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -54,11 +54,14 @@ OC={ var isCore=OC.coreApps.indexOf(app)!=-1; var link=OC.webroot; if((file.substring(file.length-3) == 'php' || file.substring(file.length-3) == 'css') && !isCore){ - link+='/?app=' + app + '&getfile='; - if(type){ - link+=encodeURI(type + '/'); + link+='/?app=' + app; + if (file != 'index.php') { + link+='&getfile='; + if(type){ + link+=encodeURI(type + '/'); + } + link+= file; } - link+= file; }else if(file.substring(file.length-3) != 'php' && !isCore){ link=OC.appswebroot; link+='/';