$be->summary = self::summarize($content);
}
+ // Don't save an identical summary
+
+ if ($be->summary == $be->content) {
+ $be->summary = null;
+ }
+
$url = common_local_url('showblogentry', array('id' => $be->id));
if (!array_key_exists('uri', $options)) {
$out->element('a', array('href' => $notice->bestUrl()), $entry->title);
$out->elementEnd('h4');
- $out->element('div', 'blog-entry-summary', $entry->summary);
-
- // XXX: hide content initially; click More... for full text.
-
- $out->element('div', 'blog-entry-content', $entry->content);
+ if (!empty($entry->summary)) {
+ $out->element('div', 'blog-entry-summary', $entry->summary);
+ } else {
+ // XXX: hide content initially; click More... for full text.
+ $out->element('div', 'blog-entry-content', $entry->content);
+ }
}
}