mirror of
https://github.com/friendica/friendica
synced 2025-04-26 17:50:11 +00:00
Curl Response Refactoring
- refactored Network::getCurl() - replaced every Network::getCur() execution with a Curl Response
This commit is contained in:
parent
7c73e8634c
commit
ffbc688797
9 changed files with 30 additions and 30 deletions
|
@ -345,20 +345,20 @@ class Install extends BaseObject
|
|||
$help = "";
|
||||
$error_msg = "";
|
||||
if (function_exists('curl_init')) {
|
||||
$test = Network::fetchUrlFull(System::baseUrl() . "/install/testrewrite");
|
||||
$fetchResult = Network::fetchUrlFull(System::baseUrl() . "/install/testrewrite");
|
||||
|
||||
$url = normalise_link(System::baseUrl() . "/install/testrewrite");
|
||||
if ($test['body'] != "ok") {
|
||||
$test = Network::fetchUrlFull($url);
|
||||
if ($fetchResult->getBody() != "ok") {
|
||||
$fetchResult = Network::fetchUrlFull($url);
|
||||
}
|
||||
|
||||
if ($test['body'] != "ok") {
|
||||
if ($fetchResult->getBody() != "ok") {
|
||||
$status = false;
|
||||
$help = L10n::t('Url rewrite in .htaccess is not working. Check your server configuration.');
|
||||
$error_msg = [];
|
||||
$error_msg['head'] = L10n::t('Error message from Curl when fetching');
|
||||
$error_msg['url'] = $test['redirect_url'];
|
||||
$error_msg['msg'] = defaults($test, 'error', '');
|
||||
$error_msg['url'] = $fetchResult->getRedirectUrl();
|
||||
$error_msg['msg'] = $fetchResult->getError();
|
||||
}
|
||||
self::addCheck($checks, L10n::t('Url rewrite is working'), $status, true, $help, $error_msg);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue