Fix export CSS to zip

pull/2926/head
Julio Montoya 7 years ago
parent 35e1c6611c
commit bbbef59e85
  1. 2
      main/admin/settings.lib.php

@ -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.

Loading…
Cancel
Save