rollback dotclear Zip Unzip class
This commit is contained in:
parent
589313f4ad
commit
9ebccfd8ba
2 changed files with 5 additions and 2 deletions
|
@ -208,7 +208,8 @@ class zip extends Action
|
|||
return;
|
||||
}
|
||||
@set_time_limit(300);
|
||||
$zip = new zip\Zip($path);
|
||||
$fp = fopen($path, 'wb');
|
||||
$zip = new zip\Zip($fp);
|
||||
foreach ($exclude as $e) {
|
||||
$e = '#(^|/)(' . str_replace(
|
||||
['.', '*'],
|
||||
|
@ -223,6 +224,7 @@ class zip extends Action
|
|||
true
|
||||
);
|
||||
$zip->close();
|
||||
$zip->write();
|
||||
unset($zip);
|
||||
|
||||
$this->setSuccess(sprintf(__('Zip module into "%s"'), $path));
|
||||
|
|
|
@ -24,9 +24,10 @@ class Zip extends \Dotclear\Helper\File\Zip\Zip
|
|||
*
|
||||
* @param string $name The name
|
||||
* @param string $file The file
|
||||
* @param string $size The size
|
||||
* @param int|null $mtime The mtime
|
||||
*/
|
||||
protected function writeFile(string $name, string $file, ?int $mtime)
|
||||
protected function writeFile($name, $file, $size, $mtime)
|
||||
{
|
||||
if (!isset($this->entries[$name])) {
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue