From a0d037b98babd16c7624b7b9590ecbd12ee2cc45 Mon Sep 17 00:00:00 2001 From: Steffen Lange Date: Mon, 12 Feb 2024 18:13:09 +0100 Subject: [PATCH] Request LibreOffice's check.php --- modules/LibreOfficeFresh.php | 6 +++--- modules/LibreOfficeStill.php | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/LibreOfficeFresh.php b/modules/LibreOfficeFresh.php index fbf8e1b..68eaae3 100644 --- a/modules/LibreOfficeFresh.php +++ b/modules/LibreOfficeFresh.php @@ -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('/([\d\.]+)<\/inst:version>/'); return false; } } diff --git a/modules/LibreOfficeStill.php b/modules/LibreOfficeStill.php index 143438e..7ada3c9 100644 --- a/modules/LibreOfficeStill.php +++ b/modules/LibreOfficeStill.php @@ -2,12 +2,12 @@ class LibreOfficeStill 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('Still'); } function check() : bool { - if ($this->fetch('https://www.libreoffice.org/download/release-notes/')) - return $this->parse('/name="Still"><\/a>LibreOffice ([\d\.]+) \(/'); + if ($this->fetch('https://update.libreoffice.org/check.php', array('CURLOPT_USERAGENT' => 'LibreOffice 7.6.3.2 (29d686fea9f6705b262d369fede658f824154cc0; Windows; X86_64; )'))) + return $this->parse('/([\d\.]+)<\/inst:version>/'); return false; } }