Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/treetrek.git

Removes EOL

Author Dave Jarvis <email>
Date 2026-02-09 12:41:41 GMT-0800
Commit 135d9c8814c443f539d8047bda05e93179e2e22b
Parent 9672ae7
Delta 7 lines added, 15 lines removed, 8-line decrease
Config.php
}
-
File.php
}
-
FilePage.php
}
-
FileRenderer.php
}
-
Git.php
}
-
MediaTypeSniffer.php
?>
-
RawPage.php
private $hash;
- public function __construct( $git, $hash ){
+ public function __construct( $git, $hash ) {
$this->git = $git;
$this->hash = $hash;
}
- public function render(){
+ public function render() {
$filename = $_GET['name'] ?? 'file';
$buffer = '';
$size = $this->git->getObjectSize( $this->hash );
- $this->git->stream( $this->hash, function( $d ) use ( &$buffer ){
- if( strlen( $buffer ) < 12 ){
+ $this->git->stream( $this->hash, function( $d ) use ( &$buffer ) {
+ if( strlen( $buffer ) < 12 ) {
$buffer .= $d;
}
} );
$mediaType = MediaTypeSniffer::isMediaType( $buffer, $filename );
- if( ob_get_level() ){
+ if( ob_get_level() ) {
ob_end_clean();
}
header( "Content-Type: " . $mediaType );
header( "Content-Length: " . $size );
header( "Content-Disposition: inline; filename=\"" . addslashes( $filename ) . "\"" );
- $this->git->stream( $this->hash, function( $d ){
+ $this->git->stream( $this->hash, function( $d ) {
echo $d;
} );
RepositoryList.php
return strcasecmp($nameA, $nameB);
}
+
return $posA <=> $posB;
});
}
}
-
Router.php
}
-
index.php
$page->render();
-