cvs: pres2 / index.php

From: Date: Mon, 30 Aug 2004 18:23:25 +0000
Subject: cvs: pres2 / index.php
Groups: php.pres 
Request: Send a blank email to pres+get-1041@lists.php.net to get a copy of this message
jmcastagnetto Mon Aug 30 14:23:25 2004 EDT Modified files: /pres2 index.php Log: Avoid division by zero error with the mods introduced by Derick. http://cvs.php.net/diff.php/pres2/index.php?r1=1.36&r2=1.37&ty=u Index: pres2/index.php diff -u pres2/index.php:1.36 pres2/index.php:1.37 --- pres2/index.php:1.36 Fri Aug 27 04:55:19 2004 +++ pres2/index.php Mon Aug 30 14:23:25 2004 @@ -134,6 +134,9 @@ ksort($topics); print('<table width="100%"><tr>'."\n"); $col = 0; + if (!isset($topic_cols) || $topic_cols == 0) { + $topic_cols = 1; + } $percent = 100 / $topic_cols; foreach($topics as $i => $topic) { printf('<td width="%.1f%%" class="output" style="font-size: 1.8em; padding-bottom: 15px"><a href="' . $baseDir . 'index.php/' . urlencode($i) . '">' . $i . '</a> (' . $topic['count'] . ')</td>'."\n", $percent);

« previous php.pres (#1041) next »