Archived
1
0

Fix karma bars not appearing on summary pages:

Create a footer if none exists yet and add the bar to it.
This commit is contained in:
Judebert
2008-04-19 04:21:00 +00:00
parent b0be8fdfdf
commit 0a88e1f307
@@ -1118,16 +1118,32 @@ END_IMG_CSS;
} }
// Where's the footer? Normally it would be // Where's the footer? Normally it would be
// in addData['extended']; but if the cache // in eventData[n]['add_footer'] but if the
// plugin is used, it's elsewhere. This // cache plugin is used, it's in
// method retrieves it either way. // eventData[n]['properties']['ep_cache_add_footer'].
// This method retrieves it either way.
$footer = &$this->getFieldReference('add_footer', $eventData[$i]); $footer = &$this->getFieldReference('add_footer', $eventData[$i]);
/*--JAM: Probably time to delete this
// Create a footer if one doesn't already exist // Depending on what existed, $footer could
if (!isset($eventData[$i]['add_footer'])) { // be referencing the cached version, the
// uncached version, or even a new empty
// string. In particular, if $eventData[$i]
// has no properties, and no 'add_footer' key,
// $footer is referencing a new empty string,
// so adding a karma bar to $footer would do
// nothing.
//
// We could be referencing an empty uncached
// 'add_footer', but empty cache entries are
// never returned.
//
// Reference a footer that will be printed
if (empty($footer) && !isset($eventData[$i]['add_footer'])) {
$eventData[$i]['add_footer'] = ''; $eventData[$i]['add_footer'] = '';
$footer = &$eventData[$i]['add_footer'];
// It's still empty, but it's referencing
// the right place.
} }
*/
if ($track_exits) { if ($track_exits) {
$footer .= $this->getExits($entryid, true); $footer .= $this->getExits($entryid, true);