Line 20 in /app/vendor/a2nt/silverstripe-live-checks/src/Tasks/DumpMySQL.php
11 protected $description = 'Create MySQL dump'; 12 protected $enabled = true; 13 14 public function run($request) 15 { 16 $fileName = 'backup-'.date('d-m-Y').'.sql'; 17 $cfg = DB::getConfig(); 18 19 try { 20 ob_clean(); 21 } catch (\Exception $e) { 22 } 23 24 // check if gzip is on 25 try { 26 if (count(array_intersect(['mod_deflate', 'mod_gzip'], apache_get_modules())) > 0) {
Line 26 in /app/vendor/a2nt/silverstripe-live-checks/src/Tasks/DumpMySQL.php
17 $cfg = DB::getConfig(); 18 19 try { 20 ob_clean(); 21 } catch (\Exception $e) { 22 } 23 24 // check if gzip is on 25 try { 26 if (count(array_intersect(['mod_deflate', 'mod_gzip'], apache_get_modules())) > 0) { 27 $fileName .= '.gz'; 28 } 29 } catch (\Exception $e) { 30 } 31 32 header('Content-Disposition: attachment; filename="'.$fileName.'"');