21600) { variable_set("drupal_cron_last", time()); /* ** If this site acts as a Drupal XML-RPC server, delete the sites that ** stopped sending "ping" messages. */ db_query("DELETE FROM directory WHERE timestamp < '". (time() - 259200) ."'"); /* ** If this site acts as a Drupal XML-RPC client, send a message to the ** Drupal XML-RPC server. */ if (variable_get("drupal_directory", 0) && variable_get("drupal_server", 0)) { drupal_notify(variable_get("drupal_server", "")); } } } function drupal_directory_ping($arguments) { /* ** Parse our parameters: */ $argument = $arguments->getparam(0); $link = strip_tags($argument->scalarval()); $argument = $arguments->getparam(1); $name = strip_tags($argument->scalarval()); $argument = $arguments->getparam(2); $mail = strip_tags($argument->scalarval()); $argument = $arguments->getparam(3); $slogan = strip_tags($argument->scalarval()); $argument = $arguments->getparam(4); $mission = strip_tags($argument->scalarval()); /* ** Update the data in our database and send back a reply: */ if ($link && $name && $mail && $slogan && $mission) { db_query("DELETE FROM directory WHERE link = '". check_query($link) ."' OR mail = '". check_query($mail) ."'"); db_query("INSERT INTO directory (link, name, mail, slogan, mission, timestamp) VALUES ('". check_query($link) ."', '". check_query($name) ."', '". check_query($mail) ."', '". check_query($slogan) ."', '". check_query($mission) ."', '". time() ."')"); watchdog("message", "directory: ping from '$name' ($link)"); return new xmlrpcresp(new xmlrpcval(1, "int")); } else { return new xmlrpcresp(new xmlrpcval(0, "int")); } } function drupal_directory_page() { $result = db_query("SELECT * FROM directory ORDER BY name"); while ($site = db_fetch_object($result)) { $output .= "link\">$site->name - $site->slogan
Drupal is the name of the software which powers %s. There are Drupal websites all over the world, and many of them share their registration databases so that users may freely login to any Drupal site using a single Drupal ID.
So please feel free to login to your account here at %s with a username from another Drupal site. The format of a Drupal ID is similar to an email address: username@server. An example of valid Drupal ID is mwlily@www.drop.org.
"; return sprintf(t($output), $site, $site); } ?>