dziękuję za zainteresowanie .
Niestety nie bardzo rozumiem o co chodzi z nadpisaniem - ten plik ma datę instalacji prestashop,
ale dalej mam tak:
$this->errors[] = sprintf($this->l('Internal error #%s'), $_FILES['newfile']['error']);
break;
}
} elseif (!isset($_FILES['file']['tmp_name']) || empty($_FILES['file']['tmp_name'])) {
$this->errors[] = $this->l('No file has been selected');
} elseif (substr($_FILES['file']['name'], -4) != '.tar' && substr($_FILES['file']['name'], -4) != '.zip'
&& substr($_FILES['file']['name'], -4) != '.tgz' && substr($_FILES['file']['name'], -7) != '.tar.gz') {
$this->errors[] = Tools::displayError('Unknown archive type.');
} elseif (!move_uploaded_file($_FILES['file']['tmp_name'], _PS_MODULE_DIR_.$_FILES['file']['name'])) {
$this->errors[] = Tools::displayError('An error occurred while copying the archive to the module directory.');
} else {
$this->extractArchive(_PS_MODULE_DIR_.$_FILES['file']['name']);
}
} else {
$this->errors[] = Tools::displayError('You do not have permission to add this.');