summaryrefslogtreecommitdiff
path: root/actions/updateprofile.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-12 11:56:23 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-03-12 11:56:23 -0400
commitb3a0eea3b66e95becb6c4595ed71c7fe71ed6437 (patch)
tree76666150701f03205bfff77e7d034dfa724f8764 /actions/updateprofile.php
parent399669b1fb955d2d8c18098a7b551184d534a94c (diff)
parente185c0395a6cd250ccd7c8e385c54830be73f937 (diff)
Merge branch '0.7.x' into 0.8.x
Conflicts: classes/Notice.php lib/action.php lib/router.php lib/twitter.php
Diffstat (limited to 'actions/updateprofile.php')
-rw-r--r--actions/updateprofile.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/actions/updateprofile.php b/actions/updateprofile.php
index 4751a04ff..7dc52fda9 100644
--- a/actions/updateprofile.php
+++ b/actions/updateprofile.php
@@ -34,6 +34,8 @@ class UpdateprofileAction extends Action
$server = omb_oauth_server();
list($consumer, $token) = $server->verify_request($req);
if ($this->update_profile($req, $consumer, $token)) {
+ header('HTTP/1.1 200 OK');
+ header('Content-type: text/plain');
print "omb_version=".OMB_VERSION_01;
}
} catch (OAuthException $e) {
@@ -136,22 +138,24 @@ class UpdateprofileAction extends Action
$orig_profile = clone($profile);
- if ($nickname) {
+ /* Use values even if they are an empty string. Parsing an empty string in
+ updateProfile is the specified way of clearing a parameter in OMB. */
+ if (!is_null($nickname)) {
$profile->nickname = $nickname;
}
- if ($profile_url) {
+ if (!is_null($profile_url)) {
$profile->profileurl = $profile_url;
}
- if ($fullname) {
+ if (!is_null($fullname)) {
$profile->fullname = $fullname;
}
- if ($homepage) {
+ if (!is_null($homepage)) {
$profile->homepage = $homepage;
}
- if ($bio) {
+ if (!is_null($bio)) {
$profile->bio = $bio;
}
- if ($location) {
+ if (!is_null($location)) {
$profile->location = $location;
}
@@ -173,10 +177,6 @@ class UpdateprofileAction extends Action
return false;
}
}
- header('HTTP/1.1 200 OK');
- header('Content-type: text/plain');
- print 'Updated profile';
- print "\n";
return true;
}
}