Esempio n. 1
0
 /**
  * tries to create the zip
  * @return bool
  */
 private static function createZip()
 {
     self::$zip = new ZipArchive();
     // Check if properties are set
     if (!self::$zippath) {
         OC_Log::write('migration', 'createZip() called but $zip and/or $zippath have not been set', OC_Log::ERROR);
         return false;
     }
     if (self::$zip->open(self::$zippath, ZIPARCHIVE::CREATE | ZIPARCHIVE::OVERWRITE) !== true) {
         OC_Log::write('migration', 'Failed to create the zip with error: ' . self::$zip->getStatusString(), OC_Log::ERROR);
         return false;
     } else {
         return true;
     }
 }