From b25590dd149ffcd3d1d0d463be85674bee8ce327 Mon Sep 17 00:00:00 2001 From: Dawid Kalicki Date: Thu, 19 Jun 2025 17:24:52 +0200 Subject: [PATCH] [issue#81] Fix DokuHTTPClient class not found error for DokuWiki 2025-05-14a Update StatisticsBrowscap to use the correct namespaced HTTP client class (dokuwiki\HTTP\DokuHTTPClient) instead of the deprecated DokuHTTPClient. This resolves the "Class DokuHTTPClient not found" error that occurs when the statistics plugin attempts to fetch remote browscap data. - Replace DokuHTTPClient with dokuwiki\HTTP\DokuHTTPClient - Remove URL parameter from constructor (pass to get() method instead) - Ensures compatibility with DokuWiki "Librarian" release --- inc/StatisticsBrowscap.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inc/StatisticsBrowscap.class.php b/inc/StatisticsBrowscap.class.php index c6f7bea..c7dc782 100644 --- a/inc/StatisticsBrowscap.class.php +++ b/inc/StatisticsBrowscap.class.php @@ -24,10 +24,10 @@ public function __construct() { * @return string */ protected function _getRemoteData($url) { - $http = new DokuHTTPClient($url); - $file = $http->get($url); - if(!$file) - throw new Exception('Your server can\'t connect to external resources. Please update the file manually.'); - return $file; + $http = new dokuwiki\HTTP\DokuHTTPClient(); + $file = $http->get($url); + if(!$file) + throw new Exception('Your server can\'t connect to external resources. Please update the file manually.'); + return $file; } }