Commit 1bc53594 authored by xjm's avatar xjm
Browse files

Issue #2484667 by joshi.rohit100, Berdir: Do not run query in node_cron() if...

Issue #2484667 by joshi.rohit100, Berdir: Do not run query in node_cron() if search.module is not enabled
parent 608f81bf
......@@ -622,6 +622,7 @@ function node_cron() {
// Calculate the oldest and newest node created times, for use in search
// rankings. (Note that field aliases have to be variables passed by
// reference.)
if (\Drupal::moduleHandler()->moduleExists('search')) {
$min_alias = 'min_created';
$max_alias = 'max_created';
$result = \Drupal::entityQueryAggregate('node')
......@@ -636,6 +637,7 @@ function node_cron() {
);
\Drupal::state()->set('node.min_max_update_time', $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