Issue #2287777 by andypost: Optimize _dblog_get_message_types().
parent
eb2bfe7d49
commit
a0e5302dba
|
@ -87,14 +87,8 @@ function dblog_cron() {
|
||||||
* List of uniquely defined database log message types.
|
* List of uniquely defined database log message types.
|
||||||
*/
|
*/
|
||||||
function _dblog_get_message_types() {
|
function _dblog_get_message_types() {
|
||||||
$types = array();
|
return db_query('SELECT DISTINCT(type) FROM {watchdog} ORDER BY type')
|
||||||
|
->fetchAllKeyed(0, 0);
|
||||||
$result = db_query('SELECT DISTINCT(type) FROM {watchdog} ORDER BY type');
|
|
||||||
foreach ($result as $object) {
|
|
||||||
$types[] = $object->type;
|
|
||||||
}
|
|
||||||
|
|
||||||
return array_combine($types, $types);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue