better looping in profile list
darcs-hash:20081120105726-84dde-bc863f49370dca492d46a5f46c65f46d01862acb.gz
This commit is contained in:
parent
d94e5f57ac
commit
383e740920
|
@ -34,13 +34,14 @@ class ProfileList {
|
|||
|
||||
common_element_start('ul', array('id' => 'profiles'));
|
||||
|
||||
for ($i = 0; $i < min($cnt, PROFILES_PER_PAGE); $i++) {
|
||||
if ($this->profile->fetch()) {
|
||||
$this->show();
|
||||
} else {
|
||||
// shouldn't happen!
|
||||
$cnt = 0;
|
||||
|
||||
while ($this->profile->fetch()) {
|
||||
$cnt++;
|
||||
if($cnt > PROFILES_PER_PAGE) {
|
||||
break;
|
||||
}
|
||||
$this->show();
|
||||
}
|
||||
|
||||
common_element_end('ul');
|
||||
|
|
Loading…
Reference in New Issue
Block a user