From 367c0bd0db50a3d47831329d9625c3f8011c30fd Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Sun, 8 Mar 2020 07:58:36 +0100 Subject: [PATCH] [ROSWEB] Relative paths suck when symlinks are involved, so source the layout parts from the only absolute server path that is guaranteed to work. --- www/www.reactos.org/rosweb/rosweb.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/www/www.reactos.org/rosweb/rosweb.php b/www/www.reactos.org/rosweb/rosweb.php index b0f239e7..7f27a412 100644 --- a/www/www.reactos.org/rosweb/rosweb.php +++ b/www/www.reactos.org/rosweb/rosweb.php @@ -66,11 +66,11 @@ // Server name might be just an IP address if (preg_match("#[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}#", $_SERVER["SERVER_NAME"])) return $_SERVER["SERVER_NAME"]; - + // If it' a DNS address, return the domain name along with the suffix if (preg_match("#(\.[^.]+\.[^.]+$)#", $_SERVER["SERVER_NAME"], $matches)) return $matches[1]; - + // Otherwise return nothing return ""; } @@ -96,9 +96,9 @@ private function _queryProvider($part) { - if (file_exists(__DIR__ . '../../www.reactos.org_content/parts/' . $part)) + if (file_exists('/srv/www/www.reactos.org_content/parts/' . $part)) { - readfile(__DIR__ . '../../www.reactos.org_content/parts/' . $part); + readfile('/srv/www/www.reactos.org_content/parts/' . $part); } else {