function drd_server_domain_list_updates in Drupal Remote Dashboard Server 6.2
Same name and namespace in other branches
- 6 drd_server.domain.inc \drd_server_domain_list_updates()
- 7.2 drd_server.domain.inc \drd_server_domain_list_updates()
- 7 drd_server.domain.inc \drd_server_domain_list_updates()
DRD Server Action to determine all available updates for the current domain.
Parameters
string $mode:
Return value
string
1 string reference to 'drd_server_domain_list_updates'
- drd_server_drd_server_actions in ./
drd_server.module - Implements hook_drd_server_actions().
File
- ./
drd_server.domain.inc, line 98
Code
function drd_server_domain_list_updates($mode = 'domain') {
if (!module_exists('update')) {
drupal_set_message(t('Update module not installed.'));
return drd_server_result('list.updates', '');
}
update_refresh();
module_load_include('inc', 'update', 'update.report');
$result['cache']['update'][$mode] = array(
'title' => 'Available Updates',
'callback' => 'drupal_render',
'arguments' => array(
'data' => array(
'#markup' => update_status(),
),
),
);
$result['projects'] = array();
$prj_cache = _update_cache_get('update_available_releases');
$projects = update_project_cache('update_project_data');
foreach ($prj_cache->data as $name => $project) {
$result['projects'][$name] = array_merge($project, $projects[$name]);
}
return drd_server_result('list.updates', $result);
}