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.0 has been updated
       via  c5dbca38e2687cf3d04779a9b3fcab325f25b04e (commit)
      from  4def49ee10e65a0195f39e33376f1b0440c7282b (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 -----------------------------------------------------------------
commit c5dbca38e2687cf3d04779a9b3fcab325f25b04e
Author: Franck Villaume <[email protected]>
Date:   Sun Jun 7 18:48:00 2015 +0200

    tracker: fix display relations in artifact detail page

diff --git a/src/common/tracker/Artifact.class.php 
b/src/common/tracker/Artifact.class.php
index e9a86ae..363b307 100644
--- a/src/common/tracker/Artifact.class.php
+++ b/src/common/tracker/Artifact.class.php
@@ -7,7 +7,7 @@
  * Copyright 2009, Roland Mas
  * Copyright (C) 2009-2013 Alain Peyrat, Alcatel-Lucent
  * Copyright 2012, Thorsten “mirabilos” Glaser <[email protected]>
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014-2015, 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
@@ -1859,6 +1859,27 @@ class Artifact extends Error {
                }
                return $this->votes;
        }
+
+       function hasRelations() {
+               $aid = $this->getID();
+               $res = db_query_params('SELECT *
+                                       FROM artifact_extra_field_list, 
artifact_extra_field_data, artifact_group_list, artifact, groups
+                                       WHERE field_type=9
+                                       AND 
artifact_extra_field_list.extra_field_id=artifact_extra_field_data.extra_field_id
+                                       AND 
artifact_group_list.group_artifact_id = 
artifact_extra_field_list.group_artifact_id
+                                       AND artifact.artifact_id = 
artifact_extra_field_data.artifact_id
+                                       AND groups.group_id = 
artifact_group_list.group_id
+                                       AND (field_data = $1 OR field_data LIKE 
$2 OR field_data LIKE $3 OR field_data LIKE $4)
+                                       ORDER BY artifact_group_list.group_id 
ASC, name ASC, artifact.artifact_id ASC',
+                                       array($aid,
+                                             "$aid %",
+                                             "% $aid %",
+                                             "% $aid"));
+               if (db_numrows($res)>0) {
+                       return true;
+               }
+               return false;
+       }
 }
 
 class ArtifactComparator {
diff --git a/src/common/tracker/actions/detail.php 
b/src/common/tracker/actions/detail.php
index 00a8307..6ef6ef8 100644
--- a/src/common/tracker/actions/detail.php
+++ b/src/common/tracker/actions/detail.php
@@ -4,7 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * Copyright 2012-2015, Franck Villaume - TrivialDev
  * Copyright 2012, Thorsten “mirabilos” Glaser <[email protected]>
  * http://fusionforge.org/
  *
@@ -159,6 +159,9 @@ foreach ($pluginsListeners as $pluginsListener) {
        <li><a href="#tabber-commits"><?php echo _('Commits'); ?></a></li>
        <?php } ?>
        <li><a href="#tabber-changes"><?php echo _('Changes'); ?></a></li>
+       <?php if ($ah->hasRelations()) { ?>
+       <li><a href="#tabber-relations"><?php echo _('Relations'); ?></a></li>
+       <?php } ?>
        </ul>
        <div id="tabber-comments" class="tabbertab" title="<?php echo 
_('Comments').$nb; ?>">
                <table width="80%">
diff --git a/src/common/tracker/actions/mod-limited.php 
b/src/common/tracker/actions/mod-limited.php
index 184b7df..daeee99 100644
--- a/src/common/tracker/actions/mod-limited.php
+++ b/src/common/tracker/actions/mod-limited.php
@@ -4,7 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * Copyright 2012-2015, Franck Villaume - TrivialDev
  * Copyright 2012, Thorsten “mirabilos” Glaser <[email protected]>
  * http://fusionforge.org/
  *
@@ -192,6 +192,9 @@ foreach ($pluginsListeners as $pluginsListener) {
        <li><a href="#tabber-commits"><?php echo _('Commits'); ?></a></li>
        <?php } ?>
        <li><a href="#tabber-changes"><?php echo _('Changes'); ?></a></li>
+       <?php if ($ah->hasRelations()) { ?>
+       <li><a href="#tabber-relations"><?php echo _('Relations'); ?></a></li>
+       <?php } ?>
        </ul>
        <div id="tabber-comments" class="tabbertab" title="<?php echo 
_('Comments').$nb; ?>">
        <table width="80%">
diff --git a/src/common/tracker/actions/mod.php 
b/src/common/tracker/actions/mod.php
index 35209d1..e1cef02 100644
--- a/src/common/tracker/actions/mod.php
+++ b/src/common/tracker/actions/mod.php
@@ -5,7 +5,7 @@
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2010 (c) Franck Villaume - Capgemini
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * Copyright 2012-2015, Franck Villaume - TrivialDev
  * Copyright 2012, Thorsten “mirabilos” Glaser <[email protected]>
  * http://fusionforge.org/
  *
@@ -227,6 +227,9 @@ foreach ($pluginsListeners as $pluginsListener) {
        <li><a href="#tabber-commits"><?php echo _('Commits'); ?></a></li>
        <?php } ?>
        <li><a href="#tabber-changes"><?php echo _('Changes'); ?></a></li>
+       <?php if ($ah->hasRelations()) { ?>
+       <li><a href="#tabber-relations"><?php echo _('Relations'); ?></a></li>
+       <?php } ?>
        </ul>
 <div id="tabber-comments" class="tabbertab" title="<?php echo 
_('Comments').$nb; ?>">
 <table width="80%">
diff --git a/src/common/tracker/include/ArtifactHtml.class.php 
b/src/common/tracker/include/ArtifactHtml.class.php
index d40f359..ef6f114 100644
--- a/src/common/tracker/include/ArtifactHtml.class.php
+++ b/src/common/tracker/include/ArtifactHtml.class.php
@@ -207,11 +207,11 @@ function hide_edit_button(id) {
                                              "% $aid"));
                if (db_numrows($res)>0) {
                        ?>
-<div class="tabbertab" title="<?php echo _('Backward Relations'); ?>">
+<div id="tabber-relations" class="tabbertab" title="<?php echo _('Backward 
Relations'); ?>">
 <table class="fullwidth">
        <tr>
                <td colspan="2">
-               <h2><?php echo _('Changes')._(':'); ?></h2>
+               <h2><?php echo _('Relations')._(':'); ?></h2>
                <?php
                $current = '';
                $end = '';

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

Summary of changes:
 src/common/tracker/Artifact.class.php             | 23 ++++++++++++++++++++++-
 src/common/tracker/actions/detail.php             |  5 ++++-
 src/common/tracker/actions/mod-limited.php        |  5 ++++-
 src/common/tracker/actions/mod.php                |  5 ++++-
 src/common/tracker/include/ArtifactHtml.class.php |  4 ++--
 5 files changed, 36 insertions(+), 6 deletions(-)

diff --git a/src/common/tracker/Artifact.class.php 
b/src/common/tracker/Artifact.class.php
index e9a86ae..363b307 100644
--- a/src/common/tracker/Artifact.class.php
+++ b/src/common/tracker/Artifact.class.php
@@ -7,7 +7,7 @@
  * Copyright 2009, Roland Mas
  * Copyright (C) 2009-2013 Alain Peyrat, Alcatel-Lucent
  * Copyright 2012, Thorsten “mirabilos” Glaser <[email protected]>
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014-2015, 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
@@ -1859,6 +1859,27 @@ class Artifact extends Error {
                }
                return $this->votes;
        }
+
+       function hasRelations() {
+               $aid = $this->getID();
+               $res = db_query_params('SELECT *
+                                       FROM artifact_extra_field_list, 
artifact_extra_field_data, artifact_group_list, artifact, groups
+                                       WHERE field_type=9
+                                       AND 
artifact_extra_field_list.extra_field_id=artifact_extra_field_data.extra_field_id
+                                       AND 
artifact_group_list.group_artifact_id = 
artifact_extra_field_list.group_artifact_id
+                                       AND artifact.artifact_id = 
artifact_extra_field_data.artifact_id
+                                       AND groups.group_id = 
artifact_group_list.group_id
+                                       AND (field_data = $1 OR field_data LIKE 
$2 OR field_data LIKE $3 OR field_data LIKE $4)
+                                       ORDER BY artifact_group_list.group_id 
ASC, name ASC, artifact.artifact_id ASC',
+                                       array($aid,
+                                             "$aid %",
+                                             "% $aid %",
+                                             "% $aid"));
+               if (db_numrows($res)>0) {
+                       return true;
+               }
+               return false;
+       }
 }
 
 class ArtifactComparator {
diff --git a/src/common/tracker/actions/detail.php 
b/src/common/tracker/actions/detail.php
index 00a8307..6ef6ef8 100644
--- a/src/common/tracker/actions/detail.php
+++ b/src/common/tracker/actions/detail.php
@@ -4,7 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * Copyright 2012-2015, Franck Villaume - TrivialDev
  * Copyright 2012, Thorsten “mirabilos” Glaser <[email protected]>
  * http://fusionforge.org/
  *
@@ -159,6 +159,9 @@ foreach ($pluginsListeners as $pluginsListener) {
        <li><a href="#tabber-commits"><?php echo _('Commits'); ?></a></li>
        <?php } ?>
        <li><a href="#tabber-changes"><?php echo _('Changes'); ?></a></li>
+       <?php if ($ah->hasRelations()) { ?>
+       <li><a href="#tabber-relations"><?php echo _('Relations'); ?></a></li>
+       <?php } ?>
        </ul>
        <div id="tabber-comments" class="tabbertab" title="<?php echo 
_('Comments').$nb; ?>">
                <table width="80%">
diff --git a/src/common/tracker/actions/mod-limited.php 
b/src/common/tracker/actions/mod-limited.php
index 184b7df..daeee99 100644
--- a/src/common/tracker/actions/mod-limited.php
+++ b/src/common/tracker/actions/mod-limited.php
@@ -4,7 +4,7 @@
  *
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * Copyright 2012-2015, Franck Villaume - TrivialDev
  * Copyright 2012, Thorsten “mirabilos” Glaser <[email protected]>
  * http://fusionforge.org/
  *
@@ -192,6 +192,9 @@ foreach ($pluginsListeners as $pluginsListener) {
        <li><a href="#tabber-commits"><?php echo _('Commits'); ?></a></li>
        <?php } ?>
        <li><a href="#tabber-changes"><?php echo _('Changes'); ?></a></li>
+       <?php if ($ah->hasRelations()) { ?>
+       <li><a href="#tabber-relations"><?php echo _('Relations'); ?></a></li>
+       <?php } ?>
        </ul>
        <div id="tabber-comments" class="tabbertab" title="<?php echo 
_('Comments').$nb; ?>">
        <table width="80%">
diff --git a/src/common/tracker/actions/mod.php 
b/src/common/tracker/actions/mod.php
index 35209d1..e1cef02 100644
--- a/src/common/tracker/actions/mod.php
+++ b/src/common/tracker/actions/mod.php
@@ -5,7 +5,7 @@
  * Copyright 1999-2001 (c) VA Linux Systems
  * Copyright 2010 (c) Franck Villaume - Capgemini
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
- * Copyright 2012-2014, Franck Villaume - TrivialDev
+ * Copyright 2012-2015, Franck Villaume - TrivialDev
  * Copyright 2012, Thorsten “mirabilos” Glaser <[email protected]>
  * http://fusionforge.org/
  *
@@ -227,6 +227,9 @@ foreach ($pluginsListeners as $pluginsListener) {
        <li><a href="#tabber-commits"><?php echo _('Commits'); ?></a></li>
        <?php } ?>
        <li><a href="#tabber-changes"><?php echo _('Changes'); ?></a></li>
+       <?php if ($ah->hasRelations()) { ?>
+       <li><a href="#tabber-relations"><?php echo _('Relations'); ?></a></li>
+       <?php } ?>
        </ul>
 <div id="tabber-comments" class="tabbertab" title="<?php echo 
_('Comments').$nb; ?>">
 <table width="80%">
diff --git a/src/common/tracker/include/ArtifactHtml.class.php 
b/src/common/tracker/include/ArtifactHtml.class.php
index d40f359..ef6f114 100644
--- a/src/common/tracker/include/ArtifactHtml.class.php
+++ b/src/common/tracker/include/ArtifactHtml.class.php
@@ -207,11 +207,11 @@ function hide_edit_button(id) {
                                              "% $aid"));
                if (db_numrows($res)>0) {
                        ?>
-<div class="tabbertab" title="<?php echo _('Backward Relations'); ?>">
+<div id="tabber-relations" class="tabbertab" title="<?php echo _('Backward 
Relations'); ?>">
 <table class="fullwidth">
        <tr>
                <td colspan="2">
-               <h2><?php echo _('Changes')._(':'); ?></h2>
+               <h2><?php echo _('Relations')._(':'); ?></h2>
                <?php
                $current = '';
                $end = '';


hooks/post-receive
-- 
FusionForge

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

Reply via email to