function drd_server_domain_run_update in Drupal Remote Dashboard Server 7
Same name and namespace in other branches
- 6.2 drd_server.domain.inc \drd_server_domain_run_update()
- 6 drd_server.domain.inc \drd_server_domain_run_update()
- 7.2 drd_server.domain.inc \drd_server_domain_run_update()
1 string reference to 'drd_server_domain_run_update'
- drd_server_xmlrpc in ./
drd_server.module - Implementation of hook_xmlrpc().
File
- ./
drd_server.domain.inc, line 103
Code
function drd_server_domain_run_update($sid) {
global $user;
if ($sid === TRUE) {
// The function got called from a local module and we are already authenticated
}
else {
$user = drd_server_load_user($sid);
if (is_string($user)) {
return drd_server_error($user);
}
}
$old_user = $user;
$user = user_load(1);
variable_set('maintenance_mode', TRUE);
$batch = array(
'operations' => array(
array(
'drd_server_domain_find_required_updates',
array(),
),
),
);
batch_set($batch);
$batch =& batch_get();
$batch['progressive'] = FALSE;
$base_url = DRUPAL_ROOT;
$_GET['token'] = drupal_get_token('update');
$_REQUEST['op'] = 'Apply pending updates';
$_POST['start'] = array();
include_once './update.php';
variable_set('maintenance_mode', FALSE);
drupal_set_message('Update completed');
$result = theme('status_messages');
$user = $old_user;
return drd_server_result('run.update', $result);
}