Filebrowser: preview/download doesn't work in 2nd languages

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
cmb
Posts: 14227
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Filebrowser: preview/download doesn't work in 2nd languages

Post by cmb » Wed Dec 10, 2014 10:36 pm

Hello Community,

I just found out that the preview resp. download of files doesn't work in the internal filebrowser ("cmsbrowser") for second languages. The problem is that the files are linked relative to the including index.php instead of the base folder. The fix is rather simple:

Code: Select all

Index: classes/Filebrowser_View.php
===================================================================
--- classes/Filebrowser_View.php	(revision 3)
+++ classes/Filebrowser_View.php	(working copy)
@@ -421,7 +421,7 @@
                 . $_XH_csrfProtection->tokenInput()
                 . '</form>'
                 . '<a style="position:relative" class="xhfbfile" href="'
-                . $this->currentDirectory . $file . '" target="_blank">' . $file;
+                . $this->basePath . $this->currentDirectory . $file . '" target="_blank">' . $file;
 
             $ffn = $base . $fb->currentDirectory . $file;
             $usage = array_key_exists($ffn, $imgs)
Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14227
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Filebrowser: preview/download doesn't work in 2nd langua

Post by cmb » Sun Dec 28, 2014 5:08 pm

Done (r1419).
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply