Skip to content

Commit

Permalink
1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrii-fediuk committed Jul 16, 2017
1 parent 5582174 commit 37af976
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 14 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mage2pro/oro"
,"version": "1.0.1"
,"version": "1.0.2"
,"description": "A custom integration between Magento 2 and Oro Platform."
,"type": "magento2-module"
,"homepage": "https://ocrm.pro"
Expand All @@ -11,6 +11,6 @@
"homepage": "https://mage2.pro/users/dmitry_fedyuk",
"role": "Developer"
}]
,"require": {"mage2pro/core": ">=2.7.40"}
,"require": {"mage2pro/core": ">=2.8.17"}
,"autoload": {"files": ["registration.php"], "psr-4": {"Df\\Oro\\": ""}}
}
16 changes: 4 additions & 12 deletions lib/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ function df_oro_get_list(
$raw = null;
$c = null; /** @var C $c */
while (!$raw && $attempt++ <= $maxAttempts) {
$c = (new C)
->setConfig(['timeout' => 120])
$c = df_zf_http('https://'
. ($local ? 'localhost.com:848/app_dev.php' : 'erp.mage2.pro')
. "/api/extenddf$entity"
)
// 2017-06-28
// Due to a Oro Platform bug, the «content-type» headers is required for the «vnd» case,
// even it does not have any sense here.
Expand All @@ -39,18 +41,8 @@ function df_oro_get_list(
->setHeaders(df_oro_headers() + (!$vnd ? ['accept' => 'application/json'] : array_fill_keys(
['accept', 'content-type'], 'application/vnd.api+json'
)))
->setUri(
'https://'
. ($local ? 'localhost.com:848/app_dev.php' : 'erp.mage2.pro')
. "/api/extenddf$entity"
)
->setParameterGet(df_clean(['filter' => $filter, 'include' => df_csv($include)]))
;
if ($local) {
$c->setAdapter((new \Zend_Http_Client_Adapter_Socket)->setStreamContext([
'ssl' => ['allow_self_signed' => true, 'verify_peer' => false]
]));
}
$raw = $c->request()->getBody();
}
if (!$raw) {
Expand Down

0 comments on commit 37af976

Please sign in to comment.