diff options
author | Stefan Giehl <stefan@matomo.org> | 2021-05-27 04:58:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-27 04:58:30 +0300 |
commit | c973567705a0065fdd7d7c7b11b80f1f0f1be350 (patch) | |
tree | 89947dbce864ac48389c742fce31d30106eebada /plugins/Actions | |
parent | 70b05de003487a31495bb9927017606a2faab7dd (diff) |
Update PHP extension requirements & deprecate Common::mb_* methods (#16754)
* Require polyfill for mbstring and iconv
* remove mbstring methods from upgrade.php
* remove checks for some php extensions
* deprecate Common::mb_* methods, as we can directly use mb_* functions instead
* updates expected test files
* Directly use mb_* methods in favor of Common::mb_*
* Update expected screenshot
Co-authored-by: diosmosis <diosmosis@users.noreply.github.com>
Diffstat (limited to 'plugins/Actions')
-rw-r--r-- | plugins/Actions/Actions/ActionSiteSearch.php | 6 | ||||
-rw-r--r-- | plugins/Actions/DataTable/Filter/Actions.php | 2 | ||||
-rw-r--r-- | plugins/Actions/VisitorDetails.php | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/plugins/Actions/Actions/ActionSiteSearch.php b/plugins/Actions/Actions/ActionSiteSearch.php index 450321442f..a65be0aecb 100644 --- a/plugins/Actions/Actions/ActionSiteSearch.php +++ b/plugins/Actions/Actions/ActionSiteSearch.php @@ -137,14 +137,14 @@ class ActionSiteSearch extends Action // strtolower the parameter names for smooth site search detection $parameters = array(); foreach ($parametersRaw as $k => $v) { - $parameters[Common::mb_strtolower($k)] = $v; + $parameters[mb_strtolower($k)] = $v; } // decode values if they were sent from a client using another charset PageUrl::reencodeParameters($parameters, $pageEncoding); // Detect Site Search keyword foreach ($keywordParameters as $keywordParameterRaw) { - $keywordParameter = Common::mb_strtolower($keywordParameterRaw); + $keywordParameter = mb_strtolower($keywordParameterRaw); if (!empty($parameters[$keywordParameter])) { $actionName = $parameters[$keywordParameter]; break; @@ -160,7 +160,7 @@ class ActionSiteSearch extends Action : array(); foreach ($categoryParameters as $categoryParameterRaw) { - $categoryParameter = Common::mb_strtolower($categoryParameterRaw); + $categoryParameter = mb_strtolower($categoryParameterRaw); if (!empty($parameters[$categoryParameter])) { $categoryName = $parameters[$categoryParameter]; break; diff --git a/plugins/Actions/DataTable/Filter/Actions.php b/plugins/Actions/DataTable/Filter/Actions.php index fff3491d1c..319db3cd77 100644 --- a/plugins/Actions/DataTable/Filter/Actions.php +++ b/plugins/Actions/DataTable/Filter/Actions.php @@ -72,7 +72,7 @@ class Actions extends BaseFilter $host = parse_url($url, PHP_URL_HOST); if ($host && PageUrl::shouldUseHttpsHost($site->getId(), $host)) { - $row->setMetadata('url', 'https://' . Common::mb_substr($url, 7 /* = strlen('http://') */)); + $row->setMetadata('url', 'https://' . mb_substr($url, 7 /* = strlen('http://') */)); } } } else if ($folderUrlStart) { diff --git a/plugins/Actions/VisitorDetails.php b/plugins/Actions/VisitorDetails.php index 2d3e4dde6d..86330f1603 100644 --- a/plugins/Actions/VisitorDetails.php +++ b/plugins/Actions/VisitorDetails.php @@ -166,7 +166,7 @@ class VisitorDetails extends VisitorDetailsAbstract $host = parse_url($action['url'], PHP_URL_HOST); if ($host && PageUrl::shouldUseHttpsHost($visitorDetails['idSite'], $host)) { - $action['url'] = 'https://' . Common::mb_substr($action['url'], 7 /* = strlen('http://') */); + $action['url'] = 'https://' . mb_substr($action['url'], 7 /* = strlen('http://') */); } } |