Can't call hasMethod() when generating a link - the method name will never exist.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 15 Aug 2009 19:37:59 +0000 (15:37 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 15 Aug 2009 19:40:27 +0000 (15:40 -0400)
No need to call Horde_Registry::hasMethod() from linkByPackage() anymore since we now
load the api cache directly from the linkByPackage() - the hasMethod() call was always
failing since the name of the link does not exist as a true API method call.

framework/Core/lib/Horde/Registry.php

index 58a7123..4fe0a38 100644 (file)
@@ -706,13 +706,6 @@ class Horde_Registry
      */
     public function linkByPackage($app, $call, $args = array(), $extra = '')
     {
-        /* Note: calling hasMethod makes sure that we've cached $app's
-         * services and included the API file, so we don't try to do
-         * it it again explicitly in this method. */
-        if (!$this->hasMethod($call, $app)) {
-            throw new Horde_Exception('The method "' . $call . '" is not defined in ' . $app . '\'s API.');
-        }
-
         /* Make sure the link is defined. */
         $this->_loadApiCache();
         if (empty($this->_cache['api'][$app]['links'][$call])) {