1<?php
2
3class nsexport_ziplib implements nsexport_compressor {
4
5    public $plugin = null;
6
7    public function setup(&$plugin) {
8    }
9
10    public function compress($sourceFolder, $destinationFile) {
11        global $conf;
12        chdir($sourceFolder);
13        $zip  = $conf['plugin']['nsexport']['packer_ziphtml_zip'];
14        $comp = $conf['plugin']['nsexport']['packer_ziphtml_compress'];
15        $cmd  = "$zip -q -$comp -r -u $destinationFile .";
16        system($cmd);
17    }
18}
19