diff --git a/h5p.classes.php b/h5p.classes.php index 1a239882..1a11552d 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -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 * diff --git a/js/h5p-library-list.js b/js/h5p-library-list.js index 344b7367..736e5577 100644 --- a/js/h5p-library-list.js +++ b/js/h5p-library-list.js @@ -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); }