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

View file

@ -2,12 +2,12 @@
class LibreOfficeStill extends PatchBase { class LibreOfficeStill extends PatchBase {
function __construct() { 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('Still'); $this->patch->setBranch('Still');
} }
function check() : bool { function check() : bool {
if ($this->fetch('https://www.libreoffice.org/download/release-notes/')) if ($this->fetch('https://update.libreoffice.org/check.php', array('CURLOPT_USERAGENT' => 'LibreOffice 7.6.3.2 (29d686fea9f6705b262d369fede658f824154cc0; Windows; X86_64; )')))
return $this->parse('/name="Still"><\/a>LibreOffice ([\d\.]+) \(/'); return $this->parse('/<inst:version>([\d\.]+)<\/inst:version>/');
return false; return false;
} }
} }