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, 6.1 has been updated
       via  5aa4fd0b33e309c655df18ed79eeece21f5c44d6 (commit)
       via  f78de92d0b35b1f7e8bcfd0beecf1556f42e5d94 (commit)
      from  2ee79ee6a37d4f7212cebd179746e3fdca77f0f6 (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=5aa4fd0b33e309c655df18ed79eeece21f5c44d6

commit 5aa4fd0b33e309c655df18ed79eeece21f5c44d6
Author: Franck Villaume <[email protected]>
Date:   Sun Mar 18 17:30:13 2018 +0100

    User Widget: Latest Commit: support multirepo

diff --git a/src/common/widget/Widget_MyLatestCommits.class.php 
b/src/common/widget/Widget_MyLatestCommits.class.php
index dcce876..ca3798b 100644
--- a/src/common/widget/Widget_MyLatestCommits.class.php
+++ b/src/common/widget/Widget_MyLatestCommits.class.php
@@ -46,8 +46,15 @@ class Widget_MyLatestCommits extends Widget {
                return _('My Latest Commits');
        }
 
-       public function _getLinkToCommit($project, $commit_id, $pluginName) {
-               return 
util_make_link('/scm/browser.php?group_id='.$project->getID().'&scm_plugin='.$pluginName.'&commit='.$commit_id,
 _('commit')._(': ').$commit_id);
+       public function _getLinkToCommit($project, $commit_id, $pluginName, 
$repo_name) {
+               return 
util_make_link('/scm/browser.php?group_id='.$project->getID().'&scm_plugin='.$pluginName.'&commit='.$commit_id.'&extra='.$repo_name,
 _('commit')._(': ').$commit_id);
+       }
+
+       static function commit_dateorder($a, $b) {
+               if ($a['date'] == $b['date']) {
+                       return 0;
+               }
+               return ($a['date'] > $b['date']) ? -1 : 1;
        }
 
        public function getContent() {
@@ -84,6 +91,8 @@ class Widget_MyLatestCommits extends Widget {
                                $revisions = array_merge($revisions, 
$scmPlugin->getCommits($project, $user, $this->_nb_commits));
                        }
                        if (count($revisions) > 0) {
+                               usort($revisions, array($this, 
'commit_dateorder'));
+                               $revisions = array_slice($revisions, 0, 
$this->_nb_commits, true);
                                $global_nb_revisions += count($revisions);
                                list($hide_now, $count_diff, $hide_url) = 
my_hide_url('scm', $project->getID(), $hide_item_id, count($projects), 
$hide_scm);
                                $html .= html_e('div', array(), 
$hide_url.util_make_link('/scm/?group_id='.$project->getID(), 
$project->getPublicName()));
@@ -102,8 +111,8 @@ class Widget_MyLatestCommits extends Widget {
                                                }
                                                $html .= html_e('div', $divattr,
                                                                html_e('div', 
array('style' => 'font-size:0.98em'),
-                                                                       
$this->_getLinkToCommit($project, $revision['commit_id'], 
$revision['pluginName']).
-                                                                       ' 
'._('on').' '.
+                                                                       
$this->_getLinkToCommit($project, $revision['commit_id'], 
$revision['pluginName'], $revision['repo_name']).
+                                                                       ' 
'._('on repository').' '.$revision['repo_name'].' '.
                                                                        
date(_("Y-m-d H:i"), $revision['date'])).
                                                                html_e('div', 
array('style' => 'padding-left:20px; padding-bottom:4px; color:#555'),
                                                                        
$revisionDescription));

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

commit f78de92d0b35b1f7e8bcfd0beecf1556f42e5d94
Author: Franck Villaume <[email protected]>
Date:   Sun Mar 18 17:20:30 2018 +0100

    tabs

diff --git a/src/common/widget/Widget_ProjectLatestCommits.class.php 
b/src/common/widget/Widget_ProjectLatestCommits.class.php
index 04c7a1e..d0d6e1d 100644
--- a/src/common/widget/Widget_ProjectLatestCommits.class.php
+++ b/src/common/widget/Widget_ProjectLatestCommits.class.php
@@ -45,13 +45,12 @@ class Widget_ProjectLatestCommits extends Widget {
                return 
util_make_link('/scm/browser.php?group_id='.$project->getID().'&scm_plugin='.$plugin_name.'&commit='.$commit_id.'&extra='.$repo_name,
 _('commit')._(': ').$commit_id);
        }
        
-        static function commit_dateorder($a, $b) {
-                if ($a['date'] == $b['date']) {
-                        return 0;
-                }
-                return ($a['date'] > $b['date']) ? -1 : 1;
-        }
-
+       static function commit_dateorder($a, $b) {
+               if ($a['date'] == $b['date']) {
+                       return 0;
+               }
+               return ($a['date'] > $b['date']) ? -1 : 1;
+       }
 
        public function getContent() {
                global $HTML;

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

Summary of changes:
 src/common/widget/Widget_MyLatestCommits.class.php      | 17 +++++++++++++----
 src/common/widget/Widget_ProjectLatestCommits.class.php | 13 ++++++-------
 2 files changed, 19 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
FusionForge

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

Reply via email to