function drd_server_status in Drupal Remote Dashboard Server 7.2
Same name and namespace in other branches
- 6.2 drd_server.module \drd_server_status()
Callback to retrieve current status of the domain.
Return value
string The result string to be sent back to DRD.
1 string reference to 'drd_server_status'
- drd_server_xmlrpc in ./
drd_server.module - Implementation of hook_xmlrpc().
File
- ./
drd_server.module, line 547 - Provides XMLRPC implementation to respond to requests from DRD.
Code
function drd_server_status() {
$args = func_get_args();
$valid = _drd_server_validate_request($args);
if ($valid !== TRUE) {
return $valid;
}
if (module_exists('update')) {
module_load_include('inc', 'update', 'update.compare');
$projects = array();
foreach (update_get_projects() as $project_name => $full_info) {
$projects[$project_name] = $full_info['info']['version'];
}
}
else {
// If for some reason we don't have update module available to check,
// fall back to the old way of trying to use module names, which still
// works far more often than not.
$projects = db_select('system', 's')
->fields('s', array(
'name',
'schema_version',
))
->condition('s.status', 1)
->execute()
->fetchAllKeyed(0, 1);
}
$status = array(
'maintenance_mode' => variable_get('maintenance_mode', FALSE),
'projects_enabled' => $projects,
'drupal_root' => DRUPAL_ROOT,
);
drupal_alter('drd_server_status', $status);
return drd_server_result('drd.status', $status);
}