[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1272] Prevent group names from ending in a full stop.
From: |
Toby Inkster |
Subject: |
[Librefm-commits] [1272] Prevent group names from ending in a full stop. |
Date: |
Thu, 07 May 2009 10:03:33 +0000 |
Revision: 1272
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1272
Author: tobyink
Date: 2009-05-07 10:03:33 +0000 (Thu, 07 May 2009)
Log Message:
-----------
Prevent group names from ending in a full stop. Such URLs are difficult to read
as part of prose text.
Modified Paths:
--------------
trunk/nixtape/data/Group.php
Modified: trunk/nixtape/data/Group.php
===================================================================
--- trunk/nixtape/data/Group.php 2009-05-07 09:59:13 UTC (rev 1271)
+++ trunk/nixtape/data/Group.php 2009-05-07 10:03:33 UTC (rev 1272)
@@ -91,9 +91,9 @@
{
global $mdb2;
- if (!preg_match('/^[A-Za-z0-9][A-Za-z0-9_\.-]+$/', $name))
+ if (!preg_match('/^[A-Za-z0-9][A-Za-z0-9_\.-]*[A-Za-z0-9]$/',
$name))
{
- return (new PEAR_Error('Group names should only contain
letters, numbers, hyphens, underscores and full stops (a.k.a. dots/periods),
must be at least two characters long, and can\'t start with punctuation.'));
+ return (new PEAR_Error('Group names should only contain
letters, numbers, hyphens, underscores and full stops (a.k.a. dots/periods),
must be at least two characters long, and can\'t start or end with
punctuation.'));
}
if (in_array(strtolower($name), array('new', 'search')))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1272] Prevent group names from ending in a full stop.,
Toby Inkster <=