mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Fix news links
As of commit 464ff73, news entry URLs target https://www.php.net
instead of http://php.net. Therefore the magic number 15 is no longer
appropriate. To also cater to existing news entries, we use a
preg_replace() now.
[1] <http://git.php.net/?p=web/php.git;a=commit;h=464ff738bafbd7882c3e9b399531702e95f08023>
This commit is contained in:
@@ -64,7 +64,7 @@ foreach($NEWS_ENTRIES as $entry) {
|
||||
}
|
||||
}
|
||||
foreach($frontpage as $entry) {
|
||||
$link = substr($entry["id"], 15); // Strip http://php.net/
|
||||
$link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '', $entry["id"]);
|
||||
$id = parse_url($entry["id"], PHP_URL_FRAGMENT);
|
||||
$date = date_create($entry['updated']);
|
||||
$date_human = date_format($date, 'd M Y');
|
||||
|
||||
Reference in New Issue
Block a user