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  5b94223177736a624e80b982479757f4309b2076 (commit)
      from  37f178c0db1b82e4a5d8f1a23436e71c42b1658f (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=5b94223177736a624e80b982479757f4309b2076

commit 5b94223177736a624e80b982479757f4309b2076
Author: Franck Villaume <[email protected]>
Date:   Wed Oct 26 18:54:41 2016 +0200

    support cross ref frs release

diff --git a/src/CHANGES b/src/CHANGES
index fb90807..94b623d 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -33,7 +33,7 @@ FusionForge 6.X:
 * Tracker: fix extrafield cloning when not using default template fusionforge 
project [#829] (TrivialDev)
 * Tracker: add support for autoassign [#151] & [#149] (TrivialDev)
 * Tracker: add default value support for extrafields (TrivialDev)
-* Utils: cross ref document. Use [DNNN] where NNN is the ID of the document. 
(TrivialDev)
+* Utils: cross ref document/release. Use [DNNN]/[RNNN] where NNN is the ID of 
the document/frs release. (TrivialDev)
 * Web UI: upgrade splitter jquery plugin to 0.20.0 (TrivialDev)
 * Web UI: upgrade jquery ui to 1.12.1 (TrivialDev)
 * Web UI: upgrade jquery to 1.12.4 (Nokia)
diff --git a/src/common/include/utils_crossref.php 
b/src/common/include/utils_crossref.php
index 7d78eaf..5f314b0 100644
--- a/src/common/include/utils_crossref.php
+++ b/src/common/include/utils_crossref.php
@@ -26,7 +26,7 @@ require_once $gfcommon.'docman/Document.class.php';
 require_once $gfcommon.'tracker/Artifact.class.php';
 require_once $gfcommon.'frs/FRSRelease.class.php';
 
-function util_gen_cross_ref ($text, $group_id) {
+function util_gen_cross_ref($text, $group_id) {
 
        // Handle URL in links, replace them with hyperlinks.
        $text = util_make_links($text);
@@ -46,6 +46,10 @@ function util_gen_cross_ref ($text, $group_id) {
        // 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;
+
+       // Handle FusionForge [Rnnn] Syntax => links to frs release.
+       $text = preg_replace_callback('/\[R(\d+)\]/', 
create_function('$matches', 'return _frsreleaseid2url($matches[1]);'), $text);
+       return $text;
 }
 
 function _page2url($group_id,$page) {

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

Summary of changes:
 src/CHANGES                           | 2 +-
 src/common/include/utils_crossref.php | 6 +++++-
 2 files changed, 6 insertions(+), 2 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