Dave Jarvis' Repositories

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

Updates clone functionality

AuthorDave Jarvis <email>
Date2026-02-16 01:01:18 GMT-0800
Commit7e6c266a3be82322c7ce71ab7b2dc700a585be04
Parentafffc2d
pages/ClonePage.php
public function render() {
+ if( $this->subPath === '' ) {
+ $this->redirectBrowser();
+ return;
+ }
+
if( str_ends_with( $this->subPath, 'info/refs' ) ) {
$this->renderInfoRefs();
http_response_code( 404 );
echo "Not Found";
+ exit;
+ }
+
+ private function redirectBrowser(): void {
+ $uiUrl = str_replace( '.git', '', $_SERVER['REQUEST_URI'] );
+ header( "Location: $uiUrl" );
exit;
}
Delta11 lines added, 0 lines removed, 11-line increase