Show no date for a story without one.
Such a story showed the date of the story before it, or caused a warning when it came first.
This commit is contained in:
+4
-2
@@ -18,6 +18,7 @@ function display_stories($id = NULL) {
|
||||
$page = '';
|
||||
$nolink = NULL;
|
||||
$posted = FALSE;
|
||||
$date = '';
|
||||
|
||||
if ($action == 'preview') {
|
||||
global $file_src;
|
||||
@@ -65,8 +66,9 @@ searches the title, author, date, and the text of each article.</p>'."\n";
|
||||
$entry_id = (int)$entry['id'];
|
||||
$queue_url = $entry['queue_url'] ? 1 : 0;
|
||||
$title = h($entry['title']);
|
||||
$entry_date = $date;
|
||||
if ($entry['date'])
|
||||
$date = '<time datetime="'.date("Y-m-d\TH:i:sP", strtotime($entry['date'])).'">' .
|
||||
$entry_date = '<time datetime="'.date("Y-m-d\TH:i:sP", strtotime($entry['date'])).'">' .
|
||||
date("Y-m-d H:i", strtotime($entry['date'])) . '</time>';
|
||||
$page .= '<li class="box">';
|
||||
$page .= '<article>';
|
||||
@@ -90,7 +92,7 @@ date("Y-m-d H:i", strtotime($entry['date'])) . '</time>';
|
||||
if ($entry['hidden'])
|
||||
$page .= '<span class="right red">[hidden]</span>';
|
||||
$page .= '<dt class="author">By</dt> <dd class="author">' . h($entry['author']) . '</dd>';
|
||||
$page .= '<dt class="date">Posted</dt> <dd class="date">' . $date . '</dd>';
|
||||
$page .= '<dt class="date">Posted</dt> <dd class="date">' . $entry_date . '</dd>';
|
||||
$page .= '</dl>';
|
||||
if (isset($file_src)) {
|
||||
$page .= '<img src="'.h($file_src).'" alt="'.$title.'" />';
|
||||
|
||||
Reference in New Issue
Block a user