PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | admin/helpers/src/model/backup.php +7 -1 1.6.5 → 1.8.16 View file →
@@ -80,8 +80,14 @@
80 80 array_pop($chunks);
81 81
82 82 $backup->type->id = implode('_', $chunks);
83 83
84 + if (empty($backup->type->id))
85 + {
86 + // unexpected file format
87 + return null;
88 + }
89 +
84 90 // try to fetch the matching export type
85 91 $type = $this->getExportTypes($backup->type->id);
86 92
87 93 if ($type)
@@ -185,9 +191,9 @@
185 191
186 192 try
187 193 {
188 194 // upload archive
189 - $resp = VikBooking::uploadFileFromRequest((array)$file, $dest, "/application\/[a-zA-Z0-9\-_.]*\bzip\b/");
195 + $resp = VikBooking::uploadFileFromRequest((array)$file, $dest, 'zip');
190 196 }
191 197 catch (Exception $e)
192 198 {
193 199 // catch error and register it within the model