From: Michael J. Rubinsky Date: Sat, 5 Jun 2010 21:03:21 +0000 (-0400) Subject: get the Ansel_Storage instance from the injector. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=23999429fbb287e301fbb98d03571d61b8e757af;p=horde.git get the Ansel_Storage instance from the injector. Yes, it's still global - that part still needs refactoring. --- 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