Permalink
Browse files

merged from MOODLE_14_STABLE; updated zipping code - see bug #2228

  • Loading branch information...
1 parent 0f06e85 commit a0fb9e8e65c9aa9a4fabb2ab507627e9877f39d6 skodak committed Dec 15, 2004
Showing with 1 addition and 15 deletions.
  1. +1 −15 mod/wiki/ewiki/plugins/moodle/moodle_wikidump.php
@@ -402,21 +402,7 @@ function ewiki_page_wiki_dump_send($exportbinaries=0, $exportformats=0, $withvir
if(!$exportdestinations) {
$archivename=$wname.".zip";
- if (empty($CFG->zip)) { // Use built-in php-based zip function
- include_once("$CFG->libdir/pclzip/pclzip.lib.php");
- $archive = new PclZip("$exportbasedir/$archivename");
- if (($list = $archive->create($filestozip,'',"$exportbasedir/")) == 0) {
- error($archive->errorInfo(true));
- }
- } else { // Use external zip program
- $files = "";
- foreach ($filestozip as $file) {
- $files .= $wname."/".basename($file);
- $files .= " ";
- }
- $command = "cd $exportbasedir ; $CFG->zip -r $archivename $files";
- Exec($command);
- }
+ zip_files($filestozip, "$exportbasedir/$archivename");
#-- Headers
Header("Content-type: application/zip");

0 comments on commit a0fb9e8

Please sign in to comment.