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 891a4b0fbd54a18b022c42c7cbc31e49169f86fd (commit)
via 8592ded364fb14c9e2ee69c6f7dde454e033d6f6 (commit)
from ca8954b2bfefa9dd6de7469b910aaacc9729c8e6 (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=891a4b0fbd54a18b022c42c7cbc31e49169f86fd
commit 891a4b0fbd54a18b022c42c7cbc31e49169f86fd
Author: Franck Villaume <[email protected]>
Date: Sun Jun 5 17:27:42 2016 +0200
sync CHANGES
diff --git a/src/CHANGES b/src/CHANGES
index f78d96e..7ee28c4 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -18,6 +18,7 @@ FusionForge 6.X:
* Spellcheck (Anders Jonsson)
* Tracker: keep values in artifact new submit form on error. (TrivialDev)
* Tracker: add new extrafield: text regex (TrivialDev)
+* Tracker: add new extrafield: User (TrivialDev)
* Tracker: add support for mandatory fields on workflow of artifact
(TrivialDev)
* Tracker: add support for description on extrafield to be used in tooltip
(TrivialDev)
* Utils: cross ref document. Use [DNNN] where NNN is the ID of the document.
(TrivialDev)
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=8592ded364fb14c9e2ee69c6f7dde454e033d6f6
commit 8592ded364fb14c9e2ee69c6f7dde454e033d6f6
Author: Franck Villaume <[email protected]>
Date: Sun Jun 5 17:27:08 2016 +0200
Utils cross ref: add support for [DNNN] format where NNN is the id of the
document to cross ref
diff --git a/src/CHANGES b/src/CHANGES
index f21d53a..f78d96e 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -20,6 +20,7 @@ FusionForge 6.X:
* Tracker: add new extrafield: text regex (TrivialDev)
* Tracker: add support for mandatory fields on workflow of artifact
(TrivialDev)
* Tracker: add support for description on extrafield to be used in tooltip
(TrivialDev)
+* Utils: cross ref document. Use [DNNN] where NNN is the ID of the document.
(TrivialDev)
* Web UI: upgrade splitter jquery plugin to 0.20.0 (TrivialDev)
* Web UI: upgrade jquery ui to 1.11.4 (TrivialDev)
* Widget MySystasks: new widget for user to display systasks perform on user
projects (TrivialDev)
diff --git a/src/common/include/utils_crossref.php
b/src/common/include/utils_crossref.php
index b9a797d..e5921b9 100644
--- a/src/common/include/utils_crossref.php
+++ b/src/common/include/utils_crossref.php
@@ -4,7 +4,7 @@
*
* Copyright 1999-2001 (c) Alcatel-Lucent
* Copyright 2009, Roland Mas
- * Copyright 2014,2015 Franck Villaume - TrivialDev
+ * Copyright 2014-2016, Franck Villaume - TrivialDev
*
* This file is part of FusionForge. FusionForge is free software;
* you can redistribute it and/or modify it under the terms of the
@@ -22,6 +22,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+require_once $gfcommon.'docman/Document.class.php';
+
function util_gen_cross_ref ($text, $group_id) {
// Some important information.
@@ -30,18 +32,20 @@ function util_gen_cross_ref ($text, $group_id) {
// Handle URL in links, replace them with hyperlinks.
$text = util_make_links($text);
- // Handle gforge [#nnn] Syntax => links to tracker.
+ // Handle FusionForge [#nnn] Syntax => links to tracker.
$text = preg_replace_callback('/\[\#(\d+)\]/',
create_function('$matches', 'return _artifactid2url($matches[1]);'), $text);
- // Handle gforge [Tnnn] Syntax => links to task.
+ // Handle FusionForge [Tnnn] Syntax => links to task.
$text = preg_replace_callback('/\[\T(\d+)\]/',
create_function('$matches', 'return _taskid2url($matches[1],'.$group_id.');'),
$text);
// Handle [wiki:<pagename>] syntax
$text = preg_replace_callback('/\[wiki:(.*?)\]/',
create_function('$matches', 'return _page2url('.$prj.',$matches[1]);'), $text);
- // Handle [forum:<thread_id>] Syntax => links to forum.
+ // Handle FusionForge [forum:<thread_id>] Syntax => links to forum.
$text = preg_replace_callback('/\[forum:(\d+)\]/',
create_function('$matches', 'return _forumid2url($matches[1]);'), $text);
+ // Handle FusionForge [Dnnn] Syntax => links to document.
+ $text = preg_replace_callback('/\[D(\d+)\]/',
create_function('$matches', 'return
_documentid2url($matches[1],'.$group_id.');'), $text);
return $text;
}
@@ -114,3 +118,15 @@ function _forumid2url($id) {
}
return $text;
}
+
+function _documentid2url($id, $group_id) {
+ $text = '[D'.$id.']';
+ $d = document_get_object($id, $group_id);
+ if ($d && is_object($d) && !$d->isError()) {
+ $view = (($d->getStateID() != 2) ? 'listfile' :
'listtrashfile');
+ $url =
'/docman/?group_id='.$group_id.'&view='.$view.'&dirid='.$d->getDocGroupID().'&filedetailid='.$d->getID();
+ $arg['title'] = $d->getName().' ['.$d->getFileName().']';
+ return util_make_link($url, $text, $arg);
+ }
+ return $text;
+}
diff --git a/src/www/include/html.php b/src/www/include/html.php
index b9f9291..1881a0c 100644
--- a/src/www/include/html.php
+++ b/src/www/include/html.php
@@ -6,9 +6,9 @@
* Copyright 2010 (c) FusionForge Team
* Copyright (C) 2010-2012 Alain Peyrat - Alcatel-Lucent
* Copyright 2011, Franck Villaume - Capgemini
- * Copyright 2011-2016, Franck Villaume - TrivialDev
* Copyright © 2011, 2012
* Thorsten “mirabilos” Glaser <[email protected]>
+ * Copyright 2011-2016, Franck Villaume - TrivialDev
* Copyright 2016, Stéphane-Eymeric Bredthauer - TrivalDev
*
* This file is part of FusionForge. FusionForge is free software;
@@ -420,7 +420,7 @@ function html_get_tooltip_description($element_name) {
return _('Anyone can add here comments to give
additional information, answers and solutions. Please, be as precise as
possible to avoid misunderstanding. If relevant, screenshots or documents can
be added as attached files.');
case 'description':
return _('Enter the complete description.')
- ._("Editing tips:http,https or ftp: Hyperlinks.
[#NNN]: Tracker id NNN. [TNNN]: Task id NNN. [wiki:<pagename>]: Wiki
page. [forum:<msg_id>]: Forum post.");
+ ._("Editing tips:http,https or ftp: Hyperlinks.
[#NNN]: Tracker id NNN. [TNNN]: Task id NNN. [wiki:<pagename>]: Wiki
page. [forum:<msg_id>]: Forum post. [DNNN]: Document id NNN.");
case 'attach_file':
return _('When you wish to attach a file to a tracker
item you must check this checkbox before submitting changes.');
case 'monitor':
-----------------------------------------------------------------------
Summary of changes:
src/CHANGES | 2 ++
src/common/include/utils_crossref.php | 24 ++++++++++++++++++++----
src/www/include/html.php | 4 ++--
3 files changed, 24 insertions(+), 6 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits