public static function onLogLine($logType, $logaction, $title, $paramArray, &$comment, &$revert, $logTimestamp) { global $wgUser, $wgCityId; if (strpos($logaction, 'chatban') === 0) { $user = User::newFromId($paramArray[1]); if (!empty($user) && Chat::getBanInformation($wgCityId, $user) !== false && $wgUser->isAllowed('chatmoderator')) { $revert = "(" . "<a class='chat-change-ban' data-user-id='{$paramArray[1]}' href='#'>" . wfMsg('chat-ban-log-change-ban-link') . "</a>" . ")"; } } elseif ($logaction === 'chatconnect' && !empty($paramArray)) { $ipLinks = array(); if ($wgUser->isAllowed('multilookup')) { $mlTitle = GlobalTitle::newFromText('MultiLookup', NS_SPECIAL, 177); // Need to make the link manually for this as Linker's normaliseSpecialPage // makes the link local if the special page exists locally, rather than // keeping the global title $ipLinks[] = Xml::tags('a', array('href' => $mlTitle->getFullURL('target=' . urlencode($paramArray[0]))), wfMessage('multilookup')->escaped()); $ipLinks[] = Linker::makeKnownLinkObj(GlobalTitle::newFromText('Phalanx', NS_SPECIAL, 177), wfMessage('phalanx')->escaped(), wfArrayToCGI(array('type' => '8', 'target' => $paramArray[0], 'wpPhalanxCheckBlocker' => $paramArray[0]))); $ipLinks[] = Linker::blockLink(0, $paramArray[0]); $revert = '(' . implode(wfMessage('pipe-separator')->plain(), $ipLinks) . ')'; } } return true; }
public function blockLink($userId, $userText) { return Linker::blockLink($userId, $userText); }