Skip to content

Commit

Permalink
Fix undefined title
Browse files Browse the repository at this point in the history
Fix displayresults for validation line graph
Add entities fields for TTO / TTR pie
Add 2 graphs for TTR / TTO evolution
  • Loading branch information
tsmr committed Oct 9, 2023
1 parent 57eaab9 commit 4030dcf
Show file tree
Hide file tree
Showing 5 changed files with 1,251 additions and 904 deletions.
5 changes: 4 additions & 1 deletion inc/module.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,10 @@ public function getWidgetIsOnlyHTML()
public function setWidgetTitle($nTitle)
{
// $this->widgetTitle = addslashes($nTitle);
return $this->widgetTitle = str_replace(["\""], ["'"], $nTitle);
if ($nTitle) {
return $this->widgetTitle = str_replace(["\""], ["'"], $nTitle);
}

}

/**
Expand Down
9 changes: 6 additions & 3 deletions reports/alert.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,13 @@ public static function countForAlerts($public, $type, $itilcategories_id = [])
} else {
$query .= "AND `glpi_plugin_mydashboard_alerts`.`is_public`";
}

$nb = 0;
$result = $DB->query($query);
$ligne = $DB->fetchAssoc($result);
$nb = $ligne['cpt'];
if ($DB->numrows($result) > 0) {
$ligne = $DB->fetchAssoc($result);
$nb = $ligne['cpt'];
}


return $nb;
}
Expand Down
Loading

0 comments on commit 4030dcf

Please sign in to comment.