Service Centovacast fixes

This commit is contained in:
4Giedrius committed 2015-01-22 11:45:55 +02:00
1 parent 81c49887eb
commit 13ac007c2a
3 files changed
+8 -3

No files matched your search

@@ -89,9 +89,9 @@ class Service implements \Box\InjectionAwareInterface
if(APPLICATION_ENV == 'testing') {
$config = array();
$config['url'] = 'http://castdemo.centova.com';
$config['url'] = 'http://castdemo.centova.com:2199';
$config['secret'] = 'example';
$config['ip'] = '123.123.123';
$config['ip'] = '123.123.123.123';
$config['hostname'] = 'castdemo.centova.com';
return $config;
}
@@ -398,10 +398,11 @@ class Service implements \Box\InjectionAwareInterface
*/
private function _apiSystemCall($server, $method, $params = array())
{
require_once(dirname(__FILE__).'/ccapiclient/ccapiclient.php');
require_once(dirname(__FILE__).'/ccapiclient.php');
$centovacast_url = $server['url'];
$admin_password = $server['secret'];
$system = new CCSystemAPIClient($centovacast_url);
$system->cc_initialize($centovacast_url);
$system->call($method, $admin_password, $params);
if (!$system->success) {
@@ -12,6 +12,8 @@
* calls to what would be the public methods of each class.
*
*/
namespace Box\Mod\Servicecentovacast;
require_once(dirname(__FILE__) . '/class_HTTPRetriever.php');
// This library was originally designed to support object overloading, but
@@ -51,6 +53,7 @@ class CCBaseAPIClient {
function cc_initialize($ccurl) {
$this->ccurl = $ccurl;
$this->http = new HTTPRetriever();
$this->http->HTTPRetriever();
$this->http->headers["User-Agent"] = 'CentovaCast PHP API Client';
}
@@ -1,4 +1,5 @@
<?php
namespace Box\Mod\Servicecentovacast;
/* HTTP Retriever
* Version v1.1.11
* Copyright 2004-2009, Steve Blinch