com web/php: Preserve absolute href when stripping host.: include/layout.inc

From: Date: Wed, 24 Jul 2019 15:22:15 +0000
Subject: com web/php: Preserve absolute href when stripping host.: include/layout.inc
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-28249@lists.php.net to get a copy of this message
Commit: aad64a2d07c4ecae725470aa12674c61bc014a6f Author: Sara Golemon <pollita@php.net> Wed, 24 Jul 2019 11:22:15 -0400 Parents: 4edd760ae980376d1e4f87cf059bdd6b6ca38213 Branches: master Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=aad64a2d07c4ecae725470aa12674c61bc014a6f Log: Preserve absolute href when stripping host. Changed paths: M include/layout.inc Diff: diff --git a/include/layout.inc b/include/layout.inc index 82c3d11..397a608 100644 --- a/include/layout.inc +++ b/include/layout.inc @@ -536,7 +536,7 @@ function get_news_changes() $date->modify("+1 week"); if ($date->getTimestamp() > $_SERVER["REQUEST_TIME"]) { - $link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '', $NEWS_ENTRIES[0]["link"][0]["href"]); + $link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '/', $NEWS_ENTRIES[0]["link"][0]["href"]); $title = $NEWS_ENTRIES[0]["title"]; return "<a href='{$link}'>{$title}</a>"; }

« previous php.webmaster (#28249) next »