function drd_server_domain_info in Drupal Remote Dashboard Server 6
Same name and namespace in other branches
- 6.2 drd_server.domain.inc \drd_server_domain_info()
- 7.2 drd_server.domain.inc \drd_server_domain_info()
- 7 drd_server.domain.inc \drd_server_domain_info()
1 string reference to 'drd_server_domain_info'
- drd_server_xmlrpc in ./
drd_server.module - Implementation of hook_xmlrpc().
File
- ./
drd_server.domain.inc, line 3
Code
function drd_server_domain_info($sid, $domain = FALSE) {
$user = drd_server_load_user($sid);
if (is_string($user)) {
return drd_server_error($user);
}
$result = array(
'site_name' => variable_get('site_name', ''),
'base_url' => url('<front>', array(
'absolute' => TRUE,
)),
);
// Load .install files
include_once './includes/install.inc';
drupal_load_updates();
// Check run-time requirements and status information.
$requirements = module_invoke_all('requirements', 'runtime');
usort($requirements, '_system_sort_requirements');
$result['system_status_warning'] = drupal_requirements_severity($requirements) == REQUIREMENT_WARNING;
$result['system_status_error'] = drupal_requirements_severity($requirements) == REQUIREMENT_ERROR;
$server_values = array(
t('Drupal'),
t('Coder Upgrade directory'),
t('Drupal core update status'),
t('File system'),
t('GD library'),
t('PHP'),
t('PHP memory limit'),
t('PHP register globals'),
t('Unicode library'),
t('Upload progress'),
t('Web server'),
);
$result['items'] = array();
foreach ($requirements as $key => $values) {
if (in_array($values['title'], $server_values, TRUE) !== $domain) {
$result['items'][] = $requirements[$key];
}
}
if ($domain) {
//include more details in the result array for domains
// e.g. info from the settings.php
}
return drd_server_result('info', $result, $domain);
}