You are here

function drd_server_domain_switch_maintenance in Drupal Remote Dashboard Server 7

Same name and namespace in other branches
  1. 6.2 drd_server.domain.inc \drd_server_domain_switch_maintenance()
  2. 6 drd_server.domain.inc \drd_server_domain_switch_maintenance()
  3. 7.2 drd_server.domain.inc \drd_server_domain_switch_maintenance()
1 string reference to 'drd_server_domain_switch_maintenance'
drd_server_xmlrpc in ./drd_server.module
Implementation of hook_xmlrpc().

File

./drd_server.domain.inc, line 146

Code

function drd_server_domain_switch_maintenance($sid) {
  global $user;
  $user = drd_server_load_user($sid);
  if (is_string($user)) {
    return drd_server_error($user);
  }
  $current = variable_get('maintenance_mode', FALSE);
  variable_set('maintenance_mode', !$current);
  $result = $current ? 'Turned maintenance mode off' : 'Turned maintenance mode on';
  return drd_server_result('switch.maintenance', '<p>' . $result . '</p>');
}