Arreglado problemas con los acentos al cargar/descargar información en un fichero ZIP.

git-svn-id: https://192.168.0.254/svn/Proyectos.Incam_SGD/trunk@5 eb19766c-00d9-a042-a3a0-45cb8ec72764
This commit is contained in:
David Arranz 2010-09-10 17:22:23 +00:00
parent bce2a10d83
commit 63235f31e0
3 changed files with 10 additions and 10 deletions

View File

@ -208,13 +208,13 @@ class ZipFolder {
return PEAR::raiseError(_kt("No folders or documents found to compress"));
}
$sZipFile = sprintf("%s/%s.".$this->extension, $this->sTmpPath, $this->sZipFileName);
/*$sZipFile = sprintf("%s/%s.".$this->extension, $this->sTmpPath, $this->sZipFileName);
$sZipFile = str_replace('<', '', str_replace('</', '', str_replace('>', '', $sZipFile)));
$archive = new KTPclZip($sZipFile);
$archive->createZipFile($this->sTmpPath.'/Root Folder');
$archive->createZipFile($this->sTmpPath.'/Root Folder');*/
/*
$config = KTConfig::getSingleton();
$useBinary = true; //$config->get('export/useBinary', false);
@ -267,7 +267,7 @@ class ZipFolder {
File_Archive::toArchive($this->sZipFileName.'.'.$this->extension, File_Archive::toFiles($this->sTmpPath), $this->extension)
);
}
*/
// Save the zip file and path into session
$_SESSION['zipcompression'] = KTUtil::arrayGet($_SESSION, 'zipcompression', array());
@ -354,9 +354,9 @@ class ZipFolder {
}
function _convertEncoding($sMystring, $bEncode) {
if (strcasecmp($this->sOutputEncoding, "UTF-8") === 0) {
/*if (strcasecmp($this->sOutputEncoding, "UTF-8") === 0) {
return $sMystring;
}
}*/
if ($bEncode) {
return iconv("UTF-8", $this->sOutputEncoding, $sMystring);
} else {

View File

@ -199,4 +199,4 @@ class KTBulkImportManager {
}
}
?>
?>

View File

@ -137,10 +137,10 @@ class KTZipImportStorage extends KTFSImportStorage {
// todo: replace file archive for tar, etc
if($this->sExtension == 'zip'){
$archive = new KTPclZip($this->sZipPath);
$archive->extractZipFile($sTmpPath);
/*$archive = new KTPclZip($this->sZipPath);
$archive->extractZipFile($sTmpPath);*/
/* ** Original zip functionality using the unzip binary ** *
/* ** Original zip functionality using the unzip binary ** */
$sUnzipCommand = KTUtil::findCommand("import/unzip", "unzip");
if (empty($sUnzipCommand)) {
return PEAR::raiseError(_kt("unzip command not found on system"));