forked from friendica/friendica-addons
correct use of fetchFull
This commit is contained in:
parent
430211ebc2
commit
41fd46600e
|
@ -279,7 +279,7 @@ function retrieve_resource($resource) {
|
||||||
$cookiejar = tempnam(System::getTempPath(), 'cookiejar-retriever-');
|
$cookiejar = tempnam(System::getTempPath(), 'cookiejar-retriever-');
|
||||||
file_put_contents($cookiejar, $rule_data['cookiedata']);
|
file_put_contents($cookiejar, $rule_data['cookiedata']);
|
||||||
}
|
}
|
||||||
$fetch_result = DI::httpClient()->fetchFull($resource['url'], $redirects, '', $cookiejar);
|
$fetch_result = DI::httpClient()->fetchFull($resource['url'], $redirects, 0, $cookiejar);
|
||||||
if (array_key_exists('storecookies', $rule_data) && $rule_data['storecookies']) {
|
if (array_key_exists('storecookies', $rule_data) && $rule_data['storecookies']) {
|
||||||
$retriever_rule['data']['cookiedata'] = file_get_contents($cookiejar);
|
$retriever_rule['data']['cookiedata'] = file_get_contents($cookiejar);
|
||||||
DBA::update('retriever_rule', ['data' => json_encode($retriever_rule['data'])], ['id' => intval($retriever_rule["id"])], $retriever_rule);
|
DBA::update('retriever_rule', ['data' => json_encode($retriever_rule['data'])], ['id' => intval($retriever_rule["id"])], $retriever_rule);
|
||||||
|
|
Loading…
Reference in a new issue