/** * Main execution point * * @param null|string $code Confirmation code passed to the page */ function execute( $code ) { $this->setHeaders(); $this->checkReadOnly(); $this->checkPermissions(); // This could also let someone check the current email address, so // require both permissions. if ( !$this->getUser()->isAllowed( 'viewmyprivateinfo' ) ) { throw new PermissionsError( 'viewmyprivateinfo' ); } if ( $code === null || $code === '' ) { if ( $this->getUser()->isLoggedIn() ) { if ( Sanitizer::validateEmail( $this->getUser()->getEmail() ) ) { $this->showRequestForm(); } else { $this->getOutput()->addWikiMsg( 'confirmemail_noemail' ); } } else { $llink = Linker::linkKnown( SpecialPage::getTitleFor( 'Userlogin' ), $this->msg( 'loginreqlink' )->escaped(), array(), array( 'returnto' => $this->getTitle()->getPrefixedText() ) ); $this->getOutput()->addHTML( $this->msg( 'confirmemail_needlogin' )->rawParams( $llink )->parse() ); } } else { $this->attemptConfirm( $code ); } }
public function getMessageParameters() { $params = parent::getMessageParameters(); $type = $this->entry->getSubtype(); $entry_params = $this->entry->getParameters(); if ($type === 'approve') { $revid = $entry_params['revid']; $link = Linker::linkKnown($this->entry->getTarget(), wfMessage('moderation-log-diff', $revid)->text(), array('title' => wfMessage('tooltip-moderation-approved-diff')), array('diff' => $revid)); $params[4] = Message::rawParam($link); } elseif ($type === 'reject') { $modid = $entry_params['modid']; $link = Linker::linkKnown(Title::makeTitle(NS_SPECIAL, "Moderation"), wfMessage('moderation-log-change', $modid)->text(), array('title' => wfMessage('tooltip-moderation-rejected-change')), array('modaction' => 'show', 'modid' => $modid)); $params[4] = Message::rawParam($link); $userlink = Linker::userLink($entry_params['user'], $entry_params['user_text']); $params[5] = Message::rawParam($userlink); } elseif ($type === 'merge') { $revid = $entry_params['revid']; $modid = $entry_params['modid']; $link = Linker::linkKnown(Title::makeTitle(NS_SPECIAL, "Moderation"), wfMessage('moderation-log-change', $modid)->text(), array('title' => wfMessage('tooltip-moderation-rejected-change')), array('modaction' => 'show', 'modid' => $modid)); $params[4] = Message::rawParam($link); $link = Linker::linkKnown($this->entry->getTarget(), wfMessage('moderation-log-diff', $revid)->text(), array('title' => wfMessage('tooltip-moderation-approved-diff')), array('diff' => $revid)); $params[5] = Message::rawParam($link); } elseif ($type === 'approveall' || $type === 'rejectall' || $type === 'block' || $type === 'unblock') { $title = $this->entry->getTarget(); $user_id = User::idFromName($title->getText()); $link = Linker::userLink($user_id, $title->getText()); $params[2] = Message::rawParam($link); } return $params; }
public function getActionLinks() { if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden || $this->entry->getSubtype() !== 'move' || !$this->context->getUser()->isAllowed( 'move' ) ) { return ''; } $params = $this->extractParameters(); $destTitle = Title::newFromText( $params[3] ); if ( !$destTitle ) { return ''; } $revert = Linker::linkKnown( SpecialPage::getTitleFor( 'Movepage' ), $this->msg( 'revertmove' )->escaped(), array(), array( 'wpOldTitle' => $destTitle->getPrefixedDBkey(), 'wpNewTitle' => $this->entry->getTarget()->getPrefixedDBkey(), 'wpReason' => $this->msg( 'revertmove' )->inContentLanguage()->text(), 'wpMovetalk' => 0 ) ); return $this->msg( 'parentheses' )->rawParams( $revert )->escaped(); }
public function execute($par) { global $wgEnableJavaScriptTest; $out = $this->getOutput(); $this->setHeaders(); $out->disallowUserJs(); // Abort early if we're disabled if ($wgEnableJavaScriptTest !== true) { $out->addWikiMsg('javascripttest-disabled'); return; } $out->addModules('mediawiki.special.javaScriptTest'); // Determine framework $pars = explode('/', $par); $framework = strtolower($pars[0]); // No framework specified if ($par == '') { $out->setPagetitle(wfMsgHtml('javascripttest')); $summary = $this->wrapSummaryHtml(wfMsgHtml('javascripttest-pagetext-noframework') . $this->getFrameworkListHtml(), 'noframework'); $out->addHtml($summary); // Matched! Display proper title and initialize the framework } elseif (isset(self::$frameworks[$framework])) { $out->setPagetitle(wfMsgHtml('javascripttest-title', wfMsgHtml("javascripttest-{$framework}-name"))); $out->setSubtitle(wfMessage('javascripttest-backlink')->rawParams(Linker::linkKnown($this->getTitle()))->escaped()); $this->{self::$frameworks[$framework]}(); // Framework not found, display error } else { $out->setPagetitle(wfMsgHtml('javascripttest')); $summary = $this->wrapSummaryHtml('<p class="error">' . wfMsgHtml('javascripttest-pagetext-unknownframework', $par) . '</p>' . $this->getFrameworkListHtml(), 'unknownframework'); $out->addHtml($summary); } }
public function execute($par) { $out = $this->getOutput(); $this->setHeaders(); $out->disallowUserJs(); $out->addModules('mediawiki.special.javaScriptTest'); // Determine framework $pars = explode('/', $par); $framework = strtolower($pars[0]); // No framework specified if ($par == '') { $out->setPageTitle($this->msg('javascripttest')); $summary = $this->wrapSummaryHtml($this->msg('javascripttest-pagetext-noframework')->escaped() . $this->getFrameworkListHtml(), 'noframework'); $out->addHtml($summary); } elseif (isset(self::$frameworks[$framework])) { // Matched! Display proper title and initialize the framework $out->setPageTitle($this->msg('javascripttest-title', $this->msg("javascripttest-{$framework}-name")->plain())); $out->setSubtitle($this->msg('javascripttest-backlink')->rawParams(Linker::linkKnown($this->getPageTitle()))); $this->{self::$frameworks[$framework]}(); } else { // Framework not found, display error $out->setPageTitle($this->msg('javascripttest')); $summary = $this->wrapSummaryHtml('<p class="error">' . $this->msg('javascripttest-pagetext-unknownframework', $par)->escaped() . '</p>' . $this->getFrameworkListHtml(), 'unknownframework'); $out->addHtml($summary); } }
/** * Returns HTML of license link or empty string * For example: * "<a title="Wikipedia:Copyright" href="/index.php/Wikipedia:Copyright">CC BY</a>" * * @param string $context The context in which the license link appears, e.g. footer, * editor, talk, or upload. * @param array $attribs An associative array of extra HTML attributes to add to the link * @return string */ public static function getLicense($context, $attribs = array()) { $config = MobileContext::singleton()->getConfig(); $rightsPage = $config->get('RightsPage'); $rightsUrl = $config->get('RightsUrl'); $rightsText = $config->get('RightsText'); // Construct the link to the licensing terms if ($rightsText) { // Use shorter text for some common licensing strings. See Installer.i18n.php // for the currently offered strings. Unfortunately, there is no good way to // comprehensively support localized licensing strings since the license (as // stored in LocalSettings.php) is just freeform text, not an i18n key. $commonLicenses = array('Creative Commons Attribution-Share Alike 3.0' => 'CC BY-SA 3.0', 'Creative Commons Attribution Share Alike' => 'CC BY-SA', 'Creative Commons Attribution 3.0' => 'CC BY 3.0', 'Creative Commons Attribution 2.5' => 'CC BY 2.5', 'Creative Commons Attribution' => 'CC BY', 'Creative Commons Attribution Non-Commercial Share Alike' => 'CC BY-NC-SA', 'Creative Commons Zero (Public Domain)' => 'CC0 (Public Domain)', 'GNU Free Documentation License 1.3 or later' => 'GFDL 1.3 or later'); if (isset($commonLicenses[$rightsText])) { $rightsText = $commonLicenses[$rightsText]; } if ($rightsPage) { $title = Title::newFromText($rightsPage); $link = Linker::linkKnown($title, $rightsText, $attribs); } elseif ($rightsUrl) { $link = Linker::makeExternalLink($rightsUrl, $rightsText, true, '', $attribs); } else { $link = $rightsText; } } else { $link = ''; } // Allow other extensions (for example, WikimediaMessages) to override $msg = 'mobile-frontend-copyright'; Hooks::run('MobileLicenseLink', array(&$link, $context, $attribs, &$msg)); return array('msg' => $msg, 'link' => $link, 'plural' => self::getPluralLicenseInfo($link)); }
/** * (non-PHPdoc) * @see EPPager::getFormattedValue() */ protected function getFormattedValue($name, $value) { switch ($name) { case 'id': $value = Linker::linkKnown(SpecialPage::getTitleFor('Student', $value), htmlspecialchars($this->getLanguage()->formatNum($value, true))); break; case 'user_id': $user = User::newFromId($value); $name = $user->getRealName() === '' ? $user->getName() : $user->getRealName(); $value = Linker::userLink($value, $name) . Linker::userToolLinks($value, $name); break; case 'first_enroll': case 'last_active': $value = htmlspecialchars($this->getLanguage()->date($value)); break; case 'active_enroll': $value = wfMsgHtml($value === '1' ? 'epstudentpager-yes' : 'epstudentpager-no'); break; case '_courses_current': $value = $this->getLanguage()->pipeList(array_map(function (EPCourse $course) { return $course->getLink(); }, $this->currentObject->getCoursesWithState('current', 'name'))); break; } return $value; }
public function formatRow($row) { $title = Title::newFromRow($row); # Link to page $link = Linker::link($title); # Link to page configuration $config = Linker::linkKnown(SpecialPage::getTitleFor('Stabilization'), wfMsgHtml('configuredpages-config'), array(), 'page=' . $title->getPrefixedUrl()); # Show which version is the default (stable or draft) if (intval($row->fpc_override)) { $default = wfMsgHtml('configuredpages-def-stable'); } else { $default = wfMsgHtml('configuredpages-def-draft'); } # Autoreview/review restriction level $restr = ''; if ($row->fpc_level != '') { $restr = 'autoreview=' . htmlspecialchars($row->fpc_level); $restr = "[{$restr}]"; } # When these configuration settings expire if ($row->fpc_expiry != 'infinity' && strlen($row->fpc_expiry)) { $expiry_description = " (" . wfMsgForContent('protect-expiring', $this->getLang()->timeanddate($row->fpc_expiry), $this->getLang()->date($row->fpc_expiry), $this->getLang()->time($row->fpc_expiry)) . ")"; } else { $expiry_description = ""; } return "<li>{$link} ({$config}) <b>[{$default}]</b> " . "{$restr}<i>{$expiry_description}</i></li>"; }
/** * @param Skin $skin * @param object $result Result row * @return string */ function formatResult($skin, $result) { $title = Title::makeTitle(NS_TEMPLATE, $result->title); $pageLink = Linker::linkKnown($title, null, array(), array('redirect' => 'no')); $wlhLink = Linker::linkKnown(SpecialPage::getTitleFor('Whatlinkshere', $title->getPrefixedText()), $this->msg('unusedtemplateswlh')->escaped()); return $this->getLanguage()->specialList($pageLink, $wlhLink); }
public static function getLinkFor($identifierValue, $action = 'view', $html = null, $customAttribs = array(), $query = array()) { if ($action !== 'view') { $query['action'] = $action; } return Linker::linkKnown(self::getTitleFor($identifierValue, $action), is_null($html) ? htmlspecialchars($identifierValue) : $html, $customAttribs, $query); }
/** * @param string $name * @return array */ protected function getCentralAuthLink($name) { if ($this->plaintext) { return Title::newFromText('CentralAuth/' . $name, NS_SPECIAL); } else { return Linker::linkKnown(SpecialPage::getTitleFor('CentralAuth', $name), htmlspecialchars($name)); } }
function formatResult($skin, $result) { global $wgContLang; $d = $this->getLanguage()->userTimeAndDate($result->value, $this->getUser()); $title = Title::makeTitle($result->namespace, $result->title); $link = Linker::linkKnown($title, htmlspecialchars($wgContLang->convert($title->getPrefixedText()))); return $this->getLanguage()->specialList($link, htmlspecialchars($d)); }
/** * Add a link to Special:LookupUser from Special:Contributions/USERNAME * if the user has 'lookupuser' permission * @return true */ function efLoadLookupUserLink($id, $nt, &$links) { global $wgUser; if ($wgUser->isAllowed('lookupuser')) { $links[] = Linker::linkKnown(SpecialPage::getTitleFor('LookupUser'), wfMsgHtml('lookupuser'), array(), array('target' => $nt->getText())); } return true; }
/** * @param $skin Skin * @param $result * @return string */ function formatResult($skin, $result) { global $wgContLang; $title = Title::makeTitle($result->namespace, $result->title); $link = Linker::linkKnown($title, htmlspecialchars($wgContLang->convert($title->getPrefixedText()))); $nv = $this->msg('nviews')->numParams($result->value)->escaped(); return $this->getLanguage()->specialList($link, $nv); }
public function getActionLinks() { if ($this->entry->isDeleted(LogPage::DELETED_ACTION) || $this->entry->getSubtype() !== 'change' || !$this->context->getUser()->isAllowed('editcontentmodel')) { return ''; } $params = $this->extractParameters(); $revert = Linker::linkKnown(SpecialPage::getTitleFor('ChangeContentModel'), $this->msg('logentry-contentmodel-change-revertlink')->escaped(), array(), array('pagetitle' => $this->entry->getTarget()->getPrefixedText(), 'model' => $params[3], 'reason' => $this->msg('logentry-contentmodel-change-revert')->inContentLanguage()->text())); return $this->msg('parentheses')->rawParams($revert)->escaped(); }
protected function checkCanExecute(User $user) { // Must be logged in if ($user->isAnon()) { $loginreqlink = Linker::linkKnown(SpecialPage::getTitleFor('Userlogin'), $this->msg('loginreqlink')->escaped(), array(), array('returnto' => $this->getPageTitle(), 'returntoquery' => 'action=' . $this->getName())); $reasonMsg = $this->msg('watchlistanontext')->rawParams($loginreqlink); throw new UserNotLoggedIn($reasonMsg, 'watchnologin'); } return parent::checkCanExecute($user); }
/** * Gets the summary data. * * @since 0.1 * * @param EPMentor $mentor * * @return array */ protected function getSummaryData(EPDBObject $mentor) { $stats = array(); $orgs = array(); foreach ($mentor->getOrgs('name') as $org) { $orgs[] = Linker::linkKnown(SpecialPage::getTitleFor('Institution', $org->getField('name')), htmlspecialchars($org->getField('name'))); } $stats['orgs'] = $this->getLanguage()->pipeList($orgs); return $stats; }
public function getActionLinks() { if ($this->entry->isDeleted(LogPage::DELETED_ACTION) || !$this->context->getUser()->isAllowed('mergehistory')) { return ''; } // Show unmerge link $params = $this->extractParameters(); $revert = Linker::linkKnown(SpecialPage::getTitleFor('MergeHistory'), $this->msg('revertmerge')->escaped(), array(), array('target' => $params[3], 'dest' => $this->entry->getTarget()->getPrefixedDBkey(), 'mergepoint' => $params[4], 'submitted' => 1)); return $this->msg('parentheses')->rawParams($revert)->escaped(); }
public function getActionLinks() { $params = $this->getMessageParameters(); if (!isset($params[3])) { return ''; } $oldid = $params[3]; $diffLink = Linker::linkKnown($this->entry->getTarget(), $this->msg('diff')->escaped(), array(), array('oldid' => $oldid, 'diff' => 'prev')); return $this->msg('parentheses')->rawParams($diffLink)->escaped(); }
/** * @param $skin Skin * @param $result * @return string */ function formatResult($skin, $result) { global $wgContLang; $nt = Title::makeTitle($result->namespace, $result->title); $text = $wgContLang->convert($nt->getPrefixedText()); $plink = Linker::linkKnown($nt, htmlspecialchars($text)); $token = WatchAction::getWatchToken($nt, $this->getUser()); $wlink = Linker::linkKnown($nt, wfMsgHtml('watch'), array(), array('action' => 'watch', 'token' => $token)); return $this->getLanguage()->specialList($plink, $wlink); }
/** * Format the result as a simple link to the page * * @param $skin Skin * @param $row Object: result row * @return string */ public function formatResult($skin, $row) { global $wgContLang; $title = Title::makeTitleSafe($row->namespace, $row->title); $text = $row->title; if ($title instanceof Title) { $text = $wgContLang->convert($title->getPrefixedText()); } return Linker::linkKnown($title, htmlspecialchars($text)); }
protected function getMessageParameters() { $params = parent::getMessageParameters(); $subtype = $this->entry->getSubtype(); if ($subtype === 'requestwiki') { $params[6] = str_replace('#', '', $params[6]); $params[6] = Message::rawParam(Linker::linkKnown(Title::newFromText(SpecialPage::getTitleFor('RequestWikiQueue') . '/' . $params[6]), '#' . $params[6])); return $params; } }
/** * @param $skin Skin * @param $result * @return string */ function formatResult($skin, $result) { global $wgContLang; $title = Title::makeTitleSafe($result->namespace, $result->title); if (!$title) { return Html::element('span', array('class' => 'mw-invalidtitle'), Linker::getInvalidTitleDescription($this->getContext(), $result->namespace, $result->title)); } $link = Linker::linkKnown($title, htmlspecialchars($wgContLang->convert($title->getPrefixedText()))); $nv = $this->msg('nviews')->numParams($result->value)->escaped(); return $this->getLanguage()->specialList($link, $nv); }
/** * Format the result as a simple link to the page * * @param Skin $skin * @param object $row Result row * @return string */ public function formatResult($skin, $row) { global $wgContLang; $title = Title::makeTitleSafe($row->namespace, $row->title); if ($title instanceof Title) { $text = $wgContLang->convert($title->getPrefixedText()); return Linker::linkKnown($title, htmlspecialchars($text)); } else { return Html::element('span', array('class' => 'mw-invalidtitle'), Linker::getInvalidTitleDescription($this->getContext(), $row->namespace, $row->title)); } }
/** * @param Skin $skin * @param object $result Result row * @return string */ function formatResult($skin, $result) { global $wgContLang; $nt = Title::makeTitleSafe($result->namespace, $result->title); if (!$nt) { return Html::element('span', array('class' => 'mw-invalidtitle'), Linker::getInvalidTitleDescription($this->getContext(), $result->namespace, $result->title)); } $text = $wgContLang->convert($nt->getPrefixedText()); $plink = Linker::linkKnown($nt, htmlspecialchars($text)); $wlink = Linker::linkKnown($nt, $this->msg('watch')->escaped(), array('class' => 'mw-watch-link'), array('action' => 'watch')); return $this->getLanguage()->specialList($plink, $wlink); }
function formatResult($skin, $result) { $dm = $this->getLanguage()->getDirMark(); $title = Title::makeTitle($result->namespace, $result->title); if (!$title) { return '<!-- Invalid title ' . htmlspecialchars("{$result->namespace}:{$result->title}") . '-->'; } $hlink = Linker::linkKnown($title, wfMsgHtml('hist'), array(), array('action' => 'history')); $plink = $this->isCached() ? Linker::link($title) : Linker::linkKnown($title); $size = $this->msg('nbytes')->numParams($result->value)->escaped(); return $title->exists() ? "({$hlink}) {$dm}{$plink} {$dm}[{$size}]" : "<del>({$hlink}) {$dm}{$plink} {$dm}[{$size}]</del>"; }
public function execute($par) { $out = $this->getOutput(); $this->setHeaders(); $out->disallowUserJs(); if ($par === null) { // No framework specified // If only one framework is configured, redirect to it. Otherwise display a list. if (count(self::$frameworks) === 1) { $out->redirect($this->getPageTitle(self::$frameworks[0] . '/plain')->getLocalURL()); return; } $out->setStatusCode(404); $out->setPageTitle($this->msg('javascripttest')); $out->addHTML($this->msg('javascripttest-pagetext-noframework')->parseAsBlock() . $this->getFrameworkListHtml()); return; } // Determine framework and mode $pars = explode('/', $par, 2); $framework = $pars[0]; if (!in_array($framework, self::$frameworks)) { // Framework not found $out->setStatusCode(404); $out->addHTML('<div class="error">' . $this->msg('javascripttest-pagetext-unknownframework')->plaintextParams($par)->parseAsBlock() . '</div>' . $this->getFrameworkListHtml()); return; } // This special page is disabled by default ($wgEnableJavaScriptTest), and contains // no sensitive data. In order to allow TestSwarm to embed it into a test client window, // we need to allow iframing of this page. $out->allowClickjacking(); if (count(self::$frameworks) !== 1) { // If there's only one framework, don't set the subtitle since it // is going to redirect back to this page $out->setSubtitle($this->msg('javascripttest-backlink')->rawParams(Linker::linkKnown($this->getPageTitle()))); } // Custom actions if (isset($pars[1])) { $action = $pars[1]; if (!in_array($action, array('export', 'plain'))) { $out->setStatusCode(404); $out->addHTML('<div class="error">' . $this->msg('javascripttest-pagetext-unknownaction')->plaintextParams($action)->parseAsBlock() . '</div>'); return; } $method = $action . ucfirst($framework); $this->{$method}(); return; } $out->addModules('mediawiki.special.javaScriptTest'); $method = 'view' . ucfirst($framework); $this->{$method}(); $out->setPageTitle($this->msg('javascripttest-title', $this->msg("javascripttest-{$framework}-name")->plain())); }
/** * Show the special page * @param string|null $par */ public function execute($par) { $this->setHeaders(); $this->outputHeader(); $out = $this->getOutput(); $out->addModuleStyles('mediawiki.special'); $out->wrapWikiMsg("<div class=\"mw-listgrouprights-key\">\n\$1\n</div>", 'listgrouprights-key'); $out->addHTML(Xml::openElement('table', ['class' => 'wikitable mw-listgrouprights-table']) . '<tr>' . Xml::element('th', null, $this->msg('listgrouprights-group')->text()) . Xml::element('th', null, $this->msg('listgrouprights-rights')->text()) . '</tr>'); $config = $this->getConfig(); $groupPermissions = $config->get('GroupPermissions'); $revokePermissions = $config->get('RevokePermissions'); $addGroups = $config->get('AddGroups'); $removeGroups = $config->get('RemoveGroups'); $groupsAddToSelf = $config->get('GroupsAddToSelf'); $groupsRemoveFromSelf = $config->get('GroupsRemoveFromSelf'); $allGroups = array_unique(array_merge(array_keys($groupPermissions), array_keys($revokePermissions), array_keys($addGroups), array_keys($removeGroups), array_keys($groupsAddToSelf), array_keys($groupsRemoveFromSelf))); asort($allGroups); foreach ($allGroups as $group) { $permissions = isset($groupPermissions[$group]) ? $groupPermissions[$group] : []; $groupname = $group == '*' ? 'all' : $group; $msg = $this->msg('group-' . $groupname); $groupnameLocalized = !$msg->isBlank() ? $msg->text() : $groupname; $msg = $this->msg('grouppage-' . $groupname)->inContentLanguage(); $grouppageLocalized = !$msg->isBlank() ? $msg->text() : MWNamespace::getCanonicalName(NS_PROJECT) . ':' . $groupname; $grouppageLocalizedTitle = Title::newFromText($grouppageLocalized); if ($group == '*' || !$grouppageLocalizedTitle) { // Do not make a link for the generic * group or group with invalid group page $grouppage = htmlspecialchars($groupnameLocalized); } else { $grouppage = Linker::link($grouppageLocalizedTitle, htmlspecialchars($groupnameLocalized)); } if ($group === 'user') { // Link to Special:listusers for implicit group 'user' $grouplink = '<br />' . Linker::linkKnown(SpecialPage::getTitleFor('Listusers'), $this->msg('listgrouprights-members')->escaped()); } elseif (!in_array($group, $config->get('ImplicitGroups'))) { $grouplink = '<br />' . Linker::linkKnown(SpecialPage::getTitleFor('Listusers'), $this->msg('listgrouprights-members')->escaped(), [], ['group' => $group]); } else { // No link to Special:listusers for other implicit groups as they are unlistable $grouplink = ''; } $revoke = isset($revokePermissions[$group]) ? $revokePermissions[$group] : []; $addgroups = isset($addGroups[$group]) ? $addGroups[$group] : []; $removegroups = isset($removeGroups[$group]) ? $removeGroups[$group] : []; $addgroupsSelf = isset($groupsAddToSelf[$group]) ? $groupsAddToSelf[$group] : []; $removegroupsSelf = isset($groupsRemoveFromSelf[$group]) ? $groupsRemoveFromSelf[$group] : []; $id = $group == '*' ? false : Sanitizer::escapeId($group); $out->addHTML(Html::rawElement('tr', ['id' => $id], "\n\t\t\t\t<td>{$grouppage}{$grouplink}</td>\n\t\t\t\t\t<td>" . $this->formatPermissions($permissions, $revoke, $addgroups, $removegroups, $addgroupsSelf, $removegroupsSelf) . '</td> ')); } $out->addHTML(Xml::closeElement('table')); $this->outputNamespaceProtectionInfo(); }
/** * Show a message that you are viewing a list of users of a certain test wiki * @param $pager * @param $out * @return bool */ static function onSpecialListusersHeader( $pager, &$out ) { $project = self::getProjectInput(); if( $project ) { $out .= wfMsgWikiHtml( 'wminc-listusers-testwiki', '"' . $project['name'] . '"' ); } else { $testwiki = IncubatorTest::getUrlParam(); if ( $testwiki ) { $link = Linker::linkKnown( Title::newFromText( $testwiki['prefix'] ) ); $out .= wfMsgWikiHtml( 'wminc-listusers-testwiki', $link ); } } return true; }
function formatActions() { $userName = $this->mCurrentRow->user_name; $html = '<ul>'; $html .= '<li>' . Linker::link(Title::newFromText($userName, NS_USER_TALK), wfMessage('talk')->text()) . '</li>'; $html .= '<li>' . Linker::linkKnown(SpecialPage::getTitleFor('EmailUser', $userName), wfMessage('emailuser')->text()) . '</li>'; $html .= '<li>' . Linker::linkKnown(SpecialPage::getTitleFor('Contributions', $userName), wfMessage('contributions')->text()) . '</li>'; if ($this->forMember == false) { $html .= '<li><b>' . SpecialWikiplaces::getLinkRemoveMember($this->wpNameDb, $this->mCurrentRow->user_name) . '</b></li>'; } $html .= '</ul>'; return $html; }