From: Ben Klang Date: Wed, 24 Mar 2010 02:51:35 +0000 (-0400) Subject: Shout: Allow selecting devices by name X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=117db2d8e82a716a08b4b8ebdc7cdd55c3bdea23;p=horde.git Shout: Allow selecting devices by name --- diff --git a/shout/lib/Ajax/Application.php b/shout/lib/Ajax/Application.php index 092106131..df8eba9c3 100644 --- a/shout/lib/Ajax/Application.php +++ b/shout/lib/Ajax/Application.php @@ -60,7 +60,7 @@ class Shout_Ajax_Application extends Horde_Ajax_Application_Base $shout = $GLOBALS['registry']->getApiInstance('shout', 'application'); $shout->extensions->deleteDestination($account, $vars->extension, $vars->type, $vars->destination); - return $shout->extensions->getExtensions($account); + return $this->getDestinations(); } catch (Exception $e) { //FIXME: Create a way to notify the user of the failure. Horde::logMessage($e, 'ERR'); @@ -73,10 +73,10 @@ class Shout_Ajax_Application extends Horde_Ajax_Application_Base */ public function getDestinations() { - $vars = $this->_vars; - $shout = $GLOBALS['registry']->getApiInstance('shout', 'application'); - $account = $_SESSION['shout']['curaccount']; try { + $vars = $this->_vars; + $shout = $GLOBALS['registry']->getApiInstance('shout', 'application'); + $account = $_SESSION['shout']['curaccount']; return $shout->extensions->getExtensions($account); } catch (Exception $e) { //FIXME: Create a way to notify the user of the failure. @@ -85,6 +85,20 @@ class Shout_Ajax_Application extends Horde_Ajax_Application_Base } } + public function getDevices() + { + try { + $vars = $this->_vars; + $shout = $GLOBALS['registry']->getApiInstance('shout', 'application'); + $account = $_SESSION['shout']['curaccount']; + return $shout->devices->getDevices($account); + } catch (Exception $e) { + //FIXME: Create a way to notify the user of the failure. + Horde::logMessage($e, 'ERR'); + return false; + } + } + /** * TODO */ diff --git a/shout/templates/extensions/list.inc b/shout/templates/extensions/list.inc index 9cd09632b..f6630d931 100644 --- a/shout/templates/extensions/list.inc +++ b/shout/templates/extensions/list.inc @@ -16,7 +16,7 @@ - + $info) { @@ -52,7 +52,8 @@
ExtensionDestinationsDestinations