|
@@ -1902,7 +1902,7 @@ function generateCSSDownloadLink($style)
|
|
|
if (is_dir($dir) && $check) {
|
|
|
$zip = new PclZip($arch);
|
|
|
// Remove path prefix except the style name and put file on disk
|
|
|
- $zip->create($dir, PCLZIP_OPT_REMOVE_PATH, substr($dir, 0, -strlen($style)));
|
|
|
+ $zip->create($dir, PCLZIP_OPT_REMOVE_PATH, dirname($dir));
|
|
|
$url = api_get_path(WEB_CODE_PATH).'course_info/download.php?archive_path=&archive='.str_replace(api_get_path(SYS_ARCHIVE_PATH), '', $arch);
|
|
|
|
|
|
//@TODO: use more generic script to download.
|