diff --git a/helpdesk3/e_latest.php b/helpdesk3/e_latest.php index b9e6355..4b66674 100644 --- a/helpdesk3/e_latest.php +++ b/helpdesk3/e_latest.php @@ -3,9 +3,17 @@ include_lan(e_PLUGIN . HELPDESK_FOLDER . "/languages/admin/" . e_LANGUAGE . ".php"); include_lan(e_PLUGIN . HELPDESK_FOLDER . "/languages/" . e_LANGUAGE . ".php"); -$sql->db_Select("hdu_prefs"); -$hdu_row = $sql->db_Fetch(); -extract($hdu_row); +if (!isset($helpdesk_obj) || !is_object($helpdesk_obj)) +{ + require_once(e_PLUGIN . HELPDESK_FOLDER . "/includes/helpdesk_class.php"); + $helpdesk_obj = new helpdesk; +} + +$hduprefs_defaultres = $helpdesk_obj->hduprefs_defaultres; + +// $sql->db_Select("hdu_prefs"); +// $hdu_row = $sql->db_Fetch(); +// extract($hdu_row); $open_tickets = $sql->db_Count('hdunit', '(*)', "WHERE hdu_resolution='$hduprefs_defaultres' and hdu_closed=0"); if (empty($open_tickets)) @@ -18,5 +26,5 @@ $text .= HDU_197 . " " . $open_tickets; $text .= ''; - +//echo $text; ?>