Commit f82ad874 authored by Dries's avatar Dries

- Patch #1591412 by andypost, swentel, cosmicdreams, sun: convert tracker...

- Patch #1591412 by andypost, swentel, cosmicdreams, sun: convert tracker settings to configuration system.
parent 9b43f559
......@@ -10,7 +10,6 @@
*/
function tracker_uninstall() {
variable_del('tracker_index_nid');
variable_del('tracker_batch_size');
}
/**
......@@ -116,3 +115,23 @@ function tracker_schema() {
return $schema;
}
/**
* @defgroup updates-7.x-to-8.x Updates from 7.x to 8.x
* @{
* Update functions from 7.x to 8.x.
*/
/**
* Moves tracker settings from variable to config.
*/
function tracker_update_8000() {
update_variables_to_config('tracker.settings', array(
'tracker_batch_size' => 'cron_index_limit',
));
}
/**
* @} End of "defgroup updates-7.x-to-8.x".
* The next series of updates should start at 9000.
*/
......@@ -80,7 +80,7 @@ function tracker_menu() {
*/
function tracker_cron() {
$max_nid = variable_get('tracker_index_nid', 0);
$batch_size = variable_get('tracker_batch_size', 1000);
$batch_size = config('tracker.settings')->get('cron_index_limit');
if ($max_nid > 0) {
$last_nid = FALSE;
$result = db_query_range('SELECT nid, uid, status FROM {node} WHERE nid <= :max_nid ORDER BY nid DESC', 0, $batch_size, array(':max_nid' => $max_nid), array('target' => 'slave'));
......
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