1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 04:32:01 +02:00

Issue #910 XMLRPC adapter was failing when looking up plugins online.

This commit is contained in:
Cameron 2015-03-30 13:02:51 -07:00
parent c079140f23
commit cfea103d20
2 changed files with 17 additions and 6 deletions

View File

@ -22,7 +22,7 @@ e107::coreLan('plugin', true);
$e_sub_cat = 'plug_manage';
define('PLUGIN_SHOW_REFRESH', FALSE);
define('PLUGIN_SCAN_INTERVAL', $_SERVER['E_DEV'] ? 0 : 360);
define('PLUGIN_SCAN_INTERVAL', !empty($_SERVER['E_DEV']) ? 0 : 360);
global $user_pref;
@ -433,7 +433,7 @@ class pluginManager{
// $mes->addWarning("Some older plugins may produce unpredictable results.");
// check for cURL
if(!function_exists(curl_init))
if(!function_exists('curl_init'))
{
$mes->addWarning("cURL is currently required to use this feature. Contact your webhosting provider to enable cURL"); // TODO LAN?
}
@ -444,6 +444,7 @@ class pluginManager{
$mp = $this->getMarketplace();
// auth
$mp->generateAuthKey($e107SiteUsername, $e107SiteUserpass);
@ -454,7 +455,6 @@ class pluginManager{
));
$total = $xdata['params']['count'];
// OLD BIT OF CODE ------------------------------->
/*
// $file = SITEURLBASE.e_PLUGIN_ABS."release/release.php"; // temporary testing

View File

@ -39,7 +39,7 @@ class e_marketplace
{
$this->_adapter_name = 'wsdl';
}
}
/**
@ -190,6 +190,10 @@ class e_marketplace
*/
public function call($method, $data, $apply = true)
{
if(E107_DEBUG_LEVEL > 0)
{
e107::getMessage()->addDebug("Calling e107.org using <b> ".$this->_adapter_name."</b> adapter");
}
return $this->adapter()->call($method, $data, $apply);
}
@ -596,14 +600,21 @@ class e_marketplace_adapter_xmlrpc extends e_marketplace_adapter_abstract
public function call($method, $data, $apply = true)
{
$client = $this->client();
// settings based on current method
$this->prepareClient($method, $client);
// authorization data
$data['auth'] = $this->getAuthKey();
$data['action'] = $method;
foreach($data['params'] as $k=>$v)
{
$data[$k] = $v;
}
unset($data['params']);
// build the request query
$qry = str_replace(array('s%5B', '%5D'), array('[', ']'), http_build_query($data, null, '&'));
$url = $this->serviceUrl.'?'.$qry;