From b8fca24d102ed9912b53a1f840dd4b10ee837765 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 3 Feb 2024 19:34:12 +0200 Subject: [PATCH] make links relative --- src/controller/error.php | 13 +------------ src/controller/room.php | 16 +++------------- 2 files changed, 4 insertions(+), 25 deletions(-) diff --git a/src/controller/error.php b/src/controller/error.php index 7bc19de..a45d4b2 100644 --- a/src/controller/error.php +++ b/src/controller/error.php @@ -22,18 +22,7 @@ class Error file_get_contents( __DIR__ . '/../../logo.ascii' ), - ( - $this->_config->gemini->server->port == 1965 ? - sprintf( - 'gemini://%s', - $this->_config->gemini->server->host - ) : - sprintf( - 'gemini://%s:%d', - $this->_config->gemini->server->host, - $this->_config->gemini->server->port - ) - ) + '/' ], file_get_contents( __DIR__ . '/../view/oops.gemini' diff --git a/src/controller/room.php b/src/controller/room.php index abb1c40..eb956f2 100644 --- a/src/controller/room.php +++ b/src/controller/room.php @@ -785,19 +785,9 @@ class Room $tag ? '=> ' : null ) . - ( - $this->_config->gemini->server->port == 1965 ? - sprintf( - 'gemini://%s%s', - $this->_config->gemini->server->host, - $path - ) : - sprintf( - 'gemini://%s:%d%s', - $this->_config->gemini->server->host, - $this->_config->gemini->server->port, - $path - ) + sprintf( + '/%s', + $path ) . (