Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Giehl <stefan@piwik.org>2017-12-04 03:07:31 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2017-12-04 03:07:31 +0300
commit2ba9409967d8716484c12aa23ad81c6097e62695 (patch)
tree68cf843a3fa807448e611a4ddb3880e7b72a6843
parente4cdf5c9ba82bc6ea951805e5415bd91ec63a069 (diff)
Fix integrity check (#12323)
-rw-r--r--core/FileIntegrity.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/FileIntegrity.php b/core/FileIntegrity.php
index caf90d323c..1cf19548f2 100644
--- a/core/FileIntegrity.php
+++ b/core/FileIntegrity.php
@@ -170,7 +170,8 @@ class FileIntegrity
$directoriesFoundButNotExpected = array();
foreach (self::getPathsToInvestigate() as $file) {
- $file = substr($file, 2); // remove starting characters ./ to match format in manifest.inc.php
+ $file = substr($file, strlen(PIWIK_DOCUMENT_ROOT)); // remove piwik path to match format in manifest.inc.php
+ $file = ltrim($file, DIRECTORY_SEPARATOR);
$directory = dirname($file);
if(in_array($directory, $directoriesInManifest)) {
@@ -208,7 +209,8 @@ class FileIntegrity
if (is_dir($file)) {
continue;
}
- $file = substr($file, 2); // remove starting characters ./ to match format in manifest.inc.php
+ $file = substr($file, strlen(PIWIK_DOCUMENT_ROOT)); // remove piwik path to match format in manifest.inc.php
+ $file = ltrim($file, DIRECTORY_SEPARATOR);
if (self::isFileFromPluginNotInManifest($file, $pluginsInManifest)) {
continue;