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 | libraries/adapter/database/database.php +16 -1 1.8.11 → 1.8.16 View file →
@@ -253,8 +253,15 @@
253 253 if (preg_match("/^(SELECT|SHOW)/i", $sql))
254 254 {
255 255 // result should contain an array
256 256 $this->result = $this->db->get_results($sql);
257 +
258 + /**
259 + * Flush result after executing the query to free disk space.
260 + *
261 + * @since 10.1.73
262 + */
263 + $this->db->flush();
257 264 }
258 265 // otherwise we can launch a generic query
259 266 else
260 267 {
@@ -323,9 +330,17 @@
323 330 }
324 331
325 332 if (is_array($this->result))
326 333 {
327 - return $this->result;
334 + /**
335 + * Copy result on a local variable and flush the cached value.
336 + *
337 + * @since 10.1.73
338 + */
339 + $result = $this->result;
340 + $this->result = null;
341 +
342 + return $result;
328 343 }
329 344
330 345 return array();
331 346 }