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
b717465b
Commit
b717465b
authored
Nov 13, 2019
by
Vitaly Lipatov
Committed by
System Administrator
Nov 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quota groups table name and $table
parent
dd4a1b9b
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
11 deletions
+11
-11
Bug.pm
Bugzilla/Bug.pm
+1
-1
Object.pm
Bugzilla/Object.pm
+7
-7
Product.pm
Bugzilla/Product.pm
+1
-1
User.pm
Bugzilla/User.pm
+1
-1
editusers.cgi
editusers.cgi
+1
-1
No files found.
Bugzilla/Bug.pm
View file @
b717465b
...
@@ -3875,7 +3875,7 @@ sub groups {
...
@@ -3875,7 +3875,7 @@ sub groups {
" THEN 1 ELSE 0 END,"
.
" THEN 1 ELSE 0 END,"
.
" CASE WHEN groups.id IN($grouplist) THEN 1 ELSE 0 END,"
.
" CASE WHEN groups.id IN($grouplist) THEN 1 ELSE 0 END,"
.
" isactive, membercontrol, othercontrol"
.
" isactive, membercontrol, othercontrol"
.
" FROM
groups
"
.
" FROM
`groups`
"
.
" LEFT JOIN bug_group_map"
.
" LEFT JOIN bug_group_map"
.
" ON bug_group_map.group_id = groups.id"
.
" ON bug_group_map.group_id = groups.id"
.
" AND bug_id = ?"
.
" AND bug_id = ?"
.
...
...
Bugzilla/Object.pm
View file @
b717465b
...
@@ -127,7 +127,7 @@ sub _load_from_db {
...
@@ -127,7 +127,7 @@ sub _load_from_db {
return
if
$id
>
MAX_INT_32
;
return
if
$id
>
MAX_INT_32
;
$object_data
=
$dbh
->
selectrow_hashref
(
qq{
$object_data
=
$dbh
->
selectrow_hashref
(
qq{
SELECT $columns FROM
$table
SELECT $columns FROM
`$table`
WHERE $id_field = ?}
,
undef
,
$id
);
WHERE $id_field = ?}
,
undef
,
$id
);
}
else
{
}
else
{
unless
(
defined
$param
->
{
name
}
||
(
defined
$param
->
{
'condition'
}
unless
(
defined
$param
->
{
name
}
||
(
defined
$param
->
{
'condition'
}
...
@@ -154,7 +154,7 @@ sub _load_from_db {
...
@@ -154,7 +154,7 @@ sub _load_from_db {
map
{
trick_taint
(
$_
)
}
@values
;
map
{
trick_taint
(
$_
)
}
@values
;
$object_data
=
$dbh
->
selectrow_hashref
(
$object_data
=
$dbh
->
selectrow_hashref
(
"SELECT $columns FROM
$table
WHERE $condition"
,
undef
,
@values
);
"SELECT $columns FROM
`$table`
WHERE $condition"
,
undef
,
@values
);
}
}
return
$object_data
;
return
$object_data
;
}
}
...
@@ -387,7 +387,7 @@ sub _do_list_select {
...
@@ -387,7 +387,7 @@ sub _do_list_select {
}
}
if
(
!
$objects
)
{
if
(
!
$objects
)
{
my
$sql
=
"SELECT $cols FROM
$table
"
;
my
$sql
=
"SELECT $cols FROM
`$table`
"
;
if
(
defined
$where
)
{
if
(
defined
$where
)
{
$sql
.=
" WHERE $where "
;
$sql
.=
" WHERE $where "
;
}
}
...
@@ -528,7 +528,7 @@ sub update {
...
@@ -528,7 +528,7 @@ sub update {
my
$columns
=
join
(
', '
,
map
{
"$_ = ?"
}
@update_columns
);
my
$columns
=
join
(
', '
,
map
{
"$_ = ?"
}
@update_columns
);
$dbh
->
do
(
"UPDATE
$table
SET $columns WHERE $id_field = ?"
,
undef
,
$dbh
->
do
(
"UPDATE
`$table`
SET $columns WHERE $id_field = ?"
,
undef
,
@values
,
$self
->
id
)
if
@values
;
@values
,
$self
->
id
)
if
@values
;
Bugzilla::Hook::
process
(
'object_end_of_update'
,
Bugzilla::Hook::
process
(
'object_end_of_update'
,
...
@@ -561,7 +561,7 @@ sub remove_from_db {
...
@@ -561,7 +561,7 @@ sub remove_from_db {
my
$dbh
=
Bugzilla
->
dbh
;
my
$dbh
=
Bugzilla
->
dbh
;
$dbh
->
bz_start_transaction
();
$dbh
->
bz_start_transaction
();
$self
->
audit_log
(
AUDIT_REMOVE
)
if
$self
->
AUDIT_REMOVES
;
$self
->
audit_log
(
AUDIT_REMOVE
)
if
$self
->
AUDIT_REMOVES
;
$dbh
->
do
(
"DELETE FROM
$table
WHERE $id_field = ?"
,
undef
,
$self
->
id
);
$dbh
->
do
(
"DELETE FROM
`$table`
WHERE $id_field = ?"
,
undef
,
$self
->
id
);
$dbh
->
bz_commit_transaction
();
$dbh
->
bz_commit_transaction
();
if
(
$self
->
USE_MEMCACHED
)
{
if
(
$self
->
USE_MEMCACHED
)
{
Bugzilla
->
memcached
->
clear
({
table
=>
$table
,
id
=>
$self
->
id
});
Bugzilla
->
memcached
->
clear
({
table
=>
$table
,
id
=>
$self
->
id
});
...
@@ -638,7 +638,7 @@ sub any_exist {
...
@@ -638,7 +638,7 @@ sub any_exist {
my
$table
=
$class
->
DB_TABLE
;
my
$table
=
$class
->
DB_TABLE
;
my
$dbh
=
Bugzilla
->
dbh
;
my
$dbh
=
Bugzilla
->
dbh
;
my
$any_exist
=
$dbh
->
selectrow_array
(
my
$any_exist
=
$dbh
->
selectrow_array
(
"SELECT 1 FROM
$table
"
.
$dbh
->
sql_limit
(
1
));
"SELECT 1 FROM
`$table`
"
.
$dbh
->
sql_limit
(
1
));
return
$any_exist
?
1
:
0
;
return
$any_exist
?
1
:
0
;
}
}
...
@@ -739,7 +739,7 @@ sub insert_create_data {
...
@@ -739,7 +739,7 @@ sub insert_create_data {
my
$qmarks
=
'?,'
x
@field_names
;
my
$qmarks
=
'?,'
x
@field_names
;
chop
(
$qmarks
);
chop
(
$qmarks
);
my
$table
=
$class
->
DB_TABLE
;
my
$table
=
$class
->
DB_TABLE
;
$dbh
->
do
(
"INSERT INTO
$table
("
.
join
(
', '
,
@field_names
)
$dbh
->
do
(
"INSERT INTO
`$table`
("
.
join
(
', '
,
@field_names
)
.
") VALUES ($qmarks)"
,
undef
,
@values
);
.
") VALUES ($qmarks)"
,
undef
,
@values
);
my
$id
=
$dbh
->
bz_last_key
(
$table
,
$class
->
ID_FIELD
);
my
$id
=
$dbh
->
bz_last_key
(
$table
,
$class
->
ID_FIELD
);
...
...
Bugzilla/Product.pm
View file @
b717465b
...
@@ -580,7 +580,7 @@ sub group_controls {
...
@@ -580,7 +580,7 @@ sub group_controls {
# Include name to the list, to allow us sorting data more easily.
# Include name to the list, to allow us sorting data more easily.
my
$query
=
qq{SELECT id, name, entry, membercontrol, othercontrol,
my
$query
=
qq{SELECT id, name, entry, membercontrol, othercontrol,
canedit, editcomponents, editbugs, canconfirm
canedit, editcomponents, editbugs, canconfirm
FROM
groups
FROM
`groups`
LEFT JOIN group_control_map
LEFT JOIN group_control_map
ON id = group_id
ON id = group_id
$where_or_and product_id = ?
$where_or_and product_id = ?
...
...
Bugzilla/User.pm
View file @
b717465b
...
@@ -1641,7 +1641,7 @@ sub derive_regexp_groups {
...
@@ -1641,7 +1641,7 @@ sub derive_regexp_groups {
# add derived records for any matching regexps
# add derived records for any matching regexps
$sth
=
$dbh
->
prepare
(
"SELECT id, userregexp, user_group_map.group_id
$sth
=
$dbh
->
prepare
(
"SELECT id, userregexp, user_group_map.group_id
FROM
groups
FROM
`groups`
LEFT JOIN user_group_map
LEFT JOIN user_group_map
ON groups.id = user_group_map.group_id
ON groups.id = user_group_map.group_id
AND user_group_map.user_id = ?
AND user_group_map.user_id = ?
...
...
editusers.cgi
View file @
b717465b
...
@@ -683,7 +683,7 @@ sub userDataToVars {
...
@@ -683,7 +683,7 @@ sub userDataToVars {
) THEN 1 ELSE 0 END)
) THEN 1 ELSE 0 END)
AS derivedmember,
AS derivedmember,
COUNT(directbless.group_id) AS directbless
COUNT(directbless.group_id) AS directbless
FROM
groups
FROM
`groups`
LEFT JOIN user_group_map AS directmember
LEFT JOIN user_group_map AS directmember
ON directmember.group_id = id
ON directmember.group_id = id
AND directmember.user_id = ?
AND directmember.user_id = ?
...
...
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