Changed to force the shortname to be lower case.

This commit is contained in:
Loic d'Anterroches 2010-02-22 20:50:54 +01:00
parent e2bce19526
commit 5d24931d9b

View File

@ -158,7 +158,7 @@ class IDF_Form_Admin_ProjectCreate extends Pluf_Form
public function clean_shortname() public function clean_shortname()
{ {
$shortname = $this->cleaned_data['shortname']; $shortname = mb_strtolower($this->cleaned_data['shortname']);
if (preg_match('/[^\-A-Za-z0-9]/', $shortname)) { if (preg_match('/[^\-A-Za-z0-9]/', $shortname)) {
throw new Pluf_Form_Invalid(__('This shortname contains illegal characters, please use only letters, digits and dash (-).')); throw new Pluf_Form_Invalid(__('This shortname contains illegal characters, please use only letters, digits and dash (-).'));
} }