Skip to content

Commit d519624

Browse files
committed
JI-3485 Include patch version in library folder name (storage)
1 parent 3e62178 commit d519624

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

h5peditor.class.php

+7-5
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ public function getLibraryData($machineName, $majorVersion, $minorVersion, $lang
403403

404404
// Get list of JS and CSS files that belongs to the dependencies
405405
$files = $this->h5p->getDependenciesFiles($libraries, $prefix);
406-
$libraryName = H5PCore::libraryToString(compact('machineName', 'majorVersion', 'minorVersion'), true);
406+
$libraryName = H5PCore::libraryToFolderName($library);
407407
if ($this->hasPresave($libraryName) === true) {
408408
$this->addPresaveFile($files, $library, $prefix);
409409
}
@@ -625,11 +625,13 @@ public function mergeLocalLibsIntoCachedLibs($local_libraries, &$cached_librarie
625625
// Check if icon is available locally:
626626
if ($local_lib->has_icon) {
627627
// Create path to icon:
628-
$library_folder = H5PCore::libraryToString(array(
628+
$library_folder = H5PCore::libraryToFolderName([
629629
'machineName' => $local_lib->machine_name,
630630
'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+
]);
633635
$icon_path = $this->h5p->h5pF->getLibraryFileUrl($library_folder, 'icon.svg');
634636
}
635637

@@ -747,7 +749,7 @@ public function hasPresave($libraryName){
747749
* @param string $prefix
748750
*/
749751
public function addPresaveFile(&$assets, $library, $prefix = ''){
750-
$path = 'libraries' . '/' . H5PCore::libraryToString($library, true);
752+
$path = 'libraries' . '/' . H5PCore::libraryToFolderName($library);
751753
if( array_key_exists('path', $library)){
752754
$path = $library['path'];
753755
}

0 commit comments

Comments
 (0)