diff options
Diffstat (limited to 'usr/local/www/crash_reporter.php')
-rwxr-xr-x | usr/local/www/crash_reporter.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr/local/www/crash_reporter.php b/usr/local/www/crash_reporter.php index 1599e0b..208dafb 100755 --- a/usr/local/www/crash_reporter.php +++ b/usr/local/www/crash_reporter.php @@ -42,13 +42,17 @@ require("guiconfig.inc"); require("functions.inc"); require("captiveportal.inc"); +define("FILE_SIZE", 150000); + function upload_crash_report($files) { global $g; $post = array(); $counter = 0; foreach($files as $file) { - $post["file{$counter}"] = "@{$file}"; - $counter++; + if(filesize($cf) < FILE_SIZE) { + $post["file{$counter}"] = "@{$file}"; + $counter++; + } } $ch = curl_init(); curl_setopt($ch, CURLOPT_HEADER, 0); @@ -121,7 +125,7 @@ $crash_report_header .= "\nCrash report details:\n"; $crash_reports .= $crash_report_header; if(is_array($crash_files)) { foreach($crash_files as $cf) { - if(filesize($cf) < 150000) { + if(filesize($cf) < FILE_SIZE) { $crash_reports .= "\nFilename: {$cf}\n"; $crash_reports .= file_get_contents($cf); } |