[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gforge-commits] gforge/www/scm index.php,1.15,1.16
From: |
cbayle |
Subject: |
[Gforge-commits] gforge/www/scm index.php,1.15,1.16 |
Date: |
Fri, 09 Jan 2004 18:29:42 -0600 |
Update of /cvsroot/gforge/gforge/www/scm
In directory db.perdue.net:/tmp/cvs-serv22779/www/scm
Modified Files:
index.php
Log Message:
Patch [ #615 ] CVS Stats User Script Generator + CVS project history
Index: index.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/scm/index.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- index.php 16 Dec 2003 20:05:01 -0000 1.15
+++ index.php 10 Jan 2004 00:29:39 -0000 1.16
@@ -82,29 +82,29 @@
<?php echo $HTML->boxTop($Language->getText('scm_index',
'history')); ?>
<?php
-// ################ is there commit info?
-$res_cvshist = db_query("SELECT * FROM group_cvs_history WHERE
group_id='$group_id'");
-if (db_numrows($res_cvshist) < 1) {
-?>
- <p>
- <?php echo $Language->getText('scm_index', 'nohistory'); ?>
-<?php
-} else {
-?>
- <p>
- <b><?php echo
$Language->getText('scm_index','developer_commits_adds'); ?></b>
- <br>
+// ######################### CVS
-<?php
- while ($row_cvshist = db_fetch_array($res_cvshist)) {
-?>
- <br><? print $row_cvshist['user_name'].'
('.$row_cvshist['cvs_commits_wk'].'/'
- .$row_cvshist['cvs_commits'].')
('.$row_cvshist['cvs_adds_wk'].'/'
- .$row_cvshist['cvs_adds'].')'; ?>
-<?php
- }
+$result = db_query("
+ SELECT u.realname, sum(commits) as commits, sum(adds) as adds,
sum(adds+commits) as combined
+ FROM stats_cvs_user s, users u
+ WHERE group_id='$group_id' AND s.user_id=u.user_id AND (commits>0 OR
adds >0)
+ GROUP BY group_id, realname
+ ORDER BY combined DESC, realname;
+");
-} // ### else no cvs history
+if (db_numrows($result) > 0) {
+ print '<hr size="1" noshade="noshade" />';
+
+ $headerMapping = array(
+ 'realname' => array("Name", 'width="60%"'),
+ 'adds' => array("Adds", 'width="13%"'),
+ 'commits' => array("Commits", 'width="13%"')
+ );
+ ShowResultSet($result,'', false, true, $headerMapping,
array('combined'));
+}
+else {
+ echo $Language->getText('scm_index', 'nohistory');
+}
// ############################## CVS Browsing
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gforge-commits] gforge/www/scm index.php,1.15,1.16,
cbayle <=