function trySubmit() { global $wgOut, $wgUser; $options = array(); $skin = $wgUser->getSkin(); if ($this->mAnonOnly) { $options[] = 'anon-only'; } if ($this->mModify) { $options[] = 'modify'; } $reasonstr = $this->mReasonList; if ($reasonstr != 'other' && $this->mReason != '') { // Entry from drop down menu + additional comment $reasonstr .= wfMsgForContent('colon-separator') . $this->mReason; } elseif ($reasonstr == 'other') { $reasonstr = $this->mReason; } $errors = GlobalBlocking::block($this->mAddress, $reasonstr, $this->mExpiry, $options); if (count($errors)) { return $errors; } if ($this->mModify) { $textMessage = 'globalblocking-modify-success'; $subMessage = 'globalblocking-modify-successsub'; } else { $textMessage = 'globalblocking-block-success'; $subMessage = 'globalblocking-block-successsub'; } $wgOut->addWikitext(wfMsg($textMessage, $this->mAddress)); $wgOut->setSubtitle(wfMsg($subMessage)); $link = $skin->link(SpecialPage::getTitleFor('GlobalBlockList'), wfMsg('globalblocking-return')); $wgOut->addHTML($link); return array(); }