Commit 92b72635 authored by Jyhem's avatar Jyhem

[FIX] Using FILE plugin in a page would mess the var of the page (it broke...

[FIX] Using FILE plugin in a page would mess the  var of the page (it broke logic in showing the Comments button in page_bar)
parent 8b945316
......@@ -174,14 +174,14 @@ function wikiplugin_file( $data, $params )
return tra('No such file');
}
} else {
$info = $filegallib->get_file_info($fileId, false, false);
if (empty($info)) {
$file_info = $filegallib->get_file_info($fileId, false, false);
if (empty($file_info)) {
return tra('Incorrect parameter').' fileId';
}
}
if (empty($data)) { // to avoid problem with parsing
$data = empty($info['name'])?$info['filename']: $info['name'];
$data = empty($file_info['name'])?$file_info['filename']: $file_info['name'];
}
if (isset($params['showicon']) && $params['showicon'] == "y") {
return "{img src=tiki-download_file.php?fileId=$fileId&thumbnail=y&x=16 link=tiki-download_file.php?fileId=$fileId responsive='n'} [tiki-download_file.php?fileId=$fileId|$data]";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment