From: Brion Vibber Date: Wed, 19 Jan 2011 23:13:46 +0000 (-0800) Subject: Add a scary 'experimental feture' warning & are-you-sure prompt on moveuser.php X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4026e208c2be6e941270a7540b548ee57908b870;p=quix0rs-gnu-social.git 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. --- 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');