[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Librefm-commits] [1268] Check that the group isn't called 'new' as this
From: |
Toby Inkster |
Subject: |
[Librefm-commits] [1268] Check that the group isn't called 'new' as this wrecks our pretty URL to create a new group. |
Date: |
Thu, 07 May 2009 09:14:10 +0000 |
Revision: 1268
http://svn.sv.gnu.org/viewvc/?view=rev&root=librefm&revision=1268
Author: tobyink
Date: 2009-05-07 09:14:10 +0000 (Thu, 07 May 2009)
Log Message:
-----------
Check that the group isn't called 'new' as this wrecks our pretty URL to create
a new group.
Modified Paths:
--------------
trunk/nixtape/data/Group.php
Modified: trunk/nixtape/data/Group.php
===================================================================
--- trunk/nixtape/data/Group.php 2009-05-07 09:08:50 UTC (rev 1267)
+++ trunk/nixtape/data/Group.php 2009-05-07 09:14:10 UTC (rev 1268)
@@ -100,6 +100,11 @@
{
return (new PEAR_Error('Group names must contain at
least one non-punctuation character.'));
}
+
+ if (strtolower($name) == 'new')
+ {
+ return (new PEAR_Error('Not allowed to create a group
called \'new\'!'));
+ }
// Check to make sure no existing group with same name
(case-insensitive).
$q = sprintf('SELECT groupname FROM Groups WHERE
LOWER(groupname)=LOWER(%s)'
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Librefm-commits] [1268] Check that the group isn't called 'new' as this wrecks our pretty URL to create a new group.,
Toby Inkster <=