From 70baeb55a11e8aa4d23ad0b2e72d322870780754 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Mon, 8 Feb 2016 10:38:53 +0100 Subject: [PATCH] Add local ID from path HFJ-1610 --- h5p.classes.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/h5p.classes.php b/h5p.classes.php index ce9d726..f165f62 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -1721,6 +1721,7 @@ class H5PCore { } $this->detectSiteType(); + $this->fullPluginPath = preg_replace('/\/[^\/]+[\/]?$/', '' , dirname(__FILE__)); } /** @@ -2458,6 +2459,7 @@ class H5PCore { $platformInfo['autoFetchingDisabled'] = $fetchingDisabled; $platformInfo['uuid'] = $this->h5pF->getOption('site_uuid', ''); $platformInfo['siteType'] = $this->h5pF->getOption('site_type', 'local'); + $platformInfo['localID'] = hash('crc32', $this->fullPluginPath); $platformInfo['libraryStats'] = $this->combineArrayValues(array( 'patch' => $this->getLibrariesInstalled(), 'content' => $this->h5pF->getLibraryContentCount(),