Skip to content

Commit

Permalink
avoid listing faxes not fully received
Browse files Browse the repository at this point in the history
  • Loading branch information
sunsetsystems committed Sep 27, 2006
1 parent 73e4816 commit 1a7c749
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions interface/fax/faxq.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@
exec("faxstat -r -l -h " . $GLOBALS['hylafax_server'], $statlines);
$mlines = array();
foreach ($statlines as $line) {
// This gets pagecount, sender, time, filename.
if (preg_match('/^-\S+\s+(\d+)\s+\S+\s+(.+)\s+(\S+)\s+(\S+)\s*$/', $line, $matches)) {
// This gets pagecount, sender, time, filename. We are expecting the
// string to start with "-rw-rw-" so as to exclude faxes not yet fully
// received, for which permissions are "-rw----".
if (preg_match('/^-r\S\Sr\S\S\s+(\d+)\s+\S+\s+(.+)\s+(\S+)\s+(\S+)\s*$/', $line, $matches)) {
$mlines[$matches[4]] = $matches;
}
}
Expand Down

0 comments on commit 1a7c749

Please sign in to comment.