@@ -403,7 +403,7 @@ public function getLibraryData($machineName, $majorVersion, $minorVersion, $lang
403
403
404
404
// Get list of JS and CSS files that belongs to the dependencies
405
405
$ files = $ this ->h5p ->getDependenciesFiles ($ libraries , $ prefix );
406
- $ libraryName = H5PCore::libraryToString ( compact ( ' machineName ' , ' majorVersion ' , ' minorVersion ' ), true );
406
+ $ libraryName = H5PCore::libraryToFolderName ( $ library );
407
407
if ($ this ->hasPresave ($ libraryName ) === true ) {
408
408
$ this ->addPresaveFile ($ files , $ library , $ prefix );
409
409
}
@@ -625,11 +625,13 @@ public function mergeLocalLibsIntoCachedLibs($local_libraries, &$cached_librarie
625
625
// Check if icon is available locally:
626
626
if ($ local_lib ->has_icon ) {
627
627
// Create path to icon:
628
- $ library_folder = H5PCore::libraryToString ( array (
628
+ $ library_folder = H5PCore::libraryToFolderName ([
629
629
'machineName ' => $ local_lib ->machine_name ,
630
630
'majorVersion ' => $ local_lib ->major_version ,
631
- 'minorVersion ' => $ local_lib ->minor_version
632
- ), TRUE );
631
+ 'minorVersion ' => $ local_lib ->minor_version ,
632
+ 'patchVersion ' => $ local_lib ->patch_version ,
633
+ 'patchVersionInFolderName ' => $ local_lib ->patch_version_in_folder_name
634
+ ]);
633
635
$ icon_path = $ this ->h5p ->h5pF ->getLibraryFileUrl ($ library_folder , 'icon.svg ' );
634
636
}
635
637
@@ -747,7 +749,7 @@ public function hasPresave($libraryName){
747
749
* @param string $prefix
748
750
*/
749
751
public function addPresaveFile (&$ assets , $ library , $ prefix = '' ){
750
- $ path = 'libraries ' . '/ ' . H5PCore::libraryToString ($ library, true );
752
+ $ path = 'libraries ' . '/ ' . H5PCore::libraryToFolderName ($ library );
751
753
if ( array_key_exists ('path ' , $ library )){
752
754
$ path = $ library ['path ' ];
753
755
}
0 commit comments