Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions h5p.classes.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,14 @@ public function saveLibraryUsage($contentId, $librariesInUse);
*/
public function getLibraryUsage($libraryId, $skipContent = FALSE);

/**
* Get the names of dependencies to other libraries
*
* @param int $id
* @return array The array contains the names of the dependet libraries
*/
public function getLibraryUsageNames($id);

/**
* Loads a library
*
Expand Down
4 changes: 1 addition & 3 deletions js/h5p-library-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ var H5PLibraryList = H5PLibraryList || {};
if (libraries.notCached !== undefined ||
hasContent ||
(library.numContentDependencies !== '' &&
library.numContentDependencies !== 0) ||
(library.numLibraryDependencies !== '' &&
library.numLibraryDependencies !== 0)) {
library.numContentDependencies !== 0)) {
// Disabled delete if content.
$deleteButton.attr('disabled', true);
}
Expand Down