Better math for seciton

This commit is contained in:
Evan Prodromou 2009-01-23 06:11:05 +01:00
parent a130bb9d6d
commit a7b80ef230

View File

@ -76,7 +76,7 @@ class TagCloudSection extends Section
$this->out->elementStart('ul', 'tags xoxo tag-cloud'); $this->out->elementStart('ul', 'tags xoxo tag-cloud');
foreach ($tw as $tag => $weight) { foreach ($tw as $tag => $weight) {
$this->showTag($tag, $weight, ($sum == 0) ? $weight : $weight/$sum); $this->showTag($tag, $weight, ($sum == 0) ? 0 : $weight/$sum);
} }
$this->out->elementEnd('ul'); $this->out->elementEnd('ul');