Request LibreOffice's check.php

This commit is contained in:
Steffen Lange 2024-02-12 18:13:09 +01:00
parent af05bcd605
commit a0d037b98b
2 changed files with 6 additions and 6 deletions

View file

@ -2,12 +2,12 @@
class LibreOfficeFresh extends PatchBase {
function __construct() {
parent::__construct('Document Foundation', 'LibreOffice', 'https://www.libreoffice.org/download/download/');
parent::__construct('Document Foundation', 'LibreOffice', 'https://www.libreoffice.org/download/download-libreoffice/');
$this->patch->setBranch('Fresh');
}
function check() : bool {
if ($this->fetch('https://www.libreoffice.org/download/release-notes/'))
return $this->parse('/name="Fresh"><\/a>LibreOffice ([\d\.]+) \(/');
if ($this->fetch('https://update.libreoffice.org/check.php', array('CURLOPT_USERAGENT' => 'LibreOffice 24.2.0.1 (b4d45829793cddfe67b58a53f495528c75738d8a; Windows; X86_64; )')))
return $this->parse('/<inst:version>([\d\.]+)<\/inst:version>/');
return false;
}
}