Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ivan Ivlev
bugzilla
Commits
6a20f783
Commit
6a20f783
authored
Feb 10, 2005
by
travis%sedsystems.ca
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 277723 : Add comments why checksetup uses slow code to check for spaces and commas in flags
Patch by Nick.Barnes@pobox.com r=wurblzap by inspection a=justdave
parent
e564c92b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
checksetup.pl
checksetup.pl
+6
-2
No files found.
checksetup.pl
View file @
6a20f783
...
...
@@ -3906,17 +3906,19 @@ if (TableExists("attachstatuses") && TableExists("attachstatusdefs")) {
print
"done.\n"
;
}
# 2004-12-13 Nick.Barnes@pobox.com bug 262268
# Check flag type names for spaces and commas, and rename them.
if
(
TableExists
(
"flagtypes"
))
{
# Get names and IDs which are broken.
# Get all names and IDs, to find broken ones and to
# check for collisions when renaming.
$sth
=
$dbh
->
prepare
(
"SELECT name, id FROM flagtypes"
);
$sth
->
execute
();
my
%
flagtypes
;
my
@badflagnames
;
# find broken flagtype names, and populate a hash table
# to check for collisions.
while
(
my
(
$name
,
$id
)
=
$sth
->
fetchrow_array
())
{
$flagtypes
{
$name
}
=
$id
;
if
(
$name
=~
/[ ,]/
)
{
...
...
@@ -3929,7 +3931,9 @@ if (TableExists("flagtypes")) {
my
$sth
=
$dbh
->
prepare
(
"UPDATE flagtypes SET name = ? WHERE id = ?"
);
foreach
$flagname
(
@badflagnames
)
{
print
" Bad flag type name \"$flagname\" ...\n"
;
# find a new name for this flagtype.
(
$tryflagname
=
$flagname
)
=~
tr
/ ,/
__
/
;
# avoid collisions with existing flagtype names.
while
(
defined
(
$flagtypes
{
$tryflagname
}))
{
print
" ... can't rename as \"$tryflagname\" ...\n"
;
$tryflagname
.=
"'"
;
...
...
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