diff options
author | Evan Prodromou <evan@prodromou.name> | 2008-12-23 14:33:23 -0500 |
---|---|---|
committer | Evan Prodromou <evan@prodromou.name> | 2008-12-23 14:33:23 -0500 |
commit | 04ef1ba8eee7a9e2a565d7b4b747ef607665d562 (patch) | |
tree | d56ac33bd6bfb8f8641cc9f63b0f6af52b6edfb9 /actions/recoverpassword.php | |
parent | eb2f9c98ac115ce67e9a740b200c832153ffa05c (diff) |
change function headers to K&R style
Another huge change, for PEAR code standards compliance. Function
headers have to be in K&R style (opening brace on its own line),
instead of having the opening brace on the same line as the function
and parameters. So, a little perl magic found all the function
definitions and move the opening brace to the next line (properly
indented... usually).
darcs-hash:20081223193323-84dde-a28e36ecc66672c783c2842d12fc11043c13ab28.gz
Diffstat (limited to 'actions/recoverpassword.php')
-rw-r--r-- | actions/recoverpassword.php | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/actions/recoverpassword.php b/actions/recoverpassword.php index 068d582fa..a482d4711 100644 --- a/actions/recoverpassword.php +++ b/actions/recoverpassword.php @@ -25,7 +25,8 @@ define(MAX_RECOVERY_TIME, 24 * 60 * 60); class RecoverpasswordAction extends Action { - function handle($args) { + function handle($args) + { parent::handle($args); if (common_logged_in()) { $this->client_error(_('You are already logged in!')); @@ -47,7 +48,8 @@ class RecoverpasswordAction extends Action { } } - function check_code() { + function check_code() + { $code = $this->trimmed('code'); $confirm = Confirm_address::staticGet('code', $code); @@ -113,12 +115,14 @@ class RecoverpasswordAction extends Action { $this->show_password_form(); } - function set_temp_user(&$user) { + function set_temp_user(&$user) + { common_ensure_session(); $_SESSION['tempuser'] = $user->id; } - function get_temp_user() { + function get_temp_user() + { common_ensure_session(); $user_id = $_SESSION['tempuser']; if ($user_id) { @@ -127,12 +131,14 @@ class RecoverpasswordAction extends Action { return $user; } - function clear_temp_user() { + function clear_temp_user() + { common_ensure_session(); unset($_SESSION['tempuser']); } - function show_top($msg=null) { + function show_top($msg=null) + { if ($msg) { common_element('div', 'error', $msg); } else { @@ -146,7 +152,8 @@ class RecoverpasswordAction extends Action { } } - function show_password_top($msg=null) { + function show_password_top($msg=null) + { if ($msg) { common_element('div', 'error', $msg); } else { @@ -156,7 +163,8 @@ class RecoverpasswordAction extends Action { } } - function show_form($msg=null) { + function show_form($msg=null) + { common_show_header(_('Recover password'), null, $msg, array($this, 'show_top')); @@ -173,7 +181,8 @@ class RecoverpasswordAction extends Action { common_show_footer(); } - function show_password_form($msg=null) { + function show_password_form($msg=null) + { common_show_header(_('Reset password'), null, $msg, array($this, 'show_password_top')); @@ -191,7 +200,8 @@ class RecoverpasswordAction extends Action { common_show_footer(); } - function recover_password() { + function recover_password() + { $nore = $this->trimmed('nicknameoremail'); if (!$nore) { $this->show_form(_('Enter a nickname or email address.')); @@ -274,7 +284,8 @@ class RecoverpasswordAction extends Action { common_show_footer(); } - function reset_password() { + function reset_password() + { # CSRF protection $token = $this->trimmed('token'); |