Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
c19c4236
Commit
c19c4236
authored
Dec 06, 2002
by
Leigh B. Stoller
Browse files
Allow + in image names.
parent
888fd409
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/newimageid.php3
View file @
c19c4236
...
...
@@ -422,9 +422,9 @@ if (!isset($formfields[imagename]) ||
$errors
[
"Descriptor Name"
]
=
"Missing Field"
;
}
else
{
if
(
!
ereg
(
"^[a-zA-Z0-9][-_a-zA-Z0-9\.]+$"
,
$formfields
[
imagename
]))
{
if
(
!
ereg
(
"^[a-zA-Z0-9][-_a-zA-Z0-9\.
\+
]+$"
,
$formfields
[
imagename
]))
{
$errors
[
"Descriptor Name"
]
=
"Must be alphanumeric (includes _
and -
and .)<br>"
.
"Must be alphanumeric (includes _
, -, +,
and .)<br>"
.
"and must begin with an alphanumeric"
;
}
elseif
(
strlen
(
$formfields
[
imagename
])
>
$TBDB_IMAGEID_IMAGENAMELEN
)
{
...
...
www/newimageid_ez.php3
View file @
c19c4236
...
...
@@ -443,9 +443,9 @@ if (!isset($formfields[imagename]) ||
$errors
[
"Descriptor Name"
]
=
"Missing Field"
;
}
else
{
if
(
!
ereg
(
"^[a-zA-Z0-9][-_a-zA-Z0-9\.]+$"
,
$formfields
[
imagename
]))
{
if
(
!
ereg
(
"^[a-zA-Z0-9][-_a-zA-Z0-9\.
\+
]+$"
,
$formfields
[
imagename
]))
{
$errors
[
"Descriptor Name"
]
=
"Must be alphanumeric (includes _
and -
and .)<br>"
.
"Must be alphanumeric (includes _
, -, +,
and .)<br>"
.
"and must begin with an alphanumeric"
;
}
elseif
(
strlen
(
$formfields
[
imagename
])
>
$TBDB_IMAGEID_IMAGENAMELEN
)
{
...
...
Write
Preview
Supports
Markdown
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