Buddy manager bugfix Buddy manager bugfix
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Buddy manager bugfix

Started by jesusarmy, January 08, 2008, 02:37:33 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

jesusarmy

I hope it's OK to post this here. I guess there must be some instructions on bug reports, but I really can't find them :-(

1. The buddy manager meta refresh pages don't display gracefully, as they show the main buddy manage page as well as the notifications. Depending on the custom theme, that may result in headers being shown halfway down the page. To fix this, in buddy_manage.php, find:

pagefooter();
replace (10* times) with:


pagefooter();ob_end_flush();die();

*That is, every time except the last one, 2 or 3 lines just before the end.

2. The second "form" doesn't terminate if there are no buddies. This potentially affects the display of the footer (for example, I have language and theme select forms at the bottom of the page). Also, the "select all" check box doesn't work, as the second form starts after the check box.

Find:

if ($tot_view[$view] == 0) { // if no buddies in this box we don't need the check/ uncheck all box in the toptable header
$display_checkall = "";
} else {
$display_checkall = <<<EOT
<span class="smallfont" style="float:right">
<label for="checkall_all">
$lang_buddy[users]: <strong>$total</strong>
<input type="checkbox" name="allbox" id="checkall_all"  onclick="checkBoxes(this.form, this.checked)">
</label>
</span>
EOT;
}



echo <<<EOT
<form action="buddy_manage.php" method="post" name="form">


Change to:


if ($tot_view[$view] == 0) { // if no buddies in this box we don't need the check/ uncheck all box in the toptable header
$display_checkall = "";
} else {
$display_checkall = <<<EOT
<form action="buddy_manage.php" method="post" name="form">
<span class="smallfont" style="float:right">
<label for="checkall_all">
$lang_buddy[users]: <strong>$total</strong>
<input type="checkbox" name="allbox" id="checkall_all"  onclick="checkBoxes(this.form, this.checked)">
</label>
</span>
EOT;
}



echo <<<EOT


Stramm