]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix music file action i.e. click to play, make OC.filePath act like OC_Helper::linkTo...
authorMichael Gapczynski <GapczynskiM@gmail.com>
Fri, 11 May 2012 03:04:27 +0000 (23:04 -0400)
committerMichael Gapczynski <GapczynskiM@gmail.com>
Fri, 11 May 2012 03:04:27 +0000 (23:04 -0400)
apps/media/templates/player.php
core/js/js.js

index 4d478ec5f5093a929f5fb01852c002f4beba7db1..6c14006f831e73f3988ccb9a6b3a7a01fa49970e 100755 (executable)
@@ -1,6 +1,5 @@
 <?php
 if(!isset($_)){//allow the template to be loaded standalone
-       require_once '../../../lib/base.php';
        $tmpl = new OCP\Template( 'media', 'player');
        $tmpl->printPage();
        exit;
index 4b0978cfb5276f30c0efe95b8765da1448d8d43a..90f1207780d0eb75efb57760b4e6d02977093f48 100644 (file)
@@ -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+='/';