Fix notifications php and id in template.

Pending to generate the list with all the graphs, both those configured in the configuration file and those configured in the mysql database.
This commit is contained in:
Jaiver Pastor 2020-05-05 13:13:41 +02:00
parent e3e099680c
commit c6f80b6f87

View File

@ -436,7 +436,7 @@ if ( !isset($_POST['op']) && !isset($_GET['op']) )
{
// --- Set Image for Type
// NonNUMERIC are config files Sources, can not be editied
if ( is_numeric($myChart['ID']) )
if ( ( isset($myChart['ID']) ) && ( is_numeric($myChart['ID']) ) )
{
// Allow EDIT
$myChart['ActionsAllowed'] = true;
@ -467,6 +467,9 @@ if ( !isset($_POST['op']) && !isset($_GET['op']) )
}
else
{
// define empty ID to update the template correctly.
$myChart['ID'] = "";
// Disallow EDIT
$myChart['ActionsAllowed'] = false;
@ -507,9 +510,9 @@ if ( !isset($_POST['op']) && !isset($_GET['op']) )
// ---
// --- Set Chart default Filterstring
if ( strlen($myChart['chart_defaultfilter']) > 0 )
if ( ( isset($myChart['chart_defaultfilter']) ) && ( strlen($myChart['chart_defaultfilter']) > 0 ) )
$myChart['chart_defaultfilter_urldecoded'] = urlencode($myChart['chart_defaultfilter']);
else
$myChart['chart_defaultfilter_urldecoded'] = "";