Skip to content

Commit

Permalink
Close issue 210. Add more docs to sal-sanitize. Also, unhide it. We a…
Browse files Browse the repository at this point in the history
…greed to do that a while ago but apparently never did finish.
  • Loading branch information
weitzman committed Oct 27, 2013
1 parent 3b5edb8 commit fe6b880
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion commands/sql/sql.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ function sql_drush_help($section) {
return dt('SQL commands');
case 'meta:sql:summary':
return dt('Examine and modify your Drupal database.');
case 'drush:sql-sanitize':
return dt('Run sanitization operations on the current database. You can add more sanitization to this command by implementing hook_drush_sql_sanitize().');
}
}

Expand Down Expand Up @@ -226,7 +228,6 @@ function sql_drush_command() {
$items['sql-sanitize'] = array(
'description' => "Run sanitization operations on the current database.",
'bootstrap' => DRUSH_BOOTSTRAP_DRUSH,
'hidden' => TRUE,
'options' => array(
'sanitize-password' => 'The password to assign to all accounts in the sanitization operation, or "no" to keep passwords unchanged. Default is "password".',
'sanitize-email' => 'The pattern for test email addresses in the sanitization operation, or "no" to keep email addresses unchanged. May contain replacement patterns %uid, %mail or %name. Default is "user+%uid@localhost".',
Expand Down Expand Up @@ -984,6 +985,8 @@ function drush_sql_cli() {

/**
* Command callback. Run's the sanitization operations on the current database.
*
* @see hook_drush_sql_sync_sanitize() for adding custom sanitize routines.
*/
function drush_sql_sanitize() {
if (!drush_confirm(dt('Do you really want to sanitize the current database?'))) {
Expand Down

0 comments on commit fe6b880

Please sign in to comment.