From 1ab9f97ea381216ad2eab6948cfd6bc8066a76bc Mon Sep 17 00:00:00 2001 From: Matthias Mees Date: Fri, 2 Jan 2009 09:32:22 +0000 Subject: [PATCH] Applied fix by gimmel to history plugin. Keeps plugin from emitting empty spans if display or author are disabled in plugin config. --- .../serendipity_plugin_history.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/serendipity_plugin_history/serendipity_plugin_history.php b/plugins/serendipity_plugin_history/serendipity_plugin_history.php index b6b8e3a3..c01d9a10 100644 --- a/plugins/serendipity_plugin_history/serendipity_plugin_history.php +++ b/plugins/serendipity_plugin_history/serendipity_plugin_history.php @@ -187,11 +187,16 @@ class serendipity_plugin_history extends serendipity_plugin ); $date = ($displaydate=='0') ? '' : serendipity_strftime($dateformat,$e[$x]['timestamp']); $author = ($displayauthor) ? $e[$x]['author'] . ': ' : ''; + echo '
'; + if ($displayauthor) + { echo '' . $author . ''; } + if ($displaydate) + { echo '' . $date . ''; } $t = ($maxlength==0 || strlen($e[$x]['title'])<=$maxlength) ? $e[$x]['title'] : (trim(serendipity_mb('substr', $e[$x]['title'], 0, $maxlength-3)).' [...]'); - echo '
' . $author . ' '. $date . " ". htmlspecialchars($t) . '
' . '
' . - strip_tags($e[$x]['body']) . '
'; + echo "". htmlspecialchars($t) . "
"; + echo '
' . strip_tags($e[$x]['body']) . '
'; } echo (empty($outro)) ? '' : '
' . $outro . '
'; }