Commit 4bf9e43e authored by Dries's avatar Dries

- Patch #375064 by c960657, catch: Performance: Multilanguage checking on admin/content/node slow.

parent 6b73b75e
......@@ -388,9 +388,9 @@ function node_admin_nodes() {
'#submit' => array('node_admin_nodes_submit'),
);
// Enable language column if translation module is enabled
// or if we have any node with language.
$multilanguage = (module_exists('translation') || db_query("SELECT COUNT(*) FROM {node} WHERE language <> :language", array(':language' => LANGUAGE_NONE))->fetchField());
// Enable language column if translation module is enabled or if we have any
// node with language.
$multilanguage = (module_exists('translation') || db_query_range("SELECT 1 FROM {node} WHERE language <> :language", 0, 1, array(':language' => LANGUAGE_NONE))->fetchField());
// Build the sortable table header.
$header = array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment