HFP-2183 Set metadata when saving library

HFP-2095-Fix-table-styling
Paal Joergensen 2018-09-11 11:50:51 +02:00
parent 9e4db6cdd9
commit 425aac5d33
2 changed files with 7 additions and 0 deletions

View File

@ -86,6 +86,9 @@ class H5PDevelopment {
// Save/update library.
$library['libraryId'] = $this->h5pF->getLibraryId($library['machineName'], $library['majorVersion'], $library['minorVersion']);
if (!isset($library['metadata'])) {
$library['metadata'] = 0;
}
$this->h5pF->saveLibraryData($library, $library['libraryId'] === FALSE);
$library['path'] = 'development/' . $contents[$i];

View File

@ -210,6 +210,7 @@ interface H5PFrameworkInterface {
* - minorVersion: The library's minorVersion
* - patchVersion: The library's patchVersion
* - runnable: 1 if the library is a content type, 0 otherwise
* - metadata: 1 if the library should support setting metadata (copyright etc)
* - fullscreen(optional): 1 if the library supports fullscreen, 0 otherwise
* - embedTypes(optional): list of supported embed types
* - preloadedJs(optional): list of associative arrays containing:
@ -1440,6 +1441,9 @@ class H5PStorage {
$library['saveDependencies'] = TRUE;
// Save library meta data
if (!isset($library['metadata'])) {
$library['metadata'] = 0;
}
$this->h5pF->saveLibraryData($library, $new);
// Save library folder