diff options
Diffstat (limited to 'core/API/Proxy.php')
-rw-r--r-- | core/API/Proxy.php | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/API/Proxy.php b/core/API/Proxy.php index 26c11288c9..9bd12e25b4 100644 --- a/core/API/Proxy.php +++ b/core/API/Proxy.php @@ -12,6 +12,9 @@ /** * To differentiate between "no value" and default value of null + * + * @package Piwik + * @subpackage Piwik_API */ class Piwik_API_Proxy_NoDefaultValue {} @@ -215,8 +218,8 @@ class Piwik_API_Proxy } } } catch(Exception $e) { - throw new Exception("The required variable '$name' is not correct or has not been found in the API Request. Add the parameter '&$name=' (with a value) in the URL."); - } + throw new Exception(Piwik_TranslateException('General_ExceptionVariableNotFound', array($name))); + } $finalParameters[] = $requestValue; } return $finalParameters; @@ -232,7 +235,7 @@ class Piwik_API_Proxy $module = self::getModuleNameFromClassName($fileName); $path = PIWIK_INCLUDE_PATH . '/plugins/' . $module . '/API.php'; - if(Zend_Loader::isReadable($path)) + if(is_readable($path)) { require_once $path; // prefixed by PIWIK_INCLUDE_PATH } @@ -282,7 +285,7 @@ class Piwik_API_Proxy { if(!$this->isMethodAvailable($className, $methodName)) { - throw new Exception("The method '$methodName' does not exist or is not available in the module '".$className."'."); + throw new Exception(Piwik_TranslateException('General_ExceptionMethodNotFound', array($methodName,$className))); } } |