Only attempt to get filesize if file exists
Checking for bugs now in for loop to get bugs for each file specified,
counting the number of files with new bugs also
Output with a heading containing the filename (path) also
If it's our first bug file found, write to it to overwrite what was
there before, if it's a subsequent file, append to the file
Remove commented values
Load common-settings.php and get 3 x querystring params, exploding first
2 into arrays
$result is OK to start with, but if we have a file that's not available,
set it to error
If we don't have an error, the seen sizes aren't null and the seen and
actual sizes don't match, we need to get bug lines
Set $result to bugs and some vars to begin with
fseek, ftell and while loop to get chunks of content using pointer
movement methods. We also reduce $chars and $lines here to escape the
while loop as required
$output has line endings converted and trimmed, before exploding on new
lines and only getting last few lines, stitched back together with
imploder
The bug report is written, $tmpLoc established and all data put into the
$status array to feed back in the XHR response
This roughly describes what needs to be done here I think re using
what's in the querystring, what needs updating (the JS MDT array) and
what should be set at the end ($result).
You can change $result to off, error, ok or bugs to see the icon change
accordingly