Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
a0e5302d
Commit
a0e5302d
authored
Jul 10, 2014
by
alexpott
Browse files
Issue
#2287777
by andypost: Optimize _dblog_get_message_types().
parent
eb2bfe7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/dblog/dblog.module
View file @
a0e5302d
...
...
@@ -87,14 +87,8 @@ function dblog_cron() {
* List of uniquely defined database log message types.
*/
function
_dblog_get_message_types
()
{
$types
=
array
();
$result
=
db_query
(
'SELECT DISTINCT(type) FROM {watchdog} ORDER BY type'
);
foreach
(
$result
as
$object
)
{
$types
[]
=
$object
->
type
;
}
return
array_combine
(
$types
,
$types
);
return
db_query
(
'SELECT DISTINCT(type) FROM {watchdog} ORDER BY type'
)
->
fetchAllKeyed
(
0
,
0
);
}
/**
...
...
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