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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
92428da6
Commit
92428da6
authored
Dec 01, 2019
by
Dylan William Hardison
Committed by
Давид Добряков
Apr 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-tidy with recent perltidy, for future consistency
parent
eb625c3c
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
78 additions
and
78 deletions
+78
-78
Bugzilla.pm
Bugzilla.pm
+1
-1
Attachment.pm
Bugzilla/Attachment.pm
+1
-1
Bug.pm
Bugzilla/Bug.pm
+3
-3
CGI.pm
Bugzilla/CGI.pm
+1
-1
Config.pm
Bugzilla/Config.pm
+1
-1
MTA.pm
Bugzilla/Config/MTA.pm
+1
-1
DB.pm
Bugzilla/DB.pm
+1
-1
Mysql.pm
Bugzilla/DB/Mysql.pm
+1
-1
Schema.pm
Bugzilla/DB/Schema.pm
+15
-15
Field.pm
Bugzilla/Field.pm
+2
-2
Util.pm
Bugzilla/Install/Util.pm
+1
-1
Gnats.pm
Bugzilla/Migrate/Gnats.pm
+2
-2
Search.pm
Bugzilla/Search.pm
+9
-9
Quicksearch.pm
Bugzilla/Search/Quicksearch.pm
+4
-4
Hook.pm
Bugzilla/Template/Plugin/Hook.pm
+1
-1
Token.pm
Bugzilla/Token.pm
+1
-1
User.pm
Bugzilla/User.pm
+4
-4
APIKey.pm
Bugzilla/User/APIKey.pm
+1
-1
Bug.pm
Bugzilla/WebService/Bug.pm
+9
-9
Classification.pm
Bugzilla/WebService/Classification.pm
+5
-5
Extension.pm
extensions/OldBugMove/Extension.pm
+1
-1
importxml.pl
importxml.pl
+2
-2
Search.pm
xt/lib/Bugzilla/Test/Search.pm
+1
-1
Constants.pm
xt/lib/Bugzilla/Test/Search/Constants.pm
+9
-9
CustomTest.pm
xt/lib/Bugzilla/Test/Search/CustomTest.pm
+1
-1
No files found.
Bugzilla.pm
View file @
92428da6
...
...
@@ -596,7 +596,7 @@ sub fields {
my
$fields
=
$cache
->
{
fields
};
my
%
requested
;
if
(
my
$types
=
delete
$criteria
->
{
type
})
{
$types
=
ref
(
$types
)
?
$types
:
[
$types
];
$types
=
ref
(
$types
)
?
$types
:
[
$types
];
%
requested
=
map
{
%
{
$fields
->
{
by_type
}
->
{
$_
}
||
{}}
}
@$types
;
}
else
{
...
...
Bugzilla/Attachment.pm
View file @
92428da6
...
...
@@ -619,7 +619,7 @@ sub _check_is_private {
if
(
(
(
!
ref
$invocant
&&
$is_private
)
||
(
ref
$invocant
&&
$invocant
->
isprivate
!=
$is_private
)
||
(
ref
$invocant
&&
$invocant
->
isprivate
!=
$is_private
)
)
&&
!
Bugzilla
->
user
->
is_insider
)
...
...
Bugzilla/Bug.pm
View file @
92428da6
...
...
@@ -620,7 +620,7 @@ sub possible_duplicates {
foreach
my
$word
(
@words
)
{
my
(
$term
,
$rel_term
)
=
$dbh
->
sql_fulltext_search
(
'bugs_fulltext.short_desc'
,
$word
);
push
(
@where
,
$term
);
push
(
@where
,
$term
);
push
(
@relevance
,
$rel_term
||
$term
);
}
...
...
@@ -1570,8 +1570,8 @@ sub _check_bug_status {
ThrowUserError
(
'comment_required'
,
{
old
=>
$old_status
?
$old_status
->
name
:
undef
,
new
=>
$new_status
->
name
,
old
=>
$old_status
?
$old_status
->
name
:
undef
,
new
=>
$new_status
->
name
,
field
=>
'bug_status'
}
);
...
...
Bugzilla/CGI.pm
View file @
92428da6
...
...
@@ -36,7 +36,7 @@ sub _init_bz_cgi_globals {
# We don't precompile any functions here, that's done specially in
# mod_perl code.
$invocant
->
_setup_symbols
(
qw(:no_xhtml :oldstyle_urls :private_tempfiles
:unique_headers)
);
:unique_headers)
);
}
BEGIN
{
__PACKAGE__
->
_init_bz_cgi_globals
()
if
i_am_cgi
();
}
...
...
Bugzilla/Config.pm
View file @
92428da6
...
...
@@ -341,7 +341,7 @@ sub read_param_file {
die
"The $file file does not exist."
.
' You probably need to run checksetup.pl.'
,;
}
return
\%
params
;
}
...
...
Bugzilla/Config/MTA.pm
View file @
92428da6
...
...
@@ -50,7 +50,7 @@ sub get_param_list {
{
name
=>
'smtp_password'
,
type
=>
'p'
,
default
=>
''
},
{
name
=>
'smtp_ssl'
,
type
=>
'b'
,
default
=>
0
,
checker
=>
\&
check_smtp_ssl
},
{
name
=>
'smtp_debug'
,
type
=>
'b'
,
default
=>
0
},
{
name
=>
'whinedays'
,
type
=>
't'
,
default
=>
7
,
checker
=>
\&
check_numeric
},
{
name
=>
'whinedays'
,
type
=>
't'
,
default
=>
7
,
checker
=>
\&
check_numeric
},
{
name
=>
'globalwatchers'
,
type
=>
't'
,
default
=>
''
,},
);
return
@param_list
;
...
...
Bugzilla/DB.pm
View file @
92428da6
...
...
@@ -569,7 +569,7 @@ sub bz_setup_foreign_keys {
# so if it doesn't have them, then we're setting up FKs
# for the first time, and should be quieter about it.
my
$activity_fk
=
$self
->
bz_fk_info
(
'profiles_activity'
,
'userid'
);
my
$any_fks
=
$activity_fk
&&
$activity_fk
->
{
created
};
my
$any_fks
=
$activity_fk
&&
$activity_fk
->
{
created
};
if
(
!
$any_fks
)
{
say
get_text
(
'install_fk_setup'
);
}
...
...
Bugzilla/DB/Mysql.pm
View file @
92428da6
...
...
@@ -348,7 +348,7 @@ sub bz_setup_database {
my
$tables
=
$self
->
selectall_arrayref
(
'SHOW TABLE STATUS'
);
foreach
my
$table_status
(
@$tables
)
{
my
(
$table
,
undef
,
undef
,
$row_format
)
=
@$table_status
;
my
$table_type
=
$table_status
->
[
-
1
];
my
$table_type
=
$table_status
->
[
-
1
];
my
$new_row_format
=
$self
->
default_row_format
(
$table
);
next
if
lc
(
$table_type
)
eq
'view'
;
next
if
lc
(
$new_row_format
)
eq
'compact'
;
...
...
Bugzilla/DB/Schema.pm
View file @
92428da6
...
...
@@ -221,7 +221,7 @@ use constant FIELD_TABLE_SCHEMA => {
# to these index names.
INDEXES
=>
[
value_idx
=>
{
FIELDS
=>
[
'value'
],
TYPE
=>
'UNIQUE'
},
sortkey_idx
=>
[
'sortkey'
,
'value'
],
sortkey_idx
=>
[
'sortkey'
,
'value'
],
visibility_value_id_idx
=>
[
'visibility_value_id'
],
],
};
...
...
@@ -663,15 +663,15 @@ use constant ABSTRACT_SCHEMA => {
flagtypes
=>
{
FIELDS
=>
[
id
=>
{
TYPE
=>
'MEDIUMSERIAL'
,
NOTNULL
=>
1
,
PRIMARYKEY
=>
1
},
name
=>
{
TYPE
=>
'varchar(50)'
,
NOTNULL
=>
1
},
description
=>
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
},
name
=>
{
TYPE
=>
'varchar(50)'
,
NOTNULL
=>
1
},
description
=>
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
},
cc_list
=>
{
TYPE
=>
'varchar(200)'
},
target_type
=>
{
TYPE
=>
'char(1)'
,
NOTNULL
=>
1
,
DEFAULT
=>
"'b'"
},
is_active
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'TRUE'
},
is_requestable
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'FALSE'
},
is_requesteeble
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'FALSE'
},
is_multiplicable
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'FALSE'
},
sortkey
=>
{
TYPE
=>
'INT2'
,
NOTNULL
=>
1
,
DEFAULT
=>
'0'
},
target_type
=>
{
TYPE
=>
'char(1)'
,
NOTNULL
=>
1
,
DEFAULT
=>
"'b'"
},
is_active
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'TRUE'
},
is_requestable
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'FALSE'
},
is_requesteeble
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'FALSE'
},
is_multiplicable
=>
{
TYPE
=>
'BOOLEAN'
,
NOTNULL
=>
1
,
DEFAULT
=>
'FALSE'
},
sortkey
=>
{
TYPE
=>
'INT2'
,
NOTNULL
=>
1
,
DEFAULT
=>
'0'
},
grant_group_id
=>
{
TYPE
=>
'INT3'
,
REFERENCES
=>
{
TABLE
=>
'groups'
,
COLUMN
=>
'id'
,
DELETE
=>
'SET NULL'
}
...
...
@@ -827,7 +827,7 @@ use constant ABSTRACT_SCHEMA => {
],
INDEXES
=>
[
bug_status_value_idx
=>
{
FIELDS
=>
[
'value'
],
TYPE
=>
'UNIQUE'
},
bug_status_sortkey_idx
=>
[
'sortkey'
,
'value'
],
bug_status_sortkey_idx
=>
[
'sortkey'
,
'value'
],
bug_status_visibility_value_id_idx
=>
[
'visibility_value_id'
],
],
},
...
...
@@ -836,7 +836,7 @@ use constant ABSTRACT_SCHEMA => {
FIELDS
=>
dclone
(
FIELD_TABLE_SCHEMA
->
{
FIELDS
}),
INDEXES
=>
[
resolution_value_idx
=>
{
FIELDS
=>
[
'value'
],
TYPE
=>
'UNIQUE'
},
resolution_sortkey_idx
=>
[
'sortkey'
,
'value'
],
resolution_sortkey_idx
=>
[
'sortkey'
,
'value'
],
resolution_visibility_value_id_idx
=>
[
'visibility_value_id'
],
],
},
...
...
@@ -845,7 +845,7 @@ use constant ABSTRACT_SCHEMA => {
FIELDS
=>
dclone
(
FIELD_TABLE_SCHEMA
->
{
FIELDS
}),
INDEXES
=>
[
bug_severity_value_idx
=>
{
FIELDS
=>
[
'value'
],
TYPE
=>
'UNIQUE'
},
bug_severity_sortkey_idx
=>
[
'sortkey'
,
'value'
],
bug_severity_sortkey_idx
=>
[
'sortkey'
,
'value'
],
bug_severity_visibility_value_id_idx
=>
[
'visibility_value_id'
],
],
},
...
...
@@ -854,7 +854,7 @@ use constant ABSTRACT_SCHEMA => {
FIELDS
=>
dclone
(
FIELD_TABLE_SCHEMA
->
{
FIELDS
}),
INDEXES
=>
[
priority_value_idx
=>
{
FIELDS
=>
[
'value'
],
TYPE
=>
'UNIQUE'
},
priority_sortkey_idx
=>
[
'sortkey'
,
'value'
],
priority_sortkey_idx
=>
[
'sortkey'
,
'value'
],
priority_visibility_value_id_idx
=>
[
'visibility_value_id'
],
],
},
...
...
@@ -863,7 +863,7 @@ use constant ABSTRACT_SCHEMA => {
FIELDS
=>
dclone
(
FIELD_TABLE_SCHEMA
->
{
FIELDS
}),
INDEXES
=>
[
rep_platform_value_idx
=>
{
FIELDS
=>
[
'value'
],
TYPE
=>
'UNIQUE'
},
rep_platform_sortkey_idx
=>
[
'sortkey'
,
'value'
],
rep_platform_sortkey_idx
=>
[
'sortkey'
,
'value'
],
rep_platform_visibility_value_id_idx
=>
[
'visibility_value_id'
],
],
},
...
...
@@ -872,7 +872,7 @@ use constant ABSTRACT_SCHEMA => {
FIELDS
=>
dclone
(
FIELD_TABLE_SCHEMA
->
{
FIELDS
}),
INDEXES
=>
[
op_sys_value_idx
=>
{
FIELDS
=>
[
'value'
],
TYPE
=>
'UNIQUE'
},
op_sys_sortkey_idx
=>
[
'sortkey'
,
'value'
],
op_sys_sortkey_idx
=>
[
'sortkey'
,
'value'
],
op_sys_visibility_value_id_idx
=>
[
'visibility_value_id'
],
],
},
...
...
Bugzilla/Field.pm
View file @
92428da6
...
...
@@ -153,7 +153,7 @@ use constant SQL_DEFINITIONS => {
{
TYPE
=>
'varchar(64)'
,
NOTNULL
=>
1
,
DEFAULT
=>
"'---'"
},
FIELD_TYPE_TEXTAREA
,
{
TYPE
=>
'MEDIUMTEXT'
,
NOTNULL
=>
1
,
DEFAULT
=>
"''"
},
FIELD_TYPE_DATETIME
,
{
TYPE
=>
'DATETIME'
},
FIELD_TYPE_DATE
,
{
TYPE
=>
'DATE'
},
FIELD_TYPE_BUG_ID
,
{
TYPE
=>
'INT3'
},
FIELD_TYPE_INTEGER
,
{
TYPE
=>
'INT3'
},
FIELD_TYPE_INTEGER
,
{
TYPE
=>
'INT4'
,
NOTNULL
=>
1
,
DEFAULT
=>
0
},
};
...
...
@@ -1472,7 +1472,7 @@ sub check_field {
return
0
if
$no_warn
;
# We don't want an error to be thrown; return.
trick_taint
(
$name
);
my
$field
=
new
Bugzilla::
Field
({
name
=>
$name
});
my
$field
=
new
Bugzilla::
Field
({
name
=>
$name
});
my
$field_desc
=
$field
?
$field
->
description
:
$name
;
ThrowCodeError
(
'illegal_field'
,
{
field
=>
$field_desc
});
}
...
...
Bugzilla/Install/Util.pm
View file @
92428da6
...
...
@@ -267,7 +267,7 @@ sub indicate_progress {
my
(
$params
)
=
@_
;
my
$current
=
$params
->
{
current
};
my
$total
=
$params
->
{
total
};
my
$every
=
$params
->
{
every
}
||
1
;
my
$every
=
$params
->
{
every
}
||
1
;
print
"."
if
!
(
$current
%
$every
);
if
(
$current
==
$total
||
$current
%
(
$every
*
60
)
==
0
)
{
...
...
Bugzilla/Migrate/Gnats.pm
View file @
92428da6
...
...
@@ -552,9 +552,9 @@ sub _parse_audit_trail {
$current_data
{
bug_when
}
=
$self
->
parse_date
(
$value
);
}
if
(
$column
eq
'Why'
)
{
$value
=
''
if
!
defined
$value
;
$value
=
''
if
!
defined
$value
;
$current_data
{
comment
}
=
$value
;
$on_why
=
1
;
$on_why
=
1
;
}
else
{
$on_why
=
0
;
...
...
Bugzilla/Search.pm
View file @
92428da6
...
...
@@ -1431,7 +1431,7 @@ sub _parse_basic_fields {
my
@values
=
$self
->
_param_array
(
$param_name
);
next
if
!
@values
;
my
$default_op
=
$param_name
eq
'content'
?
'matches'
:
'anyexact'
;
my
$operator
=
$params
->
{
"${param_name}_type"
}
||
$default_op
;
my
$operator
=
$params
->
{
"${param_name}_type"
}
||
$default_op
;
# Fields that are displayed as multi-selects are passed as arrays,
# so that they can properly search values that contain commas.
...
...
@@ -1685,19 +1685,19 @@ sub _boolean_charts {
my
@param_list
=
keys
%
$params
;
my
@all_field_params
=
grep
{
/^field-?\d+/
}
@param_list
;
my
@chart_ids
=
map
{
/^field(-?\d+)/
;
$1
}
@all_field_params
;
my
@chart_ids
=
map
{
/^field(-?\d+)/
;
$1
}
@all_field_params
;
@chart_ids
=
sort
{
$a
<=>
$b
}
uniq
@chart_ids
;
my
$clause
=
new
Bugzilla::Search::
Clause
();
foreach
my
$chart_id
(
@chart_ids
)
{
my
@all_and
=
grep
{
/^field$chart_id-\d+/
}
@param_list
;
my
@and_ids
=
map
{
/^field$chart_id-(\d+)/
;
$1
}
@all_and
;
my
@and_ids
=
map
{
/^field$chart_id-(\d+)/
;
$1
}
@all_and
;
@and_ids
=
sort
{
$a
<=>
$b
}
uniq
@and_ids
;
my
$and_clause
=
new
Bugzilla::Search::
Clause
();
foreach
my
$and_id
(
@and_ids
)
{
my
@all_or
=
grep
{
/^field$chart_id-$and_id-\d+/
}
@param_list
;
my
@or_ids
=
map
{
/^field$chart_id-$and_id-(\d+)/
;
$1
}
@all_or
;
my
@or_ids
=
map
{
/^field$chart_id-$and_id-(\d+)/
;
$1
}
@all_or
;
@or_ids
=
sort
{
$a
<=>
$b
}
uniq
@or_ids
;
my
$or_clause
=
new
Bugzilla::Search::
Clause
(
'OR'
);
...
...
@@ -1776,7 +1776,7 @@ sub _field_ids {
my
@param_list
=
keys
%
$params
;
my
@field_params
=
grep
{
/^f\d+$/
}
@param_list
;
my
@field_ids
=
map
{
/(\d+)/
;
$1
}
@field_params
;
my
@field_ids
=
map
{
/(\d+)/
;
$1
}
@field_params
;
@field_ids
=
sort
{
$a
<=>
$b
}
@field_ids
;
return
@field_ids
;
}
...
...
@@ -1794,15 +1794,15 @@ sub _handle_chart {
if
(
ref
$value
eq
'ARRAY'
)
{
# Trim input and ignore blank values.
@$value
=
map
{
trim
(
$_
)
}
@$value
;
@$value
=
map
{
trim
(
$_
)
}
@$value
;
@$value
=
grep
{
defined
$_
and
$_
ne
''
}
@$value
;
return
if
!
@$value
;
$orig_value
=
join
(
','
,
@$value
);
$orig_value
=
join
(
','
,
@$value
);
$string_value
=
join
(
','
,
@$value
);
}
else
{
return
if
$value
eq
''
;
$orig_value
=
$value
;
$orig_value
=
$value
;
$string_value
=
$value
;
}
...
...
@@ -3007,7 +3007,7 @@ sub _multiselect_isempty {
=
@$args
{
qw(field operator joins chart_id)
};
my
$dbh
=
Bugzilla
->
dbh
;
$operator
=
$self
->
_reverse_operator
(
$operator
)
if
$not
;
$not
=
$operator
eq
'isnotempty'
?
'NOT'
:
''
;
$not
=
$operator
eq
'isnotempty'
?
'NOT'
:
''
;
if
(
$field
eq
'keywords'
)
{
push
@$joins
,
...
...
Bugzilla/Search/Quicksearch.pm
View file @
92428da6
...
...
@@ -73,7 +73,7 @@ sub FIELD_MAP {
# Get all the fields whose names don't contain periods. (Fields that
# contain periods are always handled in MAPPINGS.)
my
@db_fields
=
grep
{
$_
->
name
!~
/\./
}
@
{
Bugzilla
->
fields
({
obsolete
=>
0
})};
my
%
full_map
=
(
%
{
MAPPINGS
()},
map
{
$_
->
name
=>
$_
->
name
}
@db_fields
);
my
%
full_map
=
(
%
{
MAPPINGS
()},
map
{
$_
->
name
=>
$_
->
name
}
@db_fields
);
# Eliminate the fields that start with bug_ or rep_, because those are
# handled by the MAPPINGS instead, and we don't want too many names
...
...
@@ -86,9 +86,9 @@ sub FIELD_MAP {
# (both because it's unnecessary and because otherwise
# "reporter_accessible" and "reporter" both match "rep".
delete
@full_map
{
qw(rep_platform bug_status bug_file_loc bug_group
bug_severity bug_status
status_whiteboard
cclist_accessible reporter_accessible)
};
bug_severity bug_status
status_whiteboard
cclist_accessible reporter_accessible)
};
Bugzilla::Hook::
process
(
'quicksearch_map'
,
{
'map'
=>
\%
full_map
});
...
...
Bugzilla/Template/Plugin/Hook.pm
View file @
92428da6
...
...
@@ -49,7 +49,7 @@ sub process {
# Get the hooks out of the cache if they exist. Otherwise, read them
# from the disk.
my
$cache
=
Bugzilla
->
request_cache
->
{
template_plugin_hook_cache
}
||=
{};
my
$lang
=
$context
->
{
bz_language
}
||
''
;
my
$lang
=
$context
->
{
bz_language
}
||
''
;
$cache
->
{
"${lang}__$extension_template"
}
||=
$self
->
_get_hooks
(
$extension_template
);
...
...
Bugzilla/Token.pm
View file @
92428da6
...
...
@@ -237,7 +237,7 @@ sub check_hash_token {
$vars
->
{
'script_name'
}
=
basename
(
$0
);
$vars
->
{
'token'
}
=
issue_hash_token
(
$data
);
$vars
->
{
'reason'
}
=
(
!
$token
)
?
'missing_token'
=
(
!
$token
)
?
'missing_token'
:
(
$expected_token
ne
$token
)
?
'invalid_token'
:
'expired_token'
;
print
Bugzilla
->
cgi
->
header
();
...
...
Bugzilla/User.pm
View file @
92428da6
...
...
@@ -331,7 +331,7 @@ sub set_password { $_[0]->set('cryptpassword', $_[1]); }
sub
set_disabledtext
{
$_
[
0
]
->
set
(
'disabledtext'
,
$_
[
1
]);
$_
[
0
]
->
set
(
'is_enabled'
,
$_
[
1
]
?
0
:
1
);
$_
[
0
]
->
set
(
'is_enabled'
,
$_
[
1
]
?
0
:
1
);
}
sub
set_groups
{
...
...
@@ -425,7 +425,7 @@ sub _set_groups_to_object {
# Go through the array, and turn items into group objects
my
@groups
=
();
foreach
my
$value
(
@
{
$changes
->
{
$key
}})
{
my
$type
=
$value
=~
/^\d+$/
?
'id'
:
'name'
;
my
$type
=
$value
=~
/^\d+$/
?
'id'
:
'name'
;
my
$group
=
Bugzilla::
Group
->
new
({
$type
=>
$value
});
if
(
!
$group
||
!
$user
->
can_bless
(
$group
->
id
))
{
...
...
@@ -554,7 +554,7 @@ sub queries_subscribed {
return
[]
unless
$self
->
id
;
# Exclude the user's own queries.
my
@my_query_ids
=
map
(
$_
->
id
,
@
{
$self
->
queries
});
my
@my_query_ids
=
map
(
$_
->
id
,
@
{
$self
->
queries
});
my
$query_id_string
=
join
(
','
,
@my_query_ids
)
||
'-1'
;
# Only show subscriptions that we can still actually see. If a
...
...
@@ -581,7 +581,7 @@ sub queries_available {
return
[]
unless
$self
->
id
;
# Exclude the user's own queries.
my
@my_query_ids
=
map
(
$_
->
id
,
@
{
$self
->
queries
});
my
@my_query_ids
=
map
(
$_
->
id
,
@
{
$self
->
queries
});
my
$query_id_string
=
join
(
','
,
@my_query_ids
)
||
'-1'
;
my
$avail_query_ids
=
Bugzilla
->
dbh
->
selectcol_arrayref
(
...
...
Bugzilla/User/APIKey.pm
View file @
92428da6
...
...
@@ -75,7 +75,7 @@ sub set_description { $_[0]->set('description', $_[1]); }
sub
set_revoked
{
$_
[
0
]
->
set
(
'revoked'
,
$_
[
1
]);
}
# Validators
sub
_check_api_key
{
return
generate_random_password
(
40
);
}
sub
_check_api_key
{
return
generate_random_password
(
40
);
}
sub
_check_description
{
return
trim
(
$_
[
1
])
||
''
;
}
1
;
...
...
Bugzilla/WebService/Bug.pm
View file @
92428da6
...
...
@@ -150,14 +150,14 @@ sub fields {
}
my
%
field_data
=
(
id
=>
$self
->
type
(
'int'
,
$field
->
id
),
type
=>
$self
->
type
(
'int'
,
$field
->
type
),
is_custom
=>
$self
->
type
(
'boolean'
,
$field
->
custom
),
name
=>
$self
->
type
(
'string'
,
$field
->
name
),
display_name
=>
$self
->
type
(
'string'
,
$field
->
description
),
is_mandatory
=>
$self
->
type
(
'boolean'
,
$field
->
is_mandatory
),
is_on_bug_entry
=>
$self
->
type
(
'boolean'
,
$field
->
enter_bug
),
visibility_field
=>
$self
->
type
(
'string'
,
$visibility_field
),
id
=>
$self
->
type
(
'int'
,
$field
->
id
),
type
=>
$self
->
type
(
'int'
,
$field
->
type
),
is_custom
=>
$self
->
type
(
'boolean'
,
$field
->
custom
),
name
=>
$self
->
type
(
'string'
,
$field
->
name
),
display_name
=>
$self
->
type
(
'string'
,
$field
->
description
),
is_mandatory
=>
$self
->
type
(
'boolean'
,
$field
->
is_mandatory
),
is_on_bug_entry
=>
$self
->
type
(
'boolean'
,
$field
->
enter_bug
),
visibility_field
=>
$self
->
type
(
'string'
,
$visibility_field
),
visibility_values
=>
[
map
{
$self
->
type
(
'string'
,
$_
->
name
)
}
@$vis_values
],
);
if
(
$has_values
)
{
...
...
@@ -527,7 +527,7 @@ sub search {
my
%
options
=
(
fields
=>
[
'bug_id'
]);
# Find the highest custom field id
my
@field_ids
=
grep
(
/^f(\d+)$/
,
keys
%
$match_params
);
my
@field_ids
=
grep
(
/^f(\d+)$/
,
keys
%
$match_params
);
my
$last_field_id
=
@field_ids
?
max
@field_ids
+
1
:
1
;
# Do special search types for certain fields.
...
...
Bugzilla/WebService/Classification.pm
View file @
92428da6
...
...
@@ -70,11 +70,11 @@ sub _classification_to_hash {
return
filter
$params
,
{
id
=>
$self
->
type
(
'int'
,
$classification
->
id
),
name
=>
$self
->
type
(
'string'
,
$classification
->
name
),
description
=>
$self
->
type
(
'string'
,
$classification
->
description
),
sort_key
=>
$self
->
type
(
'int'
,
$classification
->
sortkey
),
products
=>
[
map
{
$self
->
_product_to_hash
(
$_
,
$params
)
}
@$products
],
id
=>
$self
->
type
(
'int'
,
$classification
->
id
),
name
=>
$self
->
type
(
'string'
,
$classification
->
name
),
description
=>
$self
->
type
(
'string'
,
$classification
->
description
),
sort_key
=>
$self
->
type
(
'int'
,
$classification
->
sortkey
),
products
=>
[
map
{
$self
->
_product_to_hash
(
$_
,
$params
)
}
@$products
],
};
}
...
...
extensions/OldBugMove/Extension.pm
View file @
92428da6
...
...
@@ -183,7 +183,7 @@ sub _move_bug {
my
@fieldlist
=
(
Bugzilla::
Bug
->
fields
,
'group'
,
'long_desc'
,
'attachment'
,
'attachmentdata'
);
my
%
displayfields
=
map
{
$_
=>
1
}
@fieldlist
;
my
$vars
=
{
bugs
=>
[
$export_me
],
displayfields
=>
\%
displayfields
};
my
$vars
=
{
bugs
=>
[
$export_me
],
displayfields
=>
\%
displayfields
};
$template
->
process
(
"bug/show.xml.tmpl"
,
$vars
,
\
$msg
)
||
ThrowTemplateError
(
$template
->
error
());
$msg
.=
"\n"
;
...
...
importxml.pl
View file @
92428da6
...
...
@@ -595,10 +595,10 @@ sub process_bug {
format_time
(
$bug_fields
{
'delta_ts'
},
"%Y-%m-%d %T"
)
||
$timestamp
);
# Bug Access
push
(
@query
,
"cclist_accessible"
);
push
(
@query
,
"cclist_accessible"
);
push
(
@values
,
$bug_fields
{
'cclist_accessible'
}
?
1
:
0
);
push
(
@query
,
"reporter_accessible"
);
push
(
@query
,
"reporter_accessible"
);
push
(
@values
,
$bug_fields
{
'reporter_accessible'
}
?
1
:
0
);
my
$product
=
new
Bugzilla::
Product
({
name
=>
$bug_fields
{
'product'
}
||
''
});
...
...
xt/lib/Bugzilla/Test/Search.pm
View file @
92428da6
...
...
@@ -637,7 +637,7 @@ sub _create_one_bug {
my
$extra_values
=
$self
->
_extra_bug_create_values
->
{
$number
};
foreach
my
$field
(
qw(comments remaining_time percentage_complete
keyword_objects everconfirmed dependson blocked
groups_in classification actual_time)
)
groups_in classification actual_time)
)
{
$extra_values
->
{
$field
}
=
$bug
->
$field
;
}
...
...
xt/lib/Bugzilla/Test/Search/Constants.pm
View file @
92428da6
...
...
@@ -958,10 +958,10 @@ use constant INJECTION_BROKEN_FIELD => {
search
=>
1
,
db_skip
=>
[
'Pg'
],
operator_ok
=>
[
qw(allwords allwordssubstr anywordssubstr casesubstring
changedbefore changedafter greaterthan greaterthaneq
lessthan lessthaneq notregexp notsubstring
nowordssubstr regexp substring anywords
notequals nowords equals anyexact)
],
changedbefore changedafter greaterthan greaterthaneq
lessthan lessthaneq notregexp notsubstring
nowordssubstr regexp substring anywords
notequals nowords equals anyexact)
],
},
};
...
...
@@ -1115,7 +1115,7 @@ use constant CUSTOM_SEARCH_TESTS => (
contains
=>
[
1
],
columns
=>
[
'assigned_to'
],
params
=>
[
{
f
=>
'bug_id'
,
o
=>
'equals'
,
v
=>
'<1>'
},
{
f
=>
'bug_id'
,
o
=>
'equals'
,
v
=>
'<1>'
},
{
f
=>
'OP'
},
{
f
=>
'CP'
},
{
f
=>
'assigned_to'
,
o
=>
'substr'
,
v
=>
'@'
},
...
...
@@ -1210,8 +1210,8 @@ use constant CUSTOM_SEARCH_TESTS => (
params
=>
[
{
f
=>
'bug_id'
,
o
=>
'equals'
,
v
=>
'<3>'
},
{
f
=>
'OP'
},
{
f
=>
'OP'
,
j
=>
'OR'
},
{
f
=>
'bug_id'
,
o
=>
'equals'
,
v
=>
'<1>'
},
{
f
=>
'OP'
,
j
=>
'OR'
},
{
f
=>
'bug_id'
,
o
=>
'equals'
,
v
=>
'<1>'
},
{
f
=>
'assigned_to'
,
o
=>
'equals'
,
v
=>
'<2>'
},
{
f
=>
'CP'
},
{
f
=>
'OP'
,
j
=>
'OR'
},
...
...
@@ -1231,8 +1231,8 @@ use constant CUSTOM_SEARCH_TESTS => (
params
=>
[
{
f
=>
'bug_id'
,
o
=>
'equals'
,
v
=>
'<3>'
},
{
f
=>
'OP'
},
{
f
=>
'OP'
,
j
=>
'OR'
},
{
f
=>
'bug_id'
,
o
=>
'equals'
,
v
=>
'<1>'
},
{
f
=>
'OP'
,
j
=>
'OR'
},
{
f
=>
'bug_id'
,
o
=>
'equals'
,
v
=>
'<1>'
},
{
f
=>
'assigned_to'
,
o
=>
'equals'
,
v
=>
'<2>'
},
{
f
=>
'CP'
},
{
f
=>
'OP'
,
j
=>
'OR'
},
...
...
xt/lib/Bugzilla/Test/Search/CustomTest.pm
View file @
92428da6
...
...
@@ -55,7 +55,7 @@ sub debug_value {
}
# The tests we know are broken for this operator/field combination.
sub
_known_broken
{
return
{}
}
sub
_known_broken
{
return
{}
}
sub
contains_known_broken
{
return
undef
}
sub
search_known_broken
{
return
undef
}
sub
field_not_yet_implemented
{
return
undef
}
...
...
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