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 df36f6080b0086be3a1d1a81a625c1feb7e7b9cb (commit) via 8eb095319715b31c69d4650f5c0079b053210881 (commit) from fb24e1245e20079fe5ea16b8a63c5832d10dc054 (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=df36f6080b0086be3a1d1a81a625c1feb7e7b9cb commit df36f6080b0086be3a1d1a81a625c1feb7e7b9cb Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Sun Sep 18 15:41:48 2016 +0200 add missing translation diff --git a/src/common/tracker/views/form-workflow.php b/src/common/tracker/views/form-workflow.php index c2e5f5c..cc0d664 100644 --- a/src/common/tracker/views/form-workflow.php +++ b/src/common/tracker/views/form-workflow.php @@ -3,7 +3,8 @@ * Update Artifact Type Form * * Copyright 2010, FusionForge Team - * Copyright 2015, Franck Villaume - TrivialDev + * Copyright 2015,2016, Franck Villaume - TrivialDev + * Copyright 2016, Stéphane-Eymeric Bredthauer - TrivialDev * http://fusionforge.org * * This file is part of FusionForge. FusionForge is free software; @@ -136,8 +137,8 @@ echo $HTML->openForm(array('action' => '/tracker/admin/?group_id='.$group_id.'&a echo $HTML->listTableBottom(); ?> -<div class="tips">Tip: Click on <?php echo html_image('ic/acl_roles20.png', 20, 20, array('alt'=> _('Edit Roles'))) ?> to configure allowed roles for a transition (all by default).</div> -<div class="tips">Tip2: Click on <?php echo html_image('ic/required.png', 20, 20, array('alt'=> _('Edit Required Fields'))) ?> to configure required fields for a transition (none by default).</div> +<div class="tips"><?php echo _('Tip')._(': ').sprintf(_('Click on %s to configure allowed roles for a transition (all by default).'), html_image('ic/acl_roles20.png', 20, 20, array('alt'=> _('Edit Roles')))) ?></div> +<div class="tips"><?php echo _('Tip2')._(': ').sprintf(_('Click on %s to configure required fields for a transition (none by default).'), html_image('ic/required.png', 20, 20, array('alt'=> _('Edit Required Fields')))) ?></div> <p> <input type="submit" name="post_changes" value="<?php echo _('Submit') ?>" /></p> https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=8eb095319715b31c69d4650f5c0079b053210881 commit 8eb095319715b31c69d4650f5c0079b053210881 Author: Franck Villaume <franck.villa...@trivialdev.com> Date: Sun Sep 18 15:16:42 2016 +0200 missing licence + use util_result_column_to_array when possible diff --git a/src/common/tracker/ArtifactWorkflow.class.php b/src/common/tracker/ArtifactWorkflow.class.php index ad794d9..d4fced5 100644 --- a/src/common/tracker/ArtifactWorkflow.class.php +++ b/src/common/tracker/ArtifactWorkflow.class.php @@ -1,6 +1,26 @@ <?php /** * The ArtifactWorkflow class manages workflow for trackers. + * Previous Copyright, FusionForge Team + * 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 Licence, 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. + */ + +/** * * The workflow is attached to custom status field only. * @@ -17,8 +37,6 @@ * * NOTES: * @todo: the getAllowedRoles should be replaced by getRealAllowedRoles code. (to be tested). - * @todo: Some code could use a db direct to array func instead of the while. - * */ require_once $gfcommon.'include/FFError.class.php'; @@ -107,14 +125,12 @@ class ArtifactWorkflow extends FFError { $this->_removeEvent($element_id, $e['element_id']); } } - // Allow the new element for the Submit form (Initial values). $this->_removeEvent('100', $element_id); } // Returns all the possible following nodes (no roles involved). function getNextNodes($from) { - $res = db_query_params ('SELECT to_value_id FROM artifact_workflow_event WHERE group_artifact_id=$1 AND field_id=$2 @@ -122,16 +138,10 @@ class ArtifactWorkflow extends FFError { array($this->artifact_id, $this->field_id, (int)$from)); - $values = array(); - while($arr = db_fetch_array($res)) { - $values[] = $arr['to_value_id']; - } - return $values; - + return util_result_column_to_array($res); } function saveNextNodes($from, $nodes) { - // Get All possible nodes. $current = $this->getNextNodes($from); @@ -201,11 +211,7 @@ class ArtifactWorkflow extends FFError { $this->field_id, $from, $to)); - $values = array(); - while($arr = db_fetch_array($res)) { - $values[] = $arr['extra_field_id']; - } - return $values; + return util_result_column_to_array($res); } function saveRequiredFields($from, $to, $extra_fields) { @@ -247,7 +253,6 @@ class ArtifactWorkflow extends FFError { } function _addEvent($from, $to) { - $res = db_query_params ('INSERT INTO artifact_workflow_event (group_artifact_id, field_id, from_value_id, to_value_id) VALUES ($1, $2, $3, $4)', @@ -303,11 +308,7 @@ class ArtifactWorkflow extends FFError { $this->field_id, $from, $to)); - $values = array(); - while($arr = db_fetch_array($res)) { - $values[] = $arr['role_id']; - } - return $values; + return util_result_column_to_array($res); } function _addRole($event_id, $role_id) { ----------------------------------------------------------------------- Summary of changes: src/common/tracker/ArtifactWorkflow.class.php | 45 ++++++++++++++------------- src/common/tracker/views/form-workflow.php | 7 +++-- 2 files changed, 27 insertions(+), 25 deletions(-) hooks/post-receive -- FusionForge _______________________________________________ Fusionforge-commits mailing list Fusionforge-commits@lists.fusionforge.org http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits