X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ffacebookhome.php;h=f72f08a3454b9f04ce92d3f13c62cf9800fca309;hb=125f05563b5c7bd5b74b1afbea3c0b663795bff5;hp=4e67494f0498f620835053db4d2beaeec6e55ea6;hpb=689be142158dae5af1516cb38b947f0364d725dd;p=quix0rs-gnu-social.git diff --git a/actions/facebookhome.php b/actions/facebookhome.php index 4e67494f04..f72f08a345 100644 --- a/actions/facebookhome.php +++ b/actions/facebookhome.php @@ -70,6 +70,8 @@ class FacebookhomeAction extends FacebookAction // XXX: Do some error handling here + $this->setDefaults(); + $this->showHome($flink, _('You can now use Identi.ca from Facebook!')); } else { @@ -80,22 +82,33 @@ class FacebookhomeAction extends FacebookAction $this->showLoginForm($msg); } - function showHome($flink, $msg) + function setDefaults() { - $this->show_header('Home'); + $facebook = get_facebook(); - if ($msg) { - common_element('fb:success', array('message' => $msg)); - } + // A default prefix string for notices + $facebook->api_client->data_setUserPreference(1, 'dented: '); + } + + function showHome($flink, $msg) + { $facebook = get_facebook(); $fbuid = $facebook->require_login(); $user = $flink->getUser(); - echo $this->show_notices($user); + $notice = $user->getCurrentNotice(); + update_profile_box($facebook, $fbuid, $user, $notice); + + + $this->show_header('Home'); - $this->update_profile_box($facebook, $fbuid, $user); + if ($msg) { + common_element('fb:success', array('message' => $msg)); + } + + echo $this->show_notices($user); $this->show_footer(); }