From a170d1f8f22f10201a4b474c367a8170122f911e Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 11 Mar 2008 08:13:14 +0000 Subject: - Patch #231437 by catch, Rob, freso et al: remove ping module from core. --- modules/ping/ping.module | 59 ------------------------------------------------ 1 file changed, 59 deletions(-) delete mode 100644 modules/ping/ping.module (limited to 'modules/ping/ping.module') diff --git a/modules/ping/ping.module b/modules/ping/ping.module deleted file mode 100644 index fb2b20428..000000000 --- a/modules/ping/ping.module +++ /dev/null @@ -1,59 +0,0 @@ -'. t('The ping module is useful for notifying interested sites that your site has changed. It automatically sends notifications, or "pings", to the pingomatic service about new or updated content. In turn, pingomatic notifies other popular services, including weblogs.com, Technorati, blo.gs, BlogRolling, Feedster.com, and Moreover.', array('@external-http-pingomatic-com' => 'http://pingomatic.com/')) .'

'; - $output .= '

'. t('The ping module requires a correctly configured cron maintenance task.', array('@cron' => url('admin/reports/status'))) .'

'; - $output .= '

'. t('For more information, see the online handbook entry for Ping module.', array('@ping' => 'http://drupal.org/handbook/modules/ping/')) .'

'; - return $output; - } -} - -/** - * Implementation of hook_cron(). - * - * Fire off notifications of updates to remote sites. - */ -function ping_cron() { - global $base_url; - - if (variable_get('site_name', 0)) { - if (db_result(db_query("SELECT COUNT(*) FROM {node} WHERE status = 1 AND (created > '". variable_get('cron_last', time()) ."' OR changed > '". variable_get('cron_last', time()) ."')"))) { - _ping_notify(variable_get('site_name', ''), $base_url); - } - } -} - -/** - * Call hook_ping() in all modules to notify remote sites that there is - * new content at this one. - */ -function _ping_notify($name, $url) { - module_invoke_all('ping', $name, $url); -} - -/** - * Implementation of hook_ping(). - * - * Notifies pingomatic.com, blo.gs, and technorati.com of changes at this site. - */ -function ping_ping($name = '', $url = '') { - - $result = xmlrpc('http://rpc.pingomatic.com', 'weblogUpdates.ping', $name, $url); - - if ($result === FALSE) { - watchdog('directory ping', 'Failed to notify pingomatic.com (site).', array(), WATCHDOG_WARNING); - } -} - - -- cgit v1.2.3