Made statistics being sent on updateContentTypeCache [HFP-931]

pull/10/merge
Paal Joergensen 2017-04-11 14:51:27 +02:00
parent 2ff14ecd37
commit 727e88908a
1 changed files with 3 additions and 13 deletions

View File

@ -2836,19 +2836,9 @@ class H5PCore {
public function updateContentTypeCache($postData = NULL) { public function updateContentTypeCache($postData = NULL) {
$interface = $this->h5pF; $interface = $this->h5pF;
// Set uuid // Make sure data is sent!
if (!$postData || !isset($postData['uuid'])) { if (!isset($postData) || !isset($postData['uuid'])) {
$site_uuid = $this->h5pF->getOption('site_uuid', ''); return $this->fetchLibrariesMetadata();
// Register site with site uuid if we don't already have it
// and try to update content type cache again when this is done
if (empty($site_uuid)) {
return $this->fetchLibrariesMetadata();
}
$postData = array(
'uuid' => $site_uuid
);
} }
$postData['current_cache'] = $this->h5pF->getOption('content_type_cache_updated_at', 0); $postData['current_cache'] = $this->h5pF->getOption('content_type_cache_updated_at', 0);