function ping_cron in Drupal 4
Same name and namespace in other branches
- 5 modules/ping/ping.module \ping_cron()
- 6 modules/ping/ping.module \ping_cron()
Implementation of hook_cron().
Fire off notifications of updates to remote sites.
File
- modules/
ping.module, line 35 - Alerts other sites that your site has been updated.
Code
function ping_cron() {
global $base_url;
if (variable_get('site_name', 0) && variable_get('site_slogan', 0)) {
if (db_num_rows(db_query("SELECT nid FROM {node} WHERE status = 1 AND moderate = 0 AND (created > '" . variable_get('cron_last', time()) . "' OR changed > '" . variable_get('cron_last', time()) . "')"))) {
_ping_notify(variable_get('site_name', '') . ' - ' . variable_get('site_slogan', ''), $base_url);
}
}
}