Gossamer Forum
Quote Reply
page.cgi
ok.. where is $GRAND_TOTAL defined?? it doesn't look like it's on page.cgi..

anyways.. in sub generate_detailed_page it seems that the outgoing hash of:

grand_total should be equal to $total

cause a few lines up there is

Code:
$total = $link_db->total();

there is another $GRAND_TOTAL in generate_cool_page.. but i don't know if it works.. haven't actually tried.. i don't think so though.. since i don't see it being defined.. it is globalized at the beginning though..

jerry
Quote Reply
Re: page.cgi In reply to
Your right, you should add:

$GRAND_TOTAL = $LINKDB->total();

at the beginning. Also, edit nph-build.cgi and change:

$GRAND_TOTAL = $LINKDB->total() + $total;

to:

$GRAND_TOTAL = $LINKDB->total();

I no longer thing the total links should include alternates, and this would bring page.cgi and nph-build.cgi in sync.

Also, you can then remove the reference in build_detailed_pages (not neccessary, but saves a few processes).

Thanks for the bug info!

Alex
Quote Reply
Re: page.cgi In reply to
can we just get rid of this whole thing in nph-build.cgi and of course switch it with the grand_total line above..

Code:
# Get the total number of links (Alternates + Links Table).
$sth = $LINKDB->prepare ("SELECT COUNT(*) FROM CategoryAlternates");
$sth->execute();
($total) = $sth->fetchrow_array;
$GRAND_TOTAL = $LINKDB->total() + $total;

we could right??

jerry