From 7cb4419eb0f0e3b9282444c11c03ddc284a4abe8 Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Thu, 3 Sep 2020 15:38:45 +0200 Subject: [PATCH] Add separate trigger to trigger content sync --- h5p.classes.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/h5p.classes.php b/h5p.classes.php index 6b0bf71..d23372b 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -3728,7 +3728,7 @@ class H5PCore { H5PHubEndpoints::createURL(H5PHubEndpoints::CONTENT . "/{$id}"), NULL, TRUE, NULL, TRUE, $headers ); - + if (empty($response['data'])) { throw new Exception($this->h5pF->t('Unable to authorize with the H5P Hub. Please check your Hub registration and connection.')); } @@ -3861,6 +3861,7 @@ class H5PCore { $url = H5PHubEndpoints::createURL(H5PHubEndpoints::CONTENT); $response = $this->h5pF->fetchExternalData("{$url}/{$hubId}", array( 'download_url' => $exportPath, + 'resync' => '1', ), true, null, true, $headers, array(), 'PUT'); if (!empty($response) && $response['status'] === 200) {