From 786305876903ba99e4557ba96381929fa1a45d88 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Tue, 20 Jul 2010 14:26:31 -0400 Subject: [PATCH] User the Injector to get Horde_Auth instances --- hermes/lib/Forms/Search.php | 4 ++-- hermes/lib/Forms/Time.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hermes/lib/Forms/Search.php b/hermes/lib/Forms/Search.php index e8f9b2439..0dd400526 100644 --- a/hermes/lib/Forms/Search.php +++ b/hermes/lib/Forms/Search.php @@ -164,8 +164,8 @@ class SearchForm extends Horde_Form { $criteria = array(); if ($perms->hasPermission('hermes:review', $GLOBALS['registry']->getAuth(), Horde_Perms::SHOW)) { if (!empty($info['employees'])) { - $auth = Horde_Auth::singleton($GLOBALS['conf']['auth']['driver']); - if (!$auth->capabilities['list']) { + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); + if (!$auth->hasCapability('list')) { $criteria['employee'] = explode(',', $info['employees']); } else { $criteria['employee'] = $info['employees']; diff --git a/hermes/lib/Forms/Time.php b/hermes/lib/Forms/Time.php index b12661ffb..f74ba01c5 100644 --- a/hermes/lib/Forms/Time.php +++ b/hermes/lib/Forms/Time.php @@ -285,7 +285,7 @@ class TimeReviewForm extends TimeForm { $employees = array(); require_once 'Horde/Identity.php'; - $auth = Horde_Auth::singleton($conf['auth']['driver']); + $auth = $GLOBALS['injector']->getInstance('Horde_Auth')->getAuth(); $users = $auth->listUsers(); if (!is_a($users, 'PEAR_Error')) { foreach ($users as $user) { -- 2.11.0