[evolvis-commits] r17721: fix a regexp, English, and a long-standing confusion

mirabilos at evolvis.org mirabilos at evolvis.org
Thu Nov 24 17:26:05 CET 2011


Author: mirabilos
Date: 2011-11-24 17:26:05 +0100 (Thu, 24 Nov 2011)
New Revision: 17721

Modified:
   trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactExtraField.class.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/form-addextrafield.php
Log:
fix a regexp, English, and a long-standing confusion


Modified: trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactExtraField.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactExtraField.class.php	2011-11-24 16:25:57 UTC (rev 17720)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/tracker/ArtifactExtraField.class.php	2011-11-24 16:26:05 UTC (rev 17721)
@@ -492,8 +492,8 @@
 		if (strlen($alias) == 0) return true;		// empty alias
 
 		// invalid chars?
-		if (preg_match("/[^[:alnum:]_@\\-]/", $alias)) {
-			$this->setError(_('The alias contains invalid characters. Only letters, numbers, hypens (-), arobase (@) and underscores (_) allowed.'));
+		if (preg_match("/[^a-zA-Z0-9_ at -]/", $alias)) {
+			$this->setError(_('The alias (field name) contains invalid characters. Only letters, numbers, commercial at (@), underscores (_) and hyphen (-) allowed.'));
 			return false;
 		} else if (in_array($alias, $reserved_alias)) {	// alias is reserved?
 			$this->setError(sprintf(_('\'%1$s\' is a reserved alias. Please provide another name.'), $alias));

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/form-addextrafield.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/form-addextrafield.php	2011-11-24 16:25:57 UTC (rev 17720)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/admin/form-addextrafield.php	2011-11-24 16:26:05 UTC (rev 17721)
@@ -112,11 +112,11 @@
 		<form action="<?php echo getStringFromServer('PHP_SELF').'?group_id='.$group_id.'&atid='.$ath->getID(); ?>" method="post">
 		<p>
 		<input type="hidden" name="add_extrafield" value="y" />
-		<strong><?php echo _('Custom Field Name') ?>:</strong><br />
+		<strong><?php echo _('Custom Field name (human-readable)') ?>:</strong><br />
 		<input type="text" name="name" value="" size="15" maxlength="30" />
 		</p>
 		<p>
-		<strong><?php echo _('Field alias') ?>:</strong><br />
+		<strong><?php echo _('Field alias (internal name)') ?>:</strong><br />
 		<input type="text" name="alias" value="" size="15" maxlength="30" />
 		</p>
 



More information about the evolvis-commits mailing list