HFP-2183 Set metadata when saving library
parent
9e4db6cdd9
commit
425aac5d33
|
@ -86,6 +86,9 @@ class H5PDevelopment {
|
||||||
|
|
||||||
// Save/update library.
|
// Save/update library.
|
||||||
$library['libraryId'] = $this->h5pF->getLibraryId($library['machineName'], $library['majorVersion'], $library['minorVersion']);
|
$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);
|
$this->h5pF->saveLibraryData($library, $library['libraryId'] === FALSE);
|
||||||
|
|
||||||
$library['path'] = 'development/' . $contents[$i];
|
$library['path'] = 'development/' . $contents[$i];
|
||||||
|
|
|
@ -210,6 +210,7 @@ interface H5PFrameworkInterface {
|
||||||
* - minorVersion: The library's minorVersion
|
* - minorVersion: The library's minorVersion
|
||||||
* - patchVersion: The library's patchVersion
|
* - patchVersion: The library's patchVersion
|
||||||
* - runnable: 1 if the library is a content type, 0 otherwise
|
* - 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
|
* - fullscreen(optional): 1 if the library supports fullscreen, 0 otherwise
|
||||||
* - embedTypes(optional): list of supported embed types
|
* - embedTypes(optional): list of supported embed types
|
||||||
* - preloadedJs(optional): list of associative arrays containing:
|
* - preloadedJs(optional): list of associative arrays containing:
|
||||||
|
@ -1440,6 +1441,9 @@ class H5PStorage {
|
||||||
$library['saveDependencies'] = TRUE;
|
$library['saveDependencies'] = TRUE;
|
||||||
|
|
||||||
// Save library meta data
|
// Save library meta data
|
||||||
|
if (!isset($library['metadata'])) {
|
||||||
|
$library['metadata'] = 0;
|
||||||
|
}
|
||||||
$this->h5pF->saveLibraryData($library, $new);
|
$this->h5pF->saveLibraryData($library, $new);
|
||||||
|
|
||||||
// Save library folder
|
// Save library folder
|
||||||
|
|
Loading…
Reference in New Issue