feat: extract curl ua to config value (#2568)

* exclude config.default.ini.php from phpcs
This commit is contained in:
dag 2022-04-03 09:37:39 +02:00 committed by GitHub
parent 42788cd3ee
commit bed20e9f28
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 21 deletions

View file

@ -168,7 +168,7 @@ function getContents($url, $header = array(), $opts = array(), $returnHeader = f
}
curl_setopt($ch, CURLOPT_USERAGENT, ini_get('user_agent'));
curl_setopt($ch, CURLOPT_USERAGENT, Configuration::getConfig('http', 'useragent'));
curl_setopt($ch, CURLOPT_ENCODING, '');
curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);