[pLog-svn] r4293 - in plog/branches/lifetype-1.1.3:
class/data/validator class/test/tests/data/validator js/ui
oscar at devel.lifetype.net
oscar at devel.lifetype.net
Mon Nov 13 18:04:46 GMT 2006
Author: oscar
Date: 2006-11-13 18:04:45 +0000 (Mon, 13 Nov 2006)
New Revision: 4293
Modified:
plog/branches/lifetype-1.1.3/class/data/validator/usernamevalidator.class.php
plog/branches/lifetype-1.1.3/class/test/tests/data/validator/usernamevalidator_test.class.php
plog/branches/lifetype-1.1.3/js/ui/summary.js
Log:
Fixed issue 1117 (http://bugs.lifetype.net/view.php?id=1117), and now all usernames should only use lower-case characters.
Modified: plog/branches/lifetype-1.1.3/class/data/validator/usernamevalidator.class.php
===================================================================
--- plog/branches/lifetype-1.1.3/class/data/validator/usernamevalidator.class.php 2006-11-12 13:34:17 UTC (rev 4292)
+++ plog/branches/lifetype-1.1.3/class/data/validator/usernamevalidator.class.php 2006-11-13 18:04:45 UTC (rev 4293)
@@ -7,7 +7,7 @@
include_once( PLOG_CLASS_PATH."class/data/validator/rules/filteredpatternsrule.class.php" );
include_once( PLOG_CLASS_PATH."class/config/config.class.php" );
- define( "ONLY_ALPHANUMERIC_REGEXP", "^([A-Za-z0-9]*)$" );
+ define( "ONLY_ALPHANUMERIC_REGEXP", "^([a-z0-9]*)$" );
/**
* \ingroup Validator
Modified: plog/branches/lifetype-1.1.3/class/test/tests/data/validator/usernamevalidator_test.class.php
===================================================================
--- plog/branches/lifetype-1.1.3/class/test/tests/data/validator/usernamevalidator_test.class.php 2006-11-12 13:34:17 UTC (rev 4292)
+++ plog/branches/lifetype-1.1.3/class/test/tests/data/validator/usernamevalidator_test.class.php 2006-11-13 18:04:45 UTC (rev 4293)
@@ -49,6 +49,14 @@
}
/**
+ * test a username with upper-case characters
+ */
+ function testUpperCase()
+ {
+ $this->assertFalse( $this->u->validate( "wHAtevEr" ), "An invalid username was accepted!" );
+ }
+
+ /**
* tests a valid username
*/
function testValidUsername()
Modified: plog/branches/lifetype-1.1.3/js/ui/summary.js
===================================================================
--- plog/branches/lifetype-1.1.3/js/ui/summary.js 2006-11-12 13:34:17 UTC (rev 4292)
+++ plog/branches/lifetype-1.1.3/js/ui/summary.js 2006-11-13 18:04:45 UTC (rev 4293)
@@ -1,6 +1,7 @@
function checkUserNameAjax()
{
var userName = $F('userName');
+ userName = userName.toLowerCase();
if (userName != '')
{
var url = plogSummaryBaseUrl;
More information about the pLog-svn
mailing list