[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 1e186ad0baa31f4180b8ad8054e53a93b49891df

Franck Villaume nerville at fusionforge.org
Fri Aug 29 21:18:33 CEST 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, Branch_5_3 has been updated
       via  1e186ad0baa31f4180b8ad8054e53a93b49891df (commit)
      from  8824ebf3434321c4211d51d7e604c6f6eb74d83a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1e186ad0baa31f4180b8ad8054e53a93b49891df
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Fri Aug 29 21:15:03 2014 +0200

    fix [#718]: legend block size exceeds the graph canvas

diff --git a/src/CHANGES b/src/CHANGES
index 75808e9..a314223 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -12,6 +12,7 @@ Fusionforge-5.3.2:
 * Tracker: fix custom status extrafield not updateable using mass update [#712] (TrivialDev)
 * Mailing lists: handle quotes and accents in description (Inria)
 * Stats: handle bad encoding when gathering Git stats, remove spurious warning when SVN repository isn't created yet (Inria)
+* SCM Reporting: fix legend block size exceed graph canvas [#718] (TrivialDev)
 * Plugin mediawiki: fix paths in import/export scripts (Inria)
 * Plugin fckeditor: dropped in favor of ckeditor
 * Plugin SCM SVN: fix sql error in activity tab on init log [#715] (TrivialDev)
diff --git a/src/www/scm/include/scm_utils.php b/src/www/scm/include/scm_utils.php
index e0785ad..4e12b6a 100644
--- a/src/www/scm/include/scm_utils.php
+++ b/src/www/scm/include/scm_utils.php
@@ -212,8 +212,18 @@ function commits_graph($group_id, $days, $chartid) {
 	if (db_numrows($res)) {
 		echo '<script type="text/javascript">//<![CDATA['."\n";
 		echo 'var data'.$chartid.' = new Array();';
+		$i = 1;
+		$lastvalue = 0;
 		while ($row = db_fetch_array($res)) {
-			echo 'data'.$chartid.'.push([\''.htmlentities($row[0]).' ('.$row[1].')\','.$row[1].']);';
+			if ($i <= 10) {
+				echo 'data'.$chartid.'.push([\''.htmlentities($row[0]).' ('.$row[1].')\','.$row[1].']);';
+			} elseif ($i > 10) {
+				$lastvalue += $row[1];
+			}
+			$i++;
+		}
+		if ($i > 10) {
+			echo 'data'.$chartid.'.push([\''._('Others').' ('.$lastvalue.')\','.$lastvalue.']);';
 		}
 		echo 'var plot'.$chartid.';';
 		echo 'jQuery(document).ready(function(){

-----------------------------------------------------------------------

Summary of changes:
 src/CHANGES                       |    1 +
 src/www/scm/include/scm_utils.php |   12 +++++++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list