Shout: Use registry, not injector
authorBen Klang <ben@alkaloid.net>
Wed, 24 Mar 2010 21:09:05 +0000 (17:09 -0400)
committerBen Klang <ben@alkaloid.net>
Wed, 24 Mar 2010 21:11:01 +0000 (17:11 -0400)
shout/lib/Forms/DeviceForm.php
shout/lib/Forms/ExtensionForm.php
shout/lib/Forms/MenuForm.php

index df4317f..b9d8cc6 100644 (file)
@@ -44,7 +44,7 @@ class DeviceDetailsForm extends Horde_Form {
 
     public function execute()
     {
-        $shout = $GLOBALS['injector']->getInstance('shout', 'application');
+        $shout = $GLOBALS['registry']->getApiInstance('shout', 'application');
 
         $action = $this->_vars->get('action');
         $account = $this->_vars->get('account');
@@ -110,7 +110,7 @@ class DeviceDeleteForm extends Horde_Form
 
     function execute()
     {
-        $shout = $GLOBALS['injector']->getInstance('shout', 'application');
+        $shout = $GLOBALS['registry']->getApiInstance('shout', 'application');
         $account = $this->_vars->get('account');
         $devid = $this->_vars->get('devid');
         $shout->devices->deleteDevice($account, $devid);
index 4c3acba..632911f 100644 (file)
@@ -21,9 +21,6 @@ class ExtensionDetailsForm extends Horde_Form {
      */
     function __construct(&$vars)
     {
-        $shout = $GLOBALS['injector']->getInstance('shout', 'application');
-
-
         $account = $_SESSION['shout']['curaccount'];
         $action = $vars->get('action');
         if ($action == 'edit') {
@@ -58,7 +55,7 @@ class ExtensionDetailsForm extends Horde_Form {
      */
     function execute()
     {
-        $shout = $GLOBALS['injector']->getInstance('shout', 'application');
+        $shout = $GLOBALS['registry']->getApiInstance('shout', 'application');
 
         $extension = $this->_vars->get('extension');
         $account = $this->_vars->get('account');
@@ -96,7 +93,7 @@ class ExtensionDeleteForm extends Horde_Form
 
     function execute()
     {
-        $shout = $GLOBALS['injector']->getInstance('shout', 'application');
+        $shout = $GLOBALS['registry']->getApiInstance('shout', 'application');
         $account = $this->_vars->get('account');
         $extension = $this->_vars->get('extension');
         $shout->extensions->deleteExtension($account, $extension);
index f23e6e2..93a62c8 100644 (file)
@@ -42,7 +42,7 @@ class MenuForm extends Horde_Form {
 
     public function execute()
     {
-        $shout = $GLOBALS['injector']->getInstance('shout', 'application');
+        $shout = $GLOBALS['registry']->getApiInstance('shout', 'application');
 
         $account = $_SESSION['shout']['curaccount'];
 
@@ -79,7 +79,7 @@ class DeviceMenuForm extends Horde_Form
 
     function execute()
     {
-        $shout = $GLOBALS['injector']->getInstance('shout', 'application');
+        $shout = $GLOBALS['registry']->getApiInstance('shout', 'application');
         $account = $this->_vars->get('account');
         $menu = $this->_vars->get('menu');
         $shout->devices->deleteMenu($account, $menu);