On this page
function tracker_enable
tracker_enable()
Implements hook_enable().
File
- modules/tracker/tracker.install, line 19
- Install, update, and uninstall functions for tracker.module.
Code
function tracker_enable() {
$max_nid = db_query('SELECT MAX(nid) FROM {node}')->fetchField();
if ($max_nid != 0) {
variable_set('tracker_index_nid', $max_nid);
// To avoid timing out while attempting to do a complete indexing, we
// simply call our cron job to remove stale records and begin the process.
tracker_cron();
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!tracker!tracker.install/function/tracker_enable/7.x