require_once dirname(__FILE__) . '/lib/base.php';
-$fl = &$VC->getFileObject($where, $cache);
+$fl = $VC->getFileObject($where, $cache);
Chora::checkError($fl);
$extraLink = Chora::getFileViews();
-$author_stats = array();
+$stats = array();
foreach ($fl->logs as $lg) {
- @$author_stats[$lg->queryAuthor()]++;
+ $qa = $lg->queryAuthor();
+ if (!isset($stats[$qa])) {
+ $stats[$qa] = 0;
+ }
+ ++$stats[$qa];
}
-arsort($author_stats);
+arsort($stats);
$title = sprintf(_("Statistics for %s"), Text::htmlallspaces($where));
Horde::addScriptFile('prototype.js', 'horde', true);
<tbody>
<?php
-$most = max($author_stats);
+$most = max($stats);
$factor = $most / 400;
-foreach ($author_stats as $author => $commits): $width = (int)($commits / $factor); ?>
+foreach ($stats as $author => $commits): $width = (int)($commits / $factor); ?>
<tr>
<td class="rightAlign"><?php echo $author ?> </td>
- <td><?php echo Horde::img('pixel.php?c=bbcbff', '', 'style="border:1px solid #000;" width="' . $width . '" height="10"', $registry->get('webroot', 'horde') . '/services/images') . ' (' . $commits . ')</td>' ?>
+ <td><?php echo Horde::img('pixel.php?c=bbcbff', '', 'id="statsImg" width="' . $width . '" height="10"', $registry->get('webroot', 'horde') . '/services/images') . ' (' . $commits . ')</td>' ?>
</tr>
<?php endforeach ?>
</tbody>
font-weight: bold;
padding: 5px;
}
+table.hrdiff caption img, .statsImg {
+ border: 1px solid #000;
+}
table.hrdiff caption img {
height: 10px;
width: 10px;
- border: 1px solid #000;
margin-left: 0.5em;
vertical-align: baseline;
}