Hi,
sorry if I missed it when searching the errors...

There seems to be a problem with _biblio_category_separator_bar. It uses a static _text variable. If it is filled, the function will first write a closing </div><!-- end category-section --> before opening the new separator bar.

The problem occurs when you have page where you biblio_db_search twice, e.g.

My Papers: <?php biblio_db_search('author','Myself','inline'); ?>
blabla
Additional papers of our group: <?php biblio_db_search('citekey','workgroup','inline'); ?>

In the second call of biblio_db_search the static _text will still be filled, so this results in a code like this:

<div class="biblio-noyear"><div class="biblio-inline">
</div><!-- end category-section -->
<div class="biblio-separator-bar">2008</div>
...

and this destroys the styling of the whole page as you can imagine. Sorry for not offering a patch, but I haven't found a quick solution for this :-(

CommentFileSizeAuthor
#4 biblio_separator_bar_reset.patch641 bytesFrank Steiner

Comments

rjerome’s picture

Yes, I see the problem. Looks like we need to indicate to the function either via a new argument or via the attrib array that the incoming call should reset $_text.

Ron.

Frank Steiner’s picture

Like passing a call-by-reference variable down from biblio_show_result? I guess it should be safe to reset in every new call to biblio_show_result...

rjerome’s picture

Yes, I'm thinking something like

function _biblio_category_separator_bar($attrib, $node, $reset=FALSE) {
  static $_text = '';
  if ($reset) {$_text=''; return;}
....

Then either before or after the...

  while ($node = db_fetch_object($result)) {

... loop in biblio_show_results() make a call to _biblio_category_separator_bar(NULL, NULL, TRUE);

Frank Steiner’s picture

Status: Active » Needs review
StatusFileSize
new641 bytes

Tried your code and it fixes all problems at our site.

rjerome’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.