public static function here($params = array(), $html = true) { return Uri::here($params, $html); }
*/ if (count($files) == 0) { Response::not_found(); } $root_dir = ''; $items = array_merge($folders, $files); foreach ($items as $item) { $path = $item->get_absolute_path(); $path = realpath($path); $dir = dirname($path); if (empty($root_dir) || strlen($root_dir) > strlen($dir)) { $root_dir = $dir; } } /** * Zip files together. */ $temp_zip_path = Chamilo::temp_file('zip'); $zip_folder = new PclZip($temp_zip_path); foreach ($files as $file) { if (empty($root_dir)) { $root_dir = dirname($file); } $file = (string) $file; $zip_folder->add($file, PCLZIP_OPT_REMOVE_PATH, $root_dir); } /** * Send file for download */ event_download(Uri::here()); DocumentManager::file_send_for_download($temp_zip_path, false, get_lang('Documents') . '.zip');
function url($params) { return Uri::here($params); }