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  fa09bd92ab87420bf32ad1630d33a5792fe4d3ad (commit)
      from  d2aef94da82e03b764f384e29e50d4747e0e629a (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=fa09bd92ab87420bf32ad1630d33a5792fe4d3ad

commit fa09bd92ab87420bf32ad1630d33a5792fe4d3ad
Author: Franck Villaume <[email protected]>
Date:   Fri Feb 10 19:51:03 2017 +0100

    fix customfield alias check on creation & update. fix reserved alias based 
on intern alias

diff --git a/src/common/tracker/ArtifactExtraField.class.php 
b/src/common/tracker/ArtifactExtraField.class.php
index 428a872..511877c 100644
--- a/src/common/tracker/ArtifactExtraField.class.php
+++ b/src/common/tracker/ArtifactExtraField.class.php
@@ -4,7 +4,7 @@
  *
  * Copyright 2004, Anthony J. Pugliese
  * Copyright 2009, Roland Mas
- * Copyright 2014, Franck Villaume - TrivialDev
+ * Copyright 2014,2017, Franck Villaume - TrivialDev
  * Copyright 2016-2017, Stéphane-Eymeric Bredthauer - TrivialDev
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -1028,15 +1028,22 @@ class ArtifactExtraField extends FFError {
        function validateAlias($alias) {
                // these are reserved alias names
                static $reserved_alias = array(
-                       "project",
-                       "priority",
-                       "assigned_to",
-                       "submitted_by",
-                       "open_date",
-                       "close_date",
-                       "summary",
-                       "details",
-                       "last_modified_date"
+                       'assigned_to',
+                       'close_date',
+                       'details',
+                       'id',
+                       'last_modified_by',
+                       'last_modified_date',
+                       'open_date',
+                       'priority',
+                       'project', //why???
+                       'related_tasks',
+                       'status_id',
+                       'submitted_by',
+                       'summary',
+                       '_votes',
+                       '_voters',
+                       '_votage'
                );
 
                if (strlen($alias) == 0) return true;           // empty alias
diff --git a/src/common/tracker/views/form-addextrafield.php 
b/src/common/tracker/views/form-addextrafield.php
index 8aebf3c..4286474 100644
--- a/src/common/tracker/views/form-addextrafield.php
+++ b/src/common/tracker/views/form-addextrafield.php
@@ -3,7 +3,7 @@
  * Tracker Facility
  *
  * Copyright 2010 (c) FusionForge Team
- * Copyright 2014-2016, Franck Villaume - TrivialDev
+ * Copyright 2014-2017, Franck Villaume - TrivialDev
  * Copyright 2016-2017, Stéphane-Eymeric Bredthauer - TrivialDev
  * http://fusionforge.org
  *
@@ -180,7 +180,7 @@ echo html_ac(html_ap() - 1);
 
 echo html_ao('p');
 echo html_e('strong', array(), _('Field alias')._(':')).html_e('br');
-echo html_e('input', array('type'=>'text', 'name'=>'alias', 'value'=>'', 
'size'=>'15', 'maxlength'=>'30'));
+echo html_e('input', array('type'=>'text', 'name'=>'alias', 'value'=>'', 
'size'=>'15', 'maxlength'=>'30', 'pattern' => '[A-Za-z0-9-_@]+', 'title' => 
_('Only letters, numbers, hyphens (-), at sign (@) and underscores (_) 
allowed.')));
 echo html_ac(html_ap() - 1);
 
 echo html_ao('p');
diff --git a/src/common/tracker/views/form-updateextrafield.php 
b/src/common/tracker/views/form-updateextrafield.php
index 8a4d939..8651a0f 100644
--- a/src/common/tracker/views/form-updateextrafield.php
+++ b/src/common/tracker/views/form-updateextrafield.php
@@ -3,7 +3,7 @@
  * Tracker Facility
  *
  * Copyright 2010 (c) FusionForge Team
- * Copyright 2014-2015, Franck Villaume - TrivialDev
+ * Copyright 2014-2015,2017, Franck Villaume - TrivialDev
  * Copyright 2016-2017, Stéphane-Eymeric Bredthauer - TrivialDev
  * http://fusionforge.org
  *
@@ -56,7 +56,7 @@ if (!$ac || !is_object($ac)) {
 
        echo html_ao('p');
        echo html_e('label', array('for'=>'alias'), html_e('strong', array(), 
_('Field alias')._(':')).html_e('br'));
-       echo html_e('input', array('type'=>'text', 'id'=>'alias', 
'name'=>'alias', 'value'=>$ac->getAlias(), 'size'=>'15', 'maxlength'=>'30'));
+       echo html_e('input', array('type'=>'text', 'id'=>'alias', 
'name'=>'alias', 'value'=>$ac->getAlias(), 'size'=>'15', 'maxlength'=>'30', 
'pattern' => '[A-Za-z0-9-_@]+', 'title' => _('Only letters, numbers, hyphens 
(-), at sign (@) and underscores (_) allowed.')));
        echo html_ac(html_ap() - 1);
 
        echo html_ao('p');

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

Summary of changes:
 src/common/tracker/ArtifactExtraField.class.php    | 27 ++++++++++++++--------
 src/common/tracker/views/form-addextrafield.php    |  4 ++--
 src/common/tracker/views/form-updateextrafield.php |  4 ++--
 3 files changed, 21 insertions(+), 14 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