[Fusionforge-commits] FusionForge branch master updated. v6.0.5-1959-g529a0a5

Franck Villaume nerville at libremir.placard.fr.eu.org
Sat Jun 24 17:12:30 CEST 2017


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  529a0a5d3ad8cbaca7c1eddb263686fa852cb21c (commit)
       via  06f61b5a4a5ba1d1eff6b3f12b99585e1779d2a4 (commit)
       via  549074088f389c43d2373bdb52a4e601e13cb464 (commit)
      from  b9143ef86050d3fa274c78c1047df21b237c673a (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=529a0a5d3ad8cbaca7c1eddb263686fa852cb21c

commit 529a0a5d3ad8cbaca7c1eddb263686fa852cb21c
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Jun 24 17:12:13 2017 +0200

    use Activity object

diff --git a/src/plugins/globalactivity/www/index.php b/src/plugins/globalactivity/www/index.php
index 0bdd89d..9e3bec7 100644
--- a/src/plugins/globalactivity/www/index.php
+++ b/src/plugins/globalactivity/www/index.php
@@ -29,6 +29,7 @@
 
 require_once '../../env.inc.php';
 require_once $gfcommon.'include/pre.php';
+require_once $gfcommon.'include/Activity.class.php';
 
 global $HTML;
 
@@ -44,8 +45,7 @@ $show = getArrayFromRequest('show', array('forumpost',
 					  'frsrelease',
 					  'docmannew',
 					  'docmanupdate',
-					  'docgroupnew',
-					  'mediawiki'
+					  'docgroupnew'
 ));
 
 $date_format = _('%Y-%m-%d');
@@ -141,7 +141,14 @@ if (count($ids) < 1) {
 	} else {
 		$displayTableTop = 0;
 		$last_day = 0;
+		$ffactivity = new Activity();
 		foreach ($results as $arr) {
+
+			$displayinfo = $ffactivity->getDisplayInfo($arr);
+			if (!$displayinfo) {
+				continue;
+			}
+
 			$group_id = $arr['group_id'];
 			if (!$displayTableTop) {
 				$theader = array();
@@ -157,73 +164,11 @@ if (count($ids) < 1) {
 				echo '<tr class="tableheading"><td colspan="4">'.strftime($date_format, $arr['activity_date']).'</td></tr>';
 				$last_day=strftime($date_format, $arr['activity_date']);
 			}
-			switch (@$arr['section']) {
-				case 'scm': {
-					$icon = html_image('ic/cvs16b.png','','',array('alt'=>_('Source Code')));
-					$url = util_make_link('/scm/'.$arr['ref_id'].$arr['subref_id'],_('scm commit')._(': ').$arr['description']);
-					break;
-				}
-				case 'trackeropen': {
-					$icon = html_image('ic/tracker20g.png','','',array('alt'=>_('Trackers')));
-					$url = util_make_link('/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id'],_('Tracker Item').' [#'.$arr['subref_id'].'] '.$arr['description'].' '._('Opened'));
-					break;
-				}
-				case 'trackerclose': {
-					$icon = html_image('ic/tracker20g.png','','',array('alt'=>_('Trackers')));
-					$url = util_make_link('/tracker/?func=detail&atid='.$arr['ref_id'].'&aid='.$arr['subref_id'].'&group_id='.$arr['group_id'],_('Tracker Item').' [#'.$arr['subref_id'].'] '.$arr['description'].' '._('Closed'));
-					break;
-				}
-				case 'frsrelease': {
-					$icon = html_image('ic/cvs16b.png','','',array('alt'=>_('Files')));
-					$url = util_make_link('/frs/?release_id='.$arr['subref_id'].'&group_id='.$arr['group_id'],_('FRS Release').' '.$arr['description']);
-					break;
-				}
-				case 'forumpost': {
-					$icon = html_image('ic/forum20g.png','','',array('alt'=>_('Forum')));
-					$url = util_make_link('/forum/message.php?msg_id='.$arr['subref_id'].'&group_id='.$arr['group_id'],_('Forum Post').' '.$arr['description']);
-					break;
-				}
-				case 'news': {
-					$icon = html_image('ic/write16w.png','','',array('alt'=>_('News')));
-					$url = util_make_link('/forum/forum.php?forum_id='.$arr['subref_id'],_('News').' '.$arr['description']);
-					break;
-				}
-				case 'taskopen': {
-					$icon = html_image('ic/taskman20w.png','','',array('alt'=>_('Tasks')));
-					$url = util_make_link('/pm/task.php?func=detailtask&project_task_id='.$arr['subref_id'].'&group_id='.$arr['group_id'].'&group_project_id='.$arr['ref_id'],_('Tasks').' '.$arr['description']);
-					break;
-				}
-				case 'taskclose': {
-					$icon = html_image('ic/taskman20w.png','','',array('alt'=>_('Tasks')));
-					$url = util_make_link('/pm/task.php?func=detailtask&project_task_id='.$arr['subref_id'].'&group_id='.$arr['group_id'].'&group_project_id='.$arr['ref_id'],_('Tasks').' '.$arr['description']);
-					break;
-				}
-
-				case 'taskdelete': {
-					$icon = html_image('ic/taskman20w.png','','',array('alt'=>_('Tasks')));
-					$url = util_make_link('/pm/task.php?func=detailtask&project_task_id='.$arr['subref_id'].'&group_id='.$arr['group_id'].'&group_project_id='.$arr['ref_id'],_('Tasks').' '.$arr['description']);
-					break;
-				}
-				case 'docmannew':
-				case 'docmanupdate': {
-					$icon = html_image('ic/docman16b.png', '', '', array('alt'=>_('Documents')));
-					$url = util_make_link('docman/?group_id='.$arr['group_id'].'&view=listfile&dirid='.$arr['ref_id'],_('Document').' '.$arr['description']);
-					break;
-				}
-				case 'docgroupnew': {
-					$icon = $HTML->getFolderPic(_('Directory'), 'directory');
-					$url = util_make_link('docman/?group_id='.$arr['group_id'].'&view=listfile&dirid='.$arr['subref_id'],_('Directory').' '.$arr['description']);
-					break;
-				}
-				default: {
-					$icon = isset($arr['icon']) ? $arr['icon'] : '';
-					$url = '<a href="'.$arr['link'].'">'.$arr['title'].'</a>';
-				}
-			}
+
 			$cells = array();
 			$cells[][] = util_make_link_g(group_get_object($group_id)->getUnixName(),$group_id,group_get_object($group_id)->getPublicName());
 			$cells[][] = date('H:i:s',$arr['activity_date']);
-			$cells[][] = $icon .' '.$url;
+			$cells[][] = $displayinfo;
 			if (isset($arr['user_name']) && $arr['user_name']) {
 				$cells[][] = util_display_user($arr['user_name'], $arr['user_id'],$arr['realname']);
 			} else {

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

commit 06f61b5a4a5ba1d1eff6b3f12b99585e1779d2a4
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Jun 24 17:11:58 2017 +0200

    missing global

diff --git a/src/common/include/Activity.class.php b/src/common/include/Activity.class.php
index 97d1ddb..df699a2 100644
--- a/src/common/include/Activity.class.php
+++ b/src/common/include/Activity.class.php
@@ -81,6 +81,7 @@ class Activity extends FFError {
 	}
 
 	function getDisplayInfo($arr) {
+		global $HTML;
 		$docmanerror = 0;
 		switch (@$arr['section']) {
 			case 'scm': {

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

commit 549074088f389c43d2373bdb52a4e601e13cb464
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Jun 24 17:01:54 2017 +0200

    fix PHP syntax

diff --git a/src/common/widget/Widget_ProjectLatestCommits.class.php b/src/common/widget/Widget_ProjectLatestCommits.class.php
index 872d9dd..c67397f 100644
--- a/src/common/widget/Widget_ProjectLatestCommits.class.php
+++ b/src/common/widget/Widget_ProjectLatestCommits.class.php
@@ -68,7 +68,7 @@ class Widget_ProjectLatestCommits extends Widget {
 					$revisionDescription .= ' [...]';
 				}
 				$divattr = array('class' => '', 'style' => 'border-bottom:1px solid #ddd');
-				if (($key + 1) % 2) == 1) {
+				if ((($key + 1) % 2) == 1) {
 					$divattr['class'] = 'bgcolor-white';
 				} else {
 					$divattr['class'] = 'bgcolor-grey';

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

Summary of changes:
 src/common/include/Activity.class.php              |  1 +
 .../widget/Widget_ProjectLatestCommits.class.php   |  2 +-
 src/plugins/globalactivity/www/index.php           | 77 ++++------------------
 3 files changed, 13 insertions(+), 67 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list