Indefero

Indefero Commit Details


Date:2009-03-26 23:45:30 (16 years 29 days ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:9f673307e067457d72c289b86bd4142b6a9e8a06
Parents: f25ebc1664b9a03cc04c1ce39b709d0ed57f6bf9
Message:Added the dash in the explanations of the allowed character in the project name

This is solving issue 148 correctly.
Changes:

File differences

src/IDF/Form/Admin/ProjectCreate.php
6060
6161
6262
63
63
6464
6565
6666
......
150150
151151
152152
153
153
154154
155155
156156
                                      array('required' => true,
                                            'label' => __('Shortname'),
                                            'initial' => '',
                                            'help_text' => __('It must be unique for each project and composed only of letters and digits.'),
                                            'help_text' => __('It must be unique for each project and composed only of letters, digits and dash (-) like "my-project".'),
                                            ));
        $this->fields['scm'] = new Pluf_Form_Field_Varchar(
    {
        $shortname = $this->cleaned_data['shortname'];
        if (preg_match('/[^\-A-Za-z0-9]/', $shortname)) {
            throw new Pluf_Form_Invalid(__('This shortname contains illegal characters, please use only letters and digits.'));
            throw new Pluf_Form_Invalid(__('This shortname contains illegal characters, please use only letters, digits and dash (-).'));
        }
        if (mb_substr($shortname, 0, 1) == '-') {
            throw new Pluf_Form_Invalid(__('The shortname cannot start with the dash (-) character.'));

Archive Download the corresponding diff file

Page rendered in 0.11459s using 14 queries.