Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
drupal
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Custom Issue Tracker
Custom Issue Tracker
Labels
Merge Requests
220
Merge Requests
220
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
project
drupal
Commits
dc86807c
Commit
dc86807c
authored
Nov 24, 2006
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#99517
by webchick and chx: fixed bogus regex.
parent
4df25c20
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
modules/node/content_types.inc
modules/node/content_types.inc
+1
-1
No files found.
modules/node/content_types.inc
View file @
dc86807c
...
@@ -231,7 +231,7 @@ function node_type_form_validate($form_id, $form_values) {
...
@@ -231,7 +231,7 @@ function node_type_form_validate($form_id, $form_values) {
if
(
isset
(
$types
[
$type
->
type
])
&&
$type
->
type
!=
$old_type
)
{
if
(
isset
(
$types
[
$type
->
type
])
&&
$type
->
type
!=
$old_type
)
{
form_set_error
(
'type'
,
t
(
'The machine-readable name %type is already taken.'
,
array
(
'%type'
=>
$type
->
type
)));
form_set_error
(
'type'
,
t
(
'The machine-readable name %type is already taken.'
,
array
(
'%type'
=>
$type
->
type
)));
}
}
if
(
!
preg_match
(
'!
a-z0-9_
!'
,
$type
->
type
))
{
if
(
!
preg_match
(
'!
^[a-z0-9_]+$
!'
,
$type
->
type
))
{
form_set_error
(
'type'
,
t
(
'The machine-readable name can only consist of lowercase letters, underscores, and numbers.'
));
form_set_error
(
'type'
,
t
(
'The machine-readable name can only consist of lowercase letters, underscores, and numbers.'
));
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment