From 04ef1ba8eee7a9e2a565d7b4b747ef607665d562 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Tue, 23 Dec 2008 14:33:23 -0500 Subject: 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 --- _darcs/pristine/actions/profilesettings.php | 30 +++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to '_darcs/pristine/actions/profilesettings.php') diff --git a/_darcs/pristine/actions/profilesettings.php b/_darcs/pristine/actions/profilesettings.php index 0fa1288dc..7f7ee17a5 100644 --- a/_darcs/pristine/actions/profilesettings.php +++ b/_darcs/pristine/actions/profilesettings.php @@ -23,12 +23,14 @@ require_once(INSTALLDIR.'/lib/settingsaction.php'); class ProfilesettingsAction extends SettingsAction { - function get_instructions() { + function get_instructions() + { return _('You can update your personal profile info here '. 'so people know more about you.'); } - function show_form($msg=null, $success=false) { + function show_form($msg=null, $success=false) + { $this->form_header(_('Profile settings'), $msg, $success); $this->show_settings_form(); common_element('h2', null, _('Avatar')); @@ -40,7 +42,8 @@ class ProfilesettingsAction extends SettingsAction { common_show_footer(); } - function handle_post() { + function handle_post() + { # CSRF protection @@ -60,7 +63,8 @@ class ProfilesettingsAction extends SettingsAction { } - function show_settings_form() { + function show_settings_form() + { $user = common_current_user(); $profile = $user->getProfile(); @@ -110,7 +114,8 @@ class ProfilesettingsAction extends SettingsAction { } - function show_avatar_form() { + function show_avatar_form() + { $user = common_current_user(); $profile = $user->getProfile(); @@ -168,7 +173,8 @@ class ProfilesettingsAction extends SettingsAction { } - function show_password_form() { + function show_password_form() + { $user = common_current_user(); common_element_start('form', array('method' => 'POST', @@ -190,7 +196,8 @@ class ProfilesettingsAction extends SettingsAction { common_element_end('form'); } - function save_profile() { + function save_profile() + { $nickname = $this->trimmed('nickname'); $fullname = $this->trimmed('fullname'); $homepage = $this->trimmed('homepage'); @@ -337,7 +344,8 @@ class ProfilesettingsAction extends SettingsAction { } - function upload_avatar() { + function upload_avatar() + { switch ($_FILES['avatarfile']['error']) { case UPLOAD_ERR_OK: # success, jump out break; @@ -384,7 +392,8 @@ class ProfilesettingsAction extends SettingsAction { @unlink($_FILES['avatarfile']['tmp_name']); } - function nickname_exists($nickname) { + function nickname_exists($nickname) + { $user = common_current_user(); $other = User::staticGet('nickname', $nickname); if (!$other) { @@ -394,7 +403,8 @@ class ProfilesettingsAction extends SettingsAction { } } - function change_password() { + function change_password() + { $user = common_current_user(); assert(!is_null($user)); # should already be checked -- cgit v1.2.3-54-g00ecf