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
c427a6f7
Commit
c427a6f7
authored
Aug 06, 2009
by
mkanat%bugzilla.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 508729: Cache Bugzilla::Status::BUG_STATE_OPEN
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, a=LpSolit
parent
d59420c8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
Status.pm
Bugzilla/Status.pm
+7
-2
No files found.
Bugzilla/Status.pm
View file @
c427a6f7
...
@@ -66,6 +66,7 @@ sub VALIDATORS {
...
@@ -66,6 +66,7 @@ sub VALIDATORS {
sub
create
{
sub
create
{
my
$class
=
shift
;
my
$class
=
shift
;
my
$self
=
$class
->
SUPER::
create
(
@_
);
my
$self
=
$class
->
SUPER::
create
(
@_
);
delete
Bugzilla
->
request_cache
->
{
status_bug_state_open
};
add_missing_bug_status_transitions
();
add_missing_bug_status_transitions
();
return
$self
;
return
$self
;
}
}
...
@@ -80,6 +81,7 @@ sub remove_from_db {
...
@@ -80,6 +81,7 @@ sub remove_from_db {
WHERE old_status = ? OR new_status = ?'
,
WHERE old_status = ? OR new_status = ?'
,
undef
,
$id
,
$id
);
undef
,
$id
,
$id
);
$dbh
->
bz_commit_transaction
();
$dbh
->
bz_commit_transaction
();
delete
Bugzilla
->
request_cache
->
{
status_bug_state_open
};
}
}
###############################
###############################
...
@@ -120,9 +122,12 @@ sub _check_value {
...
@@ -120,9 +122,12 @@ sub _check_value {
###############################
###############################
sub
BUG_STATE_OPEN
{
sub
BUG_STATE_OPEN
{
# XXX - We should cache this list.
my
$dbh
=
Bugzilla
->
dbh
;
my
$dbh
=
Bugzilla
->
dbh
;
return
@
{
$dbh
->
selectcol_arrayref
(
'SELECT value FROM bug_status WHERE is_open = 1'
)};
my
$cache
=
Bugzilla
->
request_cache
;
$cache
->
{
status_bug_state_open
}
||=
$dbh
->
selectcol_arrayref
(
'SELECT value FROM bug_status
WHERE is_open = 1'
);
return
@
{
$cache
->
{
status_bug_state_open
}
};
}
}
# Tells you whether or not the argument is a valid "open" state.
# Tells you whether or not the argument is a valid "open" state.
...
...
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