From 23999429fbb287e301fbb98d03571d61b8e757af Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Sat, 5 Jun 2010 17:03:21 -0400 Subject: [PATCH] get the Ansel_Storage instance from the injector. Yes, it's still global - that part still needs refactoring. --- ansel/lib/Api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansel/lib/Api.php b/ansel/lib/Api.php index fef884928..f46e6dbbf 100644 --- a/ansel/lib/Api.php +++ b/ansel/lib/Api.php @@ -721,7 +721,7 @@ class Ansel_Api extends Horde_Registry_Api /* If no app is given use Ansel's own gallery which is initialized in base.php */ if (!is_null($app)) { - $GLOBALS['ansel_storage'] = new Ansel_Storage($app); + $GLOBALS['ansel_storage'] = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope($app); } return Ansel::selectGalleries($default, $perm, null, $parent, $allLevels, @@ -755,7 +755,7 @@ class Ansel_Api extends Horde_Registry_Api /* If no app is given use Ansel's own gallery which is initialized in base.php */ if (!is_null($app)) { - $GLOBALS['ansel_storage'] = new Ansel_Storage($app); + $GLOBALS['ansel_storage'] = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope($app); } /* Determine the default gallery when none is given. The first gallery in -- 2.11.0