mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
Fall back to 'published' date is 'updated' is not available (and fix entry)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<title>Southeast PHP Conference</title>
|
||||
<id>http://php.net/archive/2018.php#id2018-06-06-1</id>
|
||||
<published>2018-06-06T11:02:22+00:00</published>
|
||||
<published>2018-06-06T11:02:22+00:00</published>
|
||||
<updated>2018-06-06T11:02:22+00:00</updated>
|
||||
<default:finalTeaserDate xmlns="http://php.net/ns/news">2018-06-06</default:finalTeaserDate>
|
||||
<category term="conferences" label="Conference announcement"/>
|
||||
<link href="http://php.net/conferences/index.php#id2018-06-06-1" rel="alternate" type="text/html"/>
|
||||
|
||||
@@ -18,7 +18,7 @@ $panels = '<p class="prepend"><a href="https://wiki.php.net/conferences">Want to
|
||||
foreach ((new NewsHandler())->getConferences() as $entry) {
|
||||
$link = preg_replace('~^(http://php.net/|https://www.php.net/)~', '', $entry["id"]);
|
||||
$id = parse_url($entry["id"], PHP_URL_FRAGMENT);
|
||||
$date = date_format(date_create($entry["updated"]), 'Y-m-d');
|
||||
$date = date_format(date_create($entry["updated"] ?? $entry["published"]), 'Y-m-d');
|
||||
$content .= '<div class="newsentry">';
|
||||
$content .= '<h3 class="newstitle title"><a href="' . $MYSITE . $link . '" id="' . $id . '">' . $entry["title"] . '</a></h3>';
|
||||
$content .= '<div class="newsimage">';
|
||||
|
||||
Reference in New Issue
Block a user