You are here

function replication_command_validate in Replication 8.2

Same name and namespace in other branches
  1. 8 replication.drush.inc \replication_command_validate()

Helper function for command validation.

Parameters

$params:

3 calls to replication_command_validate()
drush_replication_active_validate in ./replication.drush.inc
Implements drush_hook_COMMAND_validate().
drush_replication_start_validate in ./replication.drush.inc
Implements drush_hook_COMMAND_validate().
drush_replication_stop_validate in ./replication.drush.inc
Implements drush_hook_COMMAND_validate().

File

./replication.drush.inc, line 220
Drush integration for the replication module.

Code

function replication_command_validate($params) {
  if (replication_get_http_response_code($params['0']) != 200) {
    drush_set_error(dt('Source database not found.'));
  }
  if (replication_get_http_response_code($params['1']) != 200) {
    drush_set_error(dt('Target database not found.'));
  }
}