Chart generator bug solution
This commit is contained in:
parent
47c67ff131
commit
1e2657fed3
|
@ -2633,7 +2633,8 @@ $class = 'databox filters';
|
|||
'render_definition',
|
||||
3,
|
||||
25,
|
||||
$render_definition
|
||||
$render_definition,
|
||||
'style=width:100%'
|
||||
);
|
||||
?>
|
||||
</td>
|
||||
|
|
|
@ -47,6 +47,7 @@ if (json_last_error() === JSON_ERROR_NONE) {
|
|||
$data = $data_decoded['data'];
|
||||
$session_id = $data_decoded['session_id'];
|
||||
$type_graph_pdf = $data_decoded['type_graph_pdf'];
|
||||
$id_user = $data_decoded['id_user'];
|
||||
|
||||
$data_combined = [];
|
||||
if (isset($data_decoded['data_combined']) === true) {
|
||||
|
@ -62,6 +63,10 @@ if (json_last_error() === JSON_ERROR_NONE) {
|
|||
// Initialize session.
|
||||
global $config;
|
||||
|
||||
// Care whit this!!! check_login not working if you remove this.
|
||||
$config['id_user'] = $id_user;
|
||||
$_SESSION['id_usuario'] = $id_user;
|
||||
|
||||
// Try to initialize session using existing php session id.
|
||||
$user = new PandoraFMS\User(['phpsessionid' => $session_id]);
|
||||
if (check_login(false) === false) {
|
||||
|
@ -82,6 +87,7 @@ if (check_login(false) === false) {
|
|||
</head>
|
||||
<body>
|
||||
<h1>Access is not granted</h1>
|
||||
<div id="container-chart-generator-item" style="display:none; margin:0px;">
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
|
@ -4264,12 +4264,14 @@ function generator_chart_to_pdf(
|
|||
'type_graph_pdf' => $type_graph_pdf,
|
||||
'data_module_list' => $module_list,
|
||||
'data_combined' => $params_combined,
|
||||
'id_user' => $config['id_user'],
|
||||
];
|
||||
} else {
|
||||
$data = [
|
||||
'data' => $params,
|
||||
'session_id' => $session_id,
|
||||
'type_graph_pdf' => $type_graph_pdf,
|
||||
'id_user' => $config['id_user'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -54,10 +54,10 @@ class User extends Entity implements PublicLogin
|
|||
/**
|
||||
* Initializes a user object.
|
||||
*
|
||||
* @param string|null $id_user User id.
|
||||
* @param mixed $id_user User id.
|
||||
* - Username
|
||||
*/
|
||||
public function __construct(?string $id_user)
|
||||
public function __construct($id_user)
|
||||
{
|
||||
$this->table = 'tusuario';
|
||||
|
||||
|
|
Loading…
Reference in New Issue