Ejemplo n.º 1
0
     }
 }
 if ($readingZip->getErrors()) {
     $page_error[] = $readingZip->getErrors();
 }
 if ($deleteList) {
     foreach ($deleteList as &$curFile) {
         $curFile = trim($curFile);
         if ($curFile && substr($curFile, 0, 1) != "/") {
             $fileName[] = $curFile;
         }
     }
 }
 $writingZip = new Zip(KB_CACHEDIR . '/update/backup/' . $codeversion . '.zip');
 $writingZip->addFileArray($fileName);
 if ($writingZip->createZip()) {
     if ($writingZip->getErrors()) {
         $page_error[] = $writingZip->getErrors();
     }
 }
 $readingZip->extractZip(getcwd());
 if ($deleteList) {
     foreach ($deleteList as $curFile) {
         if ($curFile && substr($curFile, 0, 1) != "/") {
             if (file_exists($curFile) && !@unlink($curFile)) {
                 $page_error[] = "Could not unlink " . $curFile;
             }
         }
     }
 }
 if ($readingZip->getErrors()) {