Beispiel #1
0
 /**
  * Disconnect from facebook
  */
 private function disconnectReclamationAction()
 {
     global $wgRequest, $wgOut, $wgUser;
     $wgOut->setArticleRelated(false);
     $wgOut->enableClientCache(false);
     $wgOut->mRedirect = '';
     $wgOut->mBodytext = '';
     $wgOut->setRobotPolicy('noindex,nofollow');
     $fb = new FBConnectAPI();
     $user = $fb->verifyAccountReclamation($sRequest);
     if (!($user === false)) {
         $result = FBConnect::coreDisconnectFromFB($user);
     }
     $title = Title::makeTitle(NS_SPECIAL, "Signup");
     $html = Xml::openElement("a", array("href" => $title->getFullUrl()));
     $html .= $title->getPrefixedText();
     $html .= Xml::closeElement("a");
     if (!($user === false) && $result['status'] == "ok") {
         $wgOut->setPageTitle(wfMsg('fbconnect-reclamation-title'));
         $wgOut->setHTMLTitle(wfMsg('fbconnect-reclamation-title'));
         $wgOut->addHTML(wfMsg('fbconnect-reclamation-body', array("\$1" => $html)));
     } else {
         $wgOut->setPageTitle(wfMsg('fbconnect-reclamation-title-error'));
         $wgOut->setHTMLTitle(wfMsg('fbconnect-reclamation-title-error'));
         $wgOut->addHTML(wfMsg('fbconnect-reclamation-body-error', array("\$1" => $html)));
     }
     return true;
 }