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, master has been updated
       via  27439f69f5b68e20775c8c0b6c81e6f490a1028b (commit)
       via  d81c515ef69708f765c360083790c0b1acb7f735 (commit)
      from  b3ca56cd187550da7cfad1c8dbdfe42abac1ad07 (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=27439f69f5b68e20775c8c0b6c81e6f490a1028b

commit 27439f69f5b68e20775c8c0b6c81e6f490a1028b
Author: Franck Villaume <[email protected]>
Date:   Mon Apr 4 15:23:20 2016 +0200

    tab vs. space

diff --git a/src/common/include/Group.class.php 
b/src/common/include/Group.class.php
index 2d6a152..3b0aa05 100644
--- a/src/common/include/Group.class.php
+++ b/src/common/include/Group.class.php
@@ -1778,20 +1778,20 @@ class Group extends Error {
                                return false;
                        }
                }
-      //
-      //       Delete Roadmaps
-      //
+               //
+               //      Delete Roadmaps
+               //
                $rmf = new RoadmapFactory($this);
-      $rm_arr = $rmf->getRoadmaps();
-      foreach ($rm_arr as $i) {
-         if (!is_object($i)) {
-            continue;
-         }
-         if (!$i->delete()) {
-            $this->setError(_('Could not properly delete the roadmap:') . ' ' 
. $i->getErrorMessage());
-            return false;
-         }
-      }
+               $rm_arr = $rmf->getRoadmaps();
+               foreach ($rm_arr as $i) {
+                       if (!is_object($i)) {
+                               continue;
+                       }
+                       if (!$i->delete()) {
+                               $this->setError(_('Could not properly delete 
the roadmap:') . ' ' . $i->getErrorMessage());
+                               return false;
+                       }
+               }
 
                //
                //      Delete Forums

https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=d81c515ef69708f765c360083790c0b1acb7f735

commit d81c515ef69708f765c360083790c0b1acb7f735
Author: Franck Villaume <[email protected]>
Date:   Sun Apr 3 18:40:11 2016 +0200

    new Widget for Project ScmStats: display repository history as widget

diff --git a/src/CHANGES b/src/CHANGES
index 92c3345..c7432ca 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -14,6 +14,7 @@ FusionForge 6.X:
 * Docman: support private directory. (TrivialDev)
 * Plugin AuthBuiltin: add captcha after 3 attempts with the same login [#795] 
(TrivialDev)
 * Widget MySystasks: new widget for user to display systasks perform on user 
projects (TrivialDev)
+* Widget ProjectScmStats: new widget for project to display SCM stats 
(TrivialDev)
 
 FusionForge 6.0.4:
 * Account Management System: fix sysCreateUser for UNIX: unix_gid dropped 
(TrivialDev)
diff --git a/src/common/widget/Widget.class.php 
b/src/common/widget/Widget.class.php
index faf8ee1..df0e79b 100644
--- a/src/common/widget/Widget.class.php
+++ b/src/common/widget/Widget.class.php
@@ -50,7 +50,7 @@ require_once $gfcommon.'widget/Widget_ProjectRss.class.php';
 require_once $gfcommon.'widget/Widget_ProjectLatestCommits.class.php';
 //require_once 'common/widget/Widget_ProjectTwitterFollow.class.php';
 //require_once('common/widget/Widget_ProjectWikiPage.class.php');
-//require_once 'common/widget/Widget_ProjectSvnStats.class.php';
+require_once 'common/widget/Widget_ProjectScmStats.class.php';
 
 require_once $gfcommon.'widget/Widget_HomeLatestNews.class.php';
 require_once $gfcommon.'widget/Widget_HomeStats.class.php';
@@ -267,12 +267,12 @@ require_once 
$gfcommon.'widget/Widget_HomeVersion.class.php';
                        case 'projecttwitterfollow':
                                $o = new Widget_ProjectTwitterFollow();
                                break;
-                       case 'projectsvnstats':
-                               $o = new Widget_ProjectSvnStats();
-                               break;
                        case 'projectwikipage':                    //not yet
                                $o = new Widget_ProjectWikiPage();
                                break;*/
+                       case 'projectscmstats':
+                               $o = new Widget_ProjectScmStats();
+                               break;
                        case 'projectlatestcommits':
                                $o = new Widget_ProjectLatestCommits();
                                break;
@@ -303,9 +303,9 @@ require_once 
$gfcommon.'widget/Widget_HomeVersion.class.php';
                                break;
                        case WidgetLayoutManager::OWNER_TYPE_GROUP:
                                // project home widgets
-                               $widgets = array('projectdescription', 
'projectmembers', 'projectinfo',
+                               $widgets = array('projectdescription', 
'projectmembers', 'projectinfo', 'projectscmstats',
                                                'projectlatestfilereleases', 
'projectlatestdocuments', 'projectlatestnews', 'projectpublicareas', 
//'projectwikipage' //not yet
-                                               'projectlatestcommits', 
'projecttwitterfollow', 'projectsvnstats', 'projectrss', 
'projectdocumentsactivity',
+                                               'projectlatestcommits', 
'projecttwitterfollow', 'projectrss', 'projectdocumentsactivity',
                                                );
                                break;
                        case WidgetLayoutManager::OWNER_TYPE_HOME:
diff --git a/src/common/widget/Widget_ProjectScmStats.class.php 
b/src/common/widget/Widget_ProjectScmStats.class.php
new file mode 100644
index 0000000..58a5d64
--- /dev/null
+++ b/src/common/widget/Widget_ProjectScmStats.class.php
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Copyright 2016, Franck Villaume - TrivialDev
+ * http://fusionforge.org
+ *
+ * This file is a part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+require_once 'Widget.class.php';
+
+/**
+ * Widget_ProjectScmStats
+ */
+
+class Widget_ProjectScmStats extends Widget {
+
+       var $content = array();
+
+       function __construct() {
+               $this->Widget('projectscmstats');
+               $request =& HTTPRequest::instance();
+               $pm = ProjectManager::instance();
+               $project = $pm->getProject($request->get('group_id'));
+               if ($project && $this->canBeUsedByProject($project) && 
forge_check_perm('scm', $project->getID(), 'read')) {
+                       $this->content['title'] = _('Repository History');
+               }
+       }
+
+       function getTitle() {
+               return $this->content['title'];
+       }
+
+       function getContent() {
+               $html_projectscmstats = '';
+               $request = HTTPRequest::instance();
+               $pm = ProjectManager::instance();
+               $project = $pm->getProject($request->get('group_id'));
+               $project_plugins = $project->getPlugins();
+               foreach ($project_plugins as $value) {
+                       $plugin_object = plugin_get_object($value);
+                       if ($plugin_object->provide('scm')) {
+                               $html_projectscmstats .= 
$plugin_object->getStatsBlock($project);
+                       }
+               }
+               return $html_projectscmstats;
+       }
+
+       function getDescription() {
+               return _('Display Repository Statistics history. Number of adds 
& updates per user since the init of the repository');
+       }
+
+       function canBeUsedByProject(&$project) {
+               return $project->usesSCM();
+       }
+
+       function getCategory() {
+               return _('SCM');
+       }
+
+       function isAvailable() {
+               return isset($this->content['title']);
+       }
+}
diff --git a/src/plugins/scmcvs/common/CVSPlugin.class.php 
b/src/plugins/scmcvs/common/CVSPlugin.class.php
index 90f53f5..60a7072 100644
--- a/src/plugins/scmcvs/common/CVSPlugin.class.php
+++ b/src/plugins/scmcvs/common/CVSPlugin.class.php
@@ -198,6 +198,8 @@ over it to the project's administrator.");
                                '<td class="onequarterwidth 
align-right"><strong>'.$total['commits'].'</strong></td>';
                        $b .= '</tr>';
                        $b .= $HTML->listTableBottom();
+               } else {
+                       $b .= $HTML->information(_('No history yet'));
                }
 
                return $b ;
diff --git a/src/plugins/scmgit/common/GitPlugin.class.php 
b/src/plugins/scmgit/common/GitPlugin.class.php
index 5107273..a66a8ca 100644
--- a/src/plugins/scmgit/common/GitPlugin.class.php
+++ b/src/plugins/scmgit/common/GitPlugin.class.php
@@ -380,6 +380,8 @@ control over it to the project's administrator.");
                        $cells[] = array($total['updates'], 'class' => 
'onequarterwidth align-right');
                        $b .= $HTML->multiTableRow(array('class' => 
$HTML->boxGetAltRowStyle($i, true)), $cells);
                        $b .= $HTML->listTableBottom();
+               } else {
+                       $b .= $HTML->information(_('No history yet');
                }
 
                return $b;
diff --git a/src/plugins/scmhg/common/HgPlugin.class.php 
b/src/plugins/scmhg/common/HgPlugin.class.php
index 894d7da..512a618 100644
--- a/src/plugins/scmhg/common/HgPlugin.class.php
+++ b/src/plugins/scmhg/common/HgPlugin.class.php
@@ -164,6 +164,8 @@ Offer DAV or SSH access.");
                        $cells[] = array($total['updates'], 'class' => 
'onequarterwidth align-right');
                        $b .= $HTML->multiTableRow(array('class' => 
$HTML->boxGetAltRowStyle($i, true)), $cells);
                        $b .= $HTML->listTableBottom();
+               } else {
+                       $b .= $HTML->information(_('No history yet'));
                }
 
                return $b;
diff --git a/src/plugins/scmsvn/common/SVNPlugin.class.php 
b/src/plugins/scmsvn/common/SVNPlugin.class.php
index 57d30f3..0ec2a85 100644
--- a/src/plugins/scmsvn/common/SVNPlugin.class.php
+++ b/src/plugins/scmsvn/common/SVNPlugin.class.php
@@ -244,6 +244,8 @@ some control over it to the project's administrator.");
                        $cells[] = array($total['updates'], 'class' => 
'onequarterwidth align-right');
                        $b .= $HTML->multiTableRow(array('class' => 
$HTML->boxGetAltRowStyle($i, true)), $cells);
                        $b .= $HTML->listTableBottom();
+               } else {
+                       $b .= $HTML->information(_('No history yet'));
                }
 
                return $b;

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

Summary of changes:
 src/CHANGES                                        |  1 +
 src/common/include/Group.class.php                 | 26 ++++----
 src/common/widget/Widget.class.php                 | 12 ++--
 src/common/widget/Widget_ProjectScmStats.class.php | 76 ++++++++++++++++++++++
 src/plugins/scmcvs/common/CVSPlugin.class.php      |  2 +
 src/plugins/scmgit/common/GitPlugin.class.php      |  2 +
 src/plugins/scmhg/common/HgPlugin.class.php        |  2 +
 src/plugins/scmsvn/common/SVNPlugin.class.php      |  2 +
 8 files changed, 104 insertions(+), 19 deletions(-)
 create mode 100644 src/common/widget/Widget_ProjectScmStats.class.php


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to