From 4026e208c2be6e941270a7540b548ee57908b870 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 19 Jan 2011 15:13:46 -0800 Subject: [PATCH] Add a scary 'experimental feture' warning & are-you-sure prompt on moveuser.php As with deleteuser.php, can pass -y to bypass the prompt if you're sure. --- actions/deleteaccount.php | 2 +- scripts/moveuser.php | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/actions/deleteaccount.php b/actions/deleteaccount.php index dd587d0445..614519d474 100644 --- a/actions/deleteaccount.php +++ b/actions/deleteaccount.php @@ -161,7 +161,7 @@ class DeleteaccountAction extends Action if ($this->trimmed('iamsure') != $iamsure ) { // TRANS: Notification for user about the text that must be input to be able to delete a user account. // TRANS: %s is the text that needs to be input. - $this->_error = sprintf(_('You must write "%s" exactly in the box.', $iamsure)); + $this->_error = sprintf(_('You must write "%s" exactly in the box.'), $iamsure); $this->showPage(); return; } diff --git a/scripts/moveuser.php b/scripts/moveuser.php index cf8fd2e0be..17b3e0fb67 100644 --- a/scripts/moveuser.php +++ b/scripts/moveuser.php @@ -19,7 +19,7 @@ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); -$shortoptions = 'i:n:r:w:'; +$shortoptions = 'i:n:r:w:y'; $longoptions = array('id=', 'nickname=', 'remote=', 'password='); $helptext = <<nickname}' to $remote. Are you sure? [y/N] "; + $response = fgets(STDIN); + if (strtolower(trim($response)) != 'y') { + print "Aborting.\n"; + exit(0); + } + } + $qm = QueueManager::get(); $qm->enqueue(array($user, $remote, $password), 'acctmove');