MDL-66166 core_useragent: Update MoodleBot UA and treat as web crawler
This commit is contained in:
+2
-2
@@ -3103,7 +3103,7 @@ class curl {
|
||||
*/
|
||||
public function resetopt() {
|
||||
$this->options = array();
|
||||
$this->options['CURLOPT_USERAGENT'] = 'MoodleBot/1.0';
|
||||
$this->options['CURLOPT_USERAGENT'] = \core_useragent::get_moodlebot_useragent();
|
||||
// True to include the header in the output
|
||||
$this->options['CURLOPT_HEADER'] = 0;
|
||||
// True to Exclude the body from the output
|
||||
@@ -3346,7 +3346,7 @@ class curl {
|
||||
} else if (!empty($this->options['CURLOPT_USERAGENT'])) {
|
||||
$useragent = $this->options['CURLOPT_USERAGENT'];
|
||||
} else {
|
||||
$useragent = 'MoodleBot/1.0';
|
||||
$useragent = \core_useragent::get_moodlebot_useragent();
|
||||
}
|
||||
|
||||
// Set headers.
|
||||
|
||||
Reference in New Issue
Block a user