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  e072da42e12b8178c5b91ba0f753b03b5c148757 (commit)
      from  29ec32712999fc0b1e343a1c2fa1441575f3c7d3 (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=e072da42e12b8178c5b91ba0f753b03b5c148757

commit e072da42e12b8178c5b91ba0f753b03b5c148757
Author: Franck Villaume <[email protected]>
Date:   Sun Oct 23 17:14:04 2016 +0200

    Association FRSRelease: support permalink

diff --git a/src/common/frs/FRSRelease.class.php 
b/src/common/frs/FRSRelease.class.php
index 658d7f0..968301b 100644
--- a/src/common/frs/FRSRelease.class.php
+++ b/src/common/frs/FRSRelease.class.php
@@ -550,6 +550,10 @@ class FRSRelease extends FFObject {
                }
                return $roadmaps;
        }
+
+       function getPermalink() {
+               return '/frs/r_follow.php/'.$this->getID();
+       }
 }
 
 // Local Variables:
diff --git a/src/common/include/utils_crossref.php 
b/src/common/include/utils_crossref.php
index b338706..5770a84 100644
--- a/src/common/include/utils_crossref.php
+++ b/src/common/include/utils_crossref.php
@@ -24,6 +24,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) {
 
@@ -123,3 +124,15 @@ function _documentid2url($id, $group_id) {
        }
        return $text;
 }
+
+
+function _frsreleaseid2url($id) {
+       $text = '[R'.$id.']';
+       $frsr = frsrelease_get_object($id);
+       if ($frsr && is_object($frsr) && !$frsr->isError()) {
+               $url = $frsr->getPermalink();
+               $arg['title'] = $frsr->getName();
+               return util_make_link($url, $text, $arg);
+       }
+       return $text;
+}
diff --git a/src/www/frs/r_follow.php b/src/www/frs/r_follow.php
new file mode 100644
index 0000000..656e8ac
--- /dev/null
+++ b/src/www/frs/r_follow.php
@@ -0,0 +1,45 @@
+<?php
+/**
+ * FRSRelease UUID implementation for FusionForge
+ *
+ * Copyright © 2010
+ *     Thorsten “mirabilos” Glaser <[email protected]>
+ * All rights reserved.
+ * Copyright 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
+ * 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, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ *-
+ * Follow up to the task information page by UUID (project_task_id)
+ * via a redirection.
+ */
+
+require_once '../env.inc.php';
+require_once $gfcommon.'include/pre.php';
+require_once $gfcommon.'frs/FRSRelease.class.php';
+
+$frsreleaseid = getIntFromRequest('frsreleaseid');
+if (!$frsreleaseid) {
+       $frsreleaseid = util_path_info_last_numeric_component();
+}
+if (!$frsreleaseid) {
+    exit_missing_param('',array(_('frsreleaseid')), 'frs');
+}
+
+$frsrelease = frsrelease_get_object($frsreleaseid);
+if ($frsrelease && is_object($frsrelease) && !$frsrelease->isError()) {
+       
session_redirect('/frs/?group_id='.$frsrelease->FRSPackage->Group->getID().'&release_id='.$frsreleaseid);
+}
+exit_error(_('No FRSRelease with ID')._(': ').$frsreleaseid, 'frs');

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

Summary of changes:
 src/common/frs/FRSRelease.class.php                |  4 ++++
 src/common/include/utils_crossref.php              | 13 ++++++++++++
 src/www/{tracker/a_follow.php => frs/r_follow.php} | 23 +++++++++++-----------
 3 files changed, 28 insertions(+), 12 deletions(-)
 copy src/www/{tracker/a_follow.php => frs/r_follow.php} (64%)


hooks/post-receive
-- 
FusionForge

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

Reply via email to