* evaluate if the user did filter in the report and if he is allowed to filter (shared reports) * * @param $metadata * @param $filteroptions * @param $dataoptions * @param $chartoptions * @param $tableoptions * @return mixed */
($metadata, $filteroptions, $dataoptions, $chartoptions, $tableoptions)
| 367 | * @return mixed |
| 368 | */ |
| 369 | private function evaluateCanFilter($metadata, $filteroptions, $dataoptions, $chartoptions, $tableoptions) { |
| 370 | // send current user filter options to the data request |
| 371 | // only if the report has update-permissions |
| 372 | // if nothing is changed by the user, the filter which is stored for the report, will be used |
| 373 | if ($filteroptions and $filteroptions !== '' and (int)$metadata['permissions'] === Constants::PERMISSION_UPDATE) { |
| 374 | $metadata['filteroptions'] = $filteroptions; |
| 375 | $metadata['dataoptions'] = $dataoptions; |
| 376 | $metadata['chartoptions'] = $chartoptions; |
| 377 | $metadata['tableoptions'] = $tableoptions; |
| 378 | } |
| 379 | return $metadata; |
| 380 | } |
| 381 | |
| 382 | |
| 383 | /** |
no outgoing calls
no test coverage detected