Commit:    aad64a2d07c4ecae725470aa12674c61bc014a6f
Author:    Sara Golemon <[email protected]>         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>";
     }


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to