Commit 54d9bb1d authored by Carsten  Rose's avatar Carsten Rose
Browse files

Bug 7514. AS ..pdf|..file|..link broken defaults. Refs #7514. Fixes pdf, file....

Bug 7514. AS ..pdf|..file|..link broken defaults. Refs #7514. Fixes pdf, file. 'link' seems still be broken.
parent 0c96401a
Pipeline #1251 passed with stage
in 1 minute and 48 seconds
......@@ -6355,7 +6355,7 @@ By using the `_link` column name:
* the option `d:...` initiate creating the download link and optional specifies an export filename,
* the optional `M:...` (Mode) specifies the export type (file, pdf, zip, export),
* setting `s:1` is mandatory for the download function,
* setting `s:1` is recommended for the download function (file / path name is hidden to the user),
* the alttext `a:...` specifies a message in the download popup.
By using `_pdf`, `_Pdf`, `_file`, `_File`, `_zip`, `_Zip`, `_excel` as column name, the options `d`, `M` and `s`
......
......@@ -1285,7 +1285,7 @@ class Report {
// Depending on the $columnName, get mode.
if (!isset($columNameToMode[$columnName])) {
throw new CodeException("Unexpected columnname: $columnName", ERROR_UNEXPECTED_TYPE);
throw new CodeException("Unexpected column name: $columnName", ERROR_UNEXPECTED_TYPE);
}
$defaultMode = TOKEN_DOWNLOAD_MODE . ':' . $columNameToMode[$columnName];
......@@ -1326,7 +1326,8 @@ class Report {
}
if ($defaultDownload !== '') {
$columnValue .= $defaultDownload . "|";
// Action 'Download' needs to be specified at the beginning
$columnValue = $defaultDownload . "|" . $columnValue;
}
if ($defaultMode !== '') {
......
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