Commit bd0cbb7c authored by Carsten  Rose's avatar Carsten Rose
Browse files

#4399 / Do not render '_pdf' when r:5 or empty string

Fixed
parent bb8f8faa
......@@ -268,7 +268,7 @@ class Report {
/**
* Sorts the associative array.
*
* @param array $ary : The unsorted Level Array
* @param array $ary : The unsorted Level Array
* @param string $clause : the sort argument 0 ASC, 1 ASC... according to the number of columns
* @param bool|true $ascending
*/
......@@ -360,7 +360,7 @@ class Report {
*
* @param int $cur_level Which level it will call [10] = level 1, [10.10] = level 2 ...
* @param string $super_level_array The Value-Array of the indexarray [0=>10, 1=>50]
* @param int $counter The outer numeric Arraykey of indexarray
* @param int $counter The outer numeric Arraykey of indexarray
*
* @return string The content that is displayed on the website
* @throws codeException
......@@ -512,11 +512,11 @@ class Report {
* 3) if none above take default
* Set value on $full_level
*
* @param string $level_key - 'db' or 'debug'
* @param string $level_key - 'db' or 'debug'
* @param string $full_super_level - f.e.: 10.10.
* @param string $full_level - f.e.: 10.10.10.
* @param string $cur_level - f.e.: 2
* @param string $default - f.e.: 0
* @param string $cur_level - f.e.: 2
* @param string $default - f.e.: 0
*
* @return string The calculated value.
*/
......@@ -539,8 +539,8 @@ class Report {
/**
* Steps through 'row' and collects all columns
*
* @param array $row Recent row fetch from sql resultset.
* @param array $keys List of all columnnames
* @param array $row Recent row fetch from sql resultset.
* @param array $keys List of all columnnames
* @param string $full_level Recent position to work on.
* @param string $rowIndex Index of recent row in resultset.
*
......@@ -1093,6 +1093,11 @@ class Report {
* @throws CodeException
*/
private function doDownload($columnName, $columnValue) {
if ($columnValue == '') {
return '';
}
$columNameToMode = [COLUMN_PDF => DOWNLOAD_MODE_PDF, COLUMN_FILE => DOWNLOAD_MODE_FILE, COLUMN_ZIP => DOWNLOAD_MODE_ZIP];
$param = explode('|', $columnValue);
......@@ -1121,6 +1126,12 @@ class Report {
$defaultMode = '';
break;
case TOKEN_RENDER:
if (isset($key[2]) && $key[2] == '5') {
return '';
}
break;
default:
break;
}
......
Supports Markdown
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