From 7006ff997bb565b47663061e35bd708056a9ab90 Mon Sep 17 00:00:00 2001 From: Michael J Rubinsky Date: Tue, 26 Nov 2013 13:08:40 -0500 Subject: [PATCH] Fix property name, phpdoc. --- hermes/lib/Hermes.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hermes/lib/Hermes.php b/hermes/lib/Hermes.php index 5a3b39221dd..29f12cf8317 100644 --- a/hermes/lib/Hermes.php +++ b/hermes/lib/Hermes.php @@ -228,6 +228,17 @@ public static function getEmployeesType($enumtype = 'multienum') return array($enumtype, $employees); } + /** + * Return a cost object hash. + * + * @param string $id The cost object id. + * + * @return array The cost object hash. Keys differ depending on the + * API queried, but should always contain: + * - id: + * - name: + * @throws Horde_ExceptionNotFound + */ public static function getCostObjectByID($id) { static $cost_objects; @@ -458,7 +469,8 @@ public static function getTimer($id) $timers[$id]['id'] = $id; try { - $timers[$id]['deliverable_text'] = Hermes::getCostObjectByID($timers[$id]['deliverable_id']); + $text = Hermes::getCostObjectByID($timers[$id]['deliverable_id']); + $timers[$id]['deliverable_text'] = $text['name']; } catch (Horde_Exception_NotFound $e) {} return $timers[$id];