summaryrefslogtreecommitdiff
path: root/actions/profilesettings.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-12-23 14:33:23 -0500
committerEvan Prodromou <evan@prodromou.name>2008-12-23 14:33:23 -0500
commit04ef1ba8eee7a9e2a565d7b4b747ef607665d562 (patch)
treed56ac33bd6bfb8f8641cc9f63b0f6af52b6edfb9 /actions/profilesettings.php
parenteb2f9c98ac115ce67e9a740b200c832153ffa05c (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/profilesettings.php')
-rw-r--r--actions/profilesettings.php30
1 files changed, 20 insertions, 10 deletions
diff --git a/actions/profilesettings.php b/actions/profilesettings.php
index 0fa1288dc..7f7ee17a5 100644
--- a/actions/profilesettings.php
+++ b/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