'. t('Update Notify is two modules: a "client" and a "server". The client, to be enabled on all sites that are to report to the central tracker, sends a list of installed modules and their status to the tracking site via xmlrpc when cron is run. This information is taken from the update status module. The server component, enabled on the tracking site, receives these lists from all the clients and creates nodes for each module. These nodes will then get updated everytime the cron is run on the tracked sites. For the tracked sites to have the right to create these nodes, the keys of the tracked sites need to be entered into the tracker site.') .'

'; case 'admin/settings/update_notify_client': return t('

You need to copy this drupal key somewhere because your gona need it later in the configuration of the server module of update notify.

Also, you must add the XML-RPC URL of the server/tracker site (e.g. http://trackeRsite.example.com/xmlrpc.php

'); } } /** * Drupal menu Hook */ function update_notify_client_menu($may_cache) { $items = array(); if ($may_cache) { $items[] = array( 'path' => 'admin/settings/update_notify_client', 'title' => t('update notification client'), 'description' => t('Set the remote site where to send update module.'), 'callback' => 'drupal_get_form', 'callback arguments' => array('update_notify_client_settings'), 'access' => user_access('administer site configuration') ); } return $items; } /** * Implementation of hook_cron(). */ function update_notify_client_cron() { update_notify_client_xml_status(); } function update_notify_client_settings() { $form['update_notify_client_details'] = array( '#value' => t("The MD5sum of your Drupal key is:") . " " . md5(variable_get('drupal_private_key', 0)), ); $form['update_notify_server'] = array( '#type' => 'textfield', '#title' => t('Remote site XML-RPC address'), '#size' => 60, '#maxlength' => 128, '#default_value' => variable_get('update_notify_server', ''), '#required' => TRUE, ); return system_settings_form($form); } function update_notify_settings_client_submit($form_id, $form_values) { variable_set('update_notify_server', $form_values['update_notify_server']); } function update_notify_client_xml_status() { if ($available = update_status_get_available(TRUE)) { $data = update_status_calculate_project_data($available); $pack = array(); $pack['key'] = md5(variable_get('drupal_private_key', 0)); foreach($data as $project) { $pack[$project['short_name']] = $project['status']; } $url = variable_get('update_notify_server', 'localhost'); $method_name = 'update_notify.notify'; $result = xmlrpc($url, $method_name,$pack); drupal_set_message($result); } }