better looping in profile list

darcs-hash:20081120105726-84dde-bc863f49370dca492d46a5f46c65f46d01862acb.gz
This commit is contained in:
Evan Prodromou 2008-11-20 05:57:26 -05:00
parent d94e5f57ac
commit 383e740920
1 changed files with 6 additions and 5 deletions

View File

@ -34,13 +34,14 @@ class ProfileList {
common_element_start('ul', array('id' => 'profiles')); common_element_start('ul', array('id' => 'profiles'));
for ($i = 0; $i < min($cnt, PROFILES_PER_PAGE); $i++) { $cnt = 0;
if ($this->profile->fetch()) {
$this->show(); while ($this->profile->fetch()) {
} else { $cnt++;
// shouldn't happen! if($cnt > PROFILES_PER_PAGE) {
break; break;
} }
$this->show();
} }
common_element_end('ul'); common_element_end('ul');