2008-02-15 19:05:09 +00:00
|
|
|
<?php
|
|
|
|
class TextOutput extends OutputModule {
|
|
|
|
function write( $filename ) {
|
|
|
|
global $faults;
|
|
|
|
$output = fopen( $filename, 'w' );
|
|
|
|
if( $output === false ) {
|
|
|
|
err( "Cannot write to $filename\n" );
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
foreach( $faults as $fault ) {
|
|
|
|
$svn = serialize( $fault['svn'] );
|
|
|
|
fprintf( $output, "%s\t%d\t%s\t%d\t%s\t%d\t%s\n",
|
|
|
|
$fault['module'],
|
|
|
|
$fault['level'],
|
|
|
|
$fault['object']['file'],
|
|
|
|
$fault['object']['line'],
|
2008-02-28 17:06:07 +00:00
|
|
|
!empty( $fault['author'] ) ? $fault['author'] : '?',
|
|
|
|
!empty( $fault['revision'] ) ? $fault['revision'] : '0',
|
2008-02-15 19:05:09 +00:00
|
|
|
$fault['reason']
|
|
|
|
);
|
|
|
|
}
|
|
|
|
fclose( $output );
|
2008-02-28 16:39:33 +00:00
|
|
|
return true;
|
2008-02-15 19:05:09 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
addModule( new TextOutput() );
|
|
|
|
?>
|