# $Id: cvsweb-colored_deltas.diff,v 1.5 2005/10/07 02:26:25 jcs Exp $ # # color change deltas based on their size. idea ripped from openbsd's # cvsweb (which was an implementation of aaron campbell's idea by bob # beck. he told me so!) # # patched against cvsweb 1.112 # # by joshua stein # --- cvsweb.orig Sun Aug 17 22:01:10 2003 +++ cvsweb Sat Jan 10 11:14:29 2004 @@ -3233,6 +3233,12 @@ my @breaks = sort { $a <=> $b } keys %desc; $i = 0; + my %desccolors = ( + 'second' => '#ff0000', 'minute' => '#ff0000', + 'hour' => '#ff0000', 'day' => '#ff0000', + 'week' => '#aaaa00', 'month' => '#00aa00', + 'year' => '#000000'); + while ($i <= $#breaks && $secs >= 2 * $breaks[$i]) { $i++; } @@ -3250,7 +3256,8 @@ } } - return $retval; + return "" . $retval + . ""; } ##