diff -r 2251fb41dbc7 -r 1e110b03ae96 web/lib/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php --- a/web/lib/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php Sun Apr 21 10:07:03 2013 +0200 +++ b/web/lib/Zend/Http/UserAgent/Features/Adapter/DeviceAtlas.php Sun Apr 21 21:54:24 2013 +0200 @@ -15,7 +15,7 @@ * @category Zend * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ @@ -26,12 +26,12 @@ /** * Features adapter build with the Tera Wurfl Api - * See installation instruction here : http://deviceatlas.com/licences + * See installation instruction here : http://deviceatlas.com/licences * Download : http://deviceatlas.com/getAPI/php * * @package Zend_Http * @subpackage UserAgent - * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Http_UserAgent_Features_Adapter_DeviceAtlas implements Zend_Http_UserAgent_Features_Adapter @@ -50,9 +50,9 @@ throw new Zend_Http_UserAgent_Features_Exception('"DeviceAtlas" configuration is not defined'); } } - + $config = $config['deviceatlas']; - + if (!class_exists('Mobi_Mtld_DA_Api')) { if (empty($config['deviceatlas_lib_dir'])) { require_once 'Zend/Http/UserAgent/Features/Exception.php'; @@ -62,17 +62,17 @@ // Include the Device Atlas file from the specified lib_dir require_once ($config['deviceatlas_lib_dir'] . '/Mobi/Mtld/DA/Api.php'); } - + if (empty($config['deviceatlas_data'])) { require_once 'Zend/Http/UserAgent/Features/Exception.php'; throw new Zend_Http_UserAgent_Features_Exception('The "deviceatlas_data" parameter is not defined'); } - + //load the device data-tree : e.g. 'json/DeviceAtlas.json $tree = Mobi_Mtld_DA_Api::getTreeFromFile($config['deviceatlas_data']); - + $properties = Mobi_Mtld_DA_Api::getProperties($tree, $request['http_user_agent']); - + return $properties; } }