Also removed some commented out code and one or more unneeded elses.
Change-Id: I8a7f5c683e3aa570522fb31b027b695f195a3970
if ( $par == '' ) {
$out->setPageTitle( $this->msg( 'javascripttest' ) );
$summary = $this->wrapSummaryHtml(
- $this->msg( 'javascripttest-pagetext-noframework' )->escaped() . $this->getFrameworkListHtml(),
+ $this->msg( 'javascripttest-pagetext-noframework' )->escaped() .
+ $this->getFrameworkListHtml(),
'noframework'
);
$out->addHtml( $summary );
-
- // Matched! Display proper title and initialize the framework
} elseif ( isset( self::$frameworks[$framework] ) ) {
- $out->setPageTitle( $this->msg( 'javascripttest-title', $this->msg( "javascripttest-$framework-name" )->plain() ) );
- $out->setSubtitle( $this->msg( 'javascripttest-backlink' )->rawParams( Linker::linkKnown( $this->getTitle() ) ) );
+ // 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->getTitle() ) ) );
$this->{self::$frameworks[$framework]}();
-
- // Framework not found, display error
} 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(),
+ $summary = $this->wrapSummaryHtml(
+ '<p class="error">' .
+ $this->msg( 'javascripttest-pagetext-unknownframework', $par )->escaped() .
+ '</p>' .
+ $this->getFrameworkListHtml(),
'unknownframework'
);
$out->addHtml( $summary );
}
/**
- * Get a list of frameworks (including introduction paragraph and links to the framework run pages)
- * @return String: HTML
+ * Get a list of frameworks (including introduction paragraph and links
+ * to the framework run pages)
+ *
+ * @return string HTML
*/
private function getFrameworkListHtml() {
$list = '<ul>';
$list .= Html::rawElement(
'li',
array(),
- Linker::link( $this->getTitle( $framework ), $this->msg( "javascripttest-$framework-name" )->escaped() )
+ Linker::link(
+ $this->getTitle( $framework ),
+ $this->msg( "javascripttest-$framework-name" )->escaped()
+ )
);
}
$list .= '</ul>';
- $msg = $this->msg( 'javascripttest-pagetext-frameworks' )->rawParams( $list )->parseAsBlock();
- return $msg;
+ return $this->msg( 'javascripttest-pagetext-frameworks' )->rawParams( $list )
+ ->parseAsBlock();
}
/**
*/
private function wrapSummaryHtml( $html, $state ) {
$validStates = array( 'noframework', 'unknownframework', 'frameworkfound' );
+
if ( !in_array( $state, $validStates ) ) {
throw new MWException( __METHOD__
. ' given an invalid state. Must be one of "'
. join( '", "', $validStates ) . '".'
);
}
+
return "<div id=\"mw-javascripttest-summary\" class=\"mw-javascripttest-$state\">$html</div>";
}
// Used in ./tests/qunit/data/testrunner.js, see also documentation of
// $wgJavaScriptTestConfig in DefaultSettings.php
- $out->addJsConfigVars( 'QUnitTestSwarmInjectJSPath', $wgJavaScriptTestConfig['qunit']['testswarm-injectjs'] );
+ $out->addJsConfigVars(
+ 'QUnitTestSwarmInjectJSPath',
+ $wgJavaScriptTestConfig['qunit']['testswarm-injectjs']
+ );
}
protected function getGroupName() {
'<nowiki>' . $this->getLanguage()->commaList( $protocols_list ) . '</nowiki>',
count( $protocols_list )
);
- $s = Html::openElement( 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $wgScript ) ) . "\n" .
+ $s = Html::openElement(
+ 'form',
+ array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $wgScript )
+ ) . "\n" .
Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n" .
Html::openElement( 'fieldset' ) . "\n" .
Html::element( 'legend', array(), $this->msg( 'linksearch' )->text() ) . "\n" .
- Xml::inputLabel( $this->msg( 'linksearch-pat' )->text(), 'target', 'target', 50, $target ) . "\n";
+ Xml::inputLabel(
+ $this->msg( 'linksearch-pat' )->text(),
+ 'target',
+ 'target',
+ 50,
+ $target
+ ) . "\n";
+
if ( !$wgMiserMode ) {
$s .= Html::namespaceSelector(
array(
)
);
}
+
$s .= Xml::submitButton( $this->msg( 'linksearch-ok' )->text() ) . "\n" .
Html::closeElement( 'fieldset' ) . "\n" .
Html::closeElement( 'form' ) . "\n";
$rv = LinkFilter::makeLikeArray( $query, $prot );
if ( $rv === false ) {
// LinkFilter doesn't handle wildcard in IP, so we'll have to munge here.
- if ( preg_match( '/^(:?[0-9]{1,3}\.)+\*\s*$|^(:?[0-9]{1,3}\.){3}[0-9]{1,3}:[0-9]*\*\s*$/', $query ) ) {
+ $pattern = '/^(:?[0-9]{1,3}\.)+\*\s*$|^(:?[0-9]{1,3}\.){3}[0-9]{1,3}:[0-9]*\*\s*$/';
+ if ( preg_match( $pattern, $query ) ) {
$dbr = wfGetDB( DB_SLAVE );
$rv = array( $prot . rtrim( $query, " \t*" ), $dbr->anyString() );
$field = 'el_to';
}
}
+
return array( $rv, $field );
}
if ( isset( $this->mNs ) && !$wgMiserMode ) {
$params['namespace'] = $this->mNs;
}
+
return $params;
}
$dbr = wfGetDB( DB_SLAVE );
// strip everything past first wildcard, so that
// index-based-only lookup would be done
- list( $this->mMungedQuery, $clause ) = self::mungeQuery(
- $this->mQuery, $this->mProt );
+ list( $this->mMungedQuery, $clause ) = self::mungeQuery( $this->mQuery, $this->mProt );
if ( $this->mMungedQuery === false ) {
// Invalid query; return no results
return array( 'tables' => 'page', 'fields' => 'page_id', 'conds' => '0=1' );
$like = $dbr->buildLike( $stripped );
$retval = array(
'tables' => array( 'page', 'externallinks' ),
- 'fields' => array( 'namespace' => 'page_namespace',
- 'title' => 'page_title',
- 'value' => 'el_index', 'url' => 'el_to' ),
- 'conds' => array( 'page_id = el_from',
- "$clause $like" ),
+ 'fields' => array(
+ 'namespace' => 'page_namespace',
+ 'title' => 'page_title',
+ 'value' => 'el_index',
+ 'url' => 'el_to'
+ ),
+ 'conds' => array(
+ 'page_id = el_from',
+ "$clause $like"
+ ),
'options' => array( 'USE INDEX' => $clause )
);
+
if ( isset( $this->mNs ) && !$wgMiserMode ) {
$retval['conds']['page_namespace'] = $this->mNs;
}
+
return $retval;
}
*/
class SpecialListFiles extends IncludableSpecialPage {
-
public function __construct() {
parent::__construct( 'Listfiles' );
}
$search = $this->getRequest()->getText( 'ilsearch', '' );
}
- $pager = new ImageListPager( $this->getContext(), $userName, $search, $this->including() );
+ $pager = new ImageListPager(
+ $this->getContext(),
+ $userName,
+ $search,
+ $this->including()
+ );
if ( $this->including() ) {
$html = $pager->getBody();
var $mSearch = '';
var $mIncluding = false;
- function __construct( IContextSource $context, $userName = null, $search = '', $including = false ) {
+ function __construct( IContextSource $context, $userName = null, $search = '',
+ $including = false
+ ) {
global $wgMiserMode;
$this->mIncluding = $including;
if ( $search != '' && !$wgMiserMode ) {
$this->mSearch = $search;
$nt = Title::newFromURL( $this->mSearch );
+
if ( $nt ) {
$dbr = wfGetDB( DB_SLAVE );
$this->mQueryConds[] = 'LOWER(img_name)' .
$this->mFieldNames['count'] = $this->msg( 'listfiles_count' )->text();
}
}
+
return $this->mFieldNames;
}
# No index for both img_size and img_user_text
return !isset( $this->mQueryConds['img_user_text'] );
}
+
return in_array( $field, $sortable );
}
}
$join_conds = array( 'oldimage' => array( 'LEFT JOIN', 'oi_name = img_name' ) );
}
+
return array(
'tables' => $tables,
'fields' => $fields,
case 'thumb':
$file = wfLocalFile( $value );
$thumb = $file->transform( array( 'width' => 180, 'height' => 360 ) );
+
return $thumb->toHtml( array( 'desc-link' => true ) );
case 'img_timestamp':
- return htmlspecialchars( $this->getLanguage()->userTimeAndDate( $value, $this->getUser() ) );
+ $timeAndDate = $this->getLanguage()->userTimeAndDate( $value, $this->getUser() );
+ return htmlspecialchars( $timeAndDate );
case 'img_name':
static $imgfile = null;
if ( $imgfile === null ) {
// Weird files can maybe exist? Bug 22227
$filePage = Title::makeTitleSafe( NS_FILE, $value );
if ( $filePage ) {
- $link = Linker::linkKnown( $filePage, htmlspecialchars( $filePage->getText() ) );
+ $link = Linker::linkKnown(
+ $filePage,
+ htmlspecialchars( $filePage->getText() )
+ );
$download = Xml::element( 'a',
array( 'href' => wfLocalFile( $filePage )->getURL() ),
$imgfile
);
$download = $this->msg( 'parentheses' )->rawParams( $download )->escaped();
+
return "$link $download";
} else {
return htmlspecialchars( $value );
} else {
$link = htmlspecialchars( $value );
}
+
return $link;
case 'img_size':
return htmlspecialchars( $this->getLanguage()->formatSize( $value ) );
$inputForm = array();
$inputForm['table_pager_limit_label'] = $this->getLimitSelect();
if ( !$wgMiserMode ) {
- $inputForm['listfiles_search_for'] = Html::input( 'ilsearch', $this->mSearch, 'text',
+ $inputForm['listfiles_search_for'] = Html::input(
+ 'ilsearch',
+ $this->mSearch,
+ 'text',
array(
'size' => '40',
'maxlength' => '255',
'id' => 'mw-ilsearch',
- ) );
+ )
+ );
}
$inputForm['username'] = Html::input( 'user', $this->mUserName, 'text', array(
'size' => '40',
'maxlength' => '255',
'id' => 'mw-listfiles-user',
) );
+
return Html::openElement( 'form',
- array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) .
+ array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' )
+ ) .
Xml::fieldset( $this->msg( 'listfiles' )->text() ) .
Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
Xml::buildForm( $inputForm, 'table_pager_limit_submit' ) .
$query['user'] = $this->mUserName;
}
}
+
return $queries;
}
if ( !isset( $queries['user'] ) && !is_null( $this->mUserName ) ) {
$queries['user'] = $this->mUserName;
}
+
return $queries;
}
* @author Petr Kadlec <mormegil@centrum.cz>
*/
class SpecialListGroupRights extends SpecialPage {
-
/**
* Constructor
*/
$out->addHTML(
Xml::openElement( 'table', array( 'class' => 'wikitable mw-listgrouprights-table' ) ) .
'<tr>' .
- Xml::element( 'th', null, $this->msg( 'listgrouprights-group' )->text() ) .
- Xml::element( 'th', null, $this->msg( 'listgrouprights-rights' )->text() ) .
+ Xml::element( 'th', null, $this->msg( 'listgrouprights-group' )->text() ) .
+ Xml::element( 'th', null, $this->msg( 'listgrouprights-rights' )->text() ) .
'</tr>'
);
"
<td>$grouppage$grouplink</td>
<td>" .
- $this->formatPermissions( $permissions, $revoke, $addgroups, $removegroups,
- $addgroupsSelf, $removegroupsSelf ) .
+ $this->formatPermissions( $permissions, $revoke, $addgroups, $removegroups,
+ $addgroupsSelf, $removegroupsSelf ) .
'</td>
'
) );
$r[] = $description;
}
}
+
sort( $r );
+
$lang = $this->getLanguage();
+
if ( $add === true ) {
$r[] = $this->msg( 'listgrouprights-addgroup-all' )->escaped();
} elseif ( is_array( $add ) && count( $add ) ) {
count( $add )
)->parse();
}
+
if ( $remove === true ) {
$r[] = $this->msg( 'listgrouprights-removegroup-all' )->escaped();
} elseif ( is_array( $remove ) && count( $remove ) ) {
count( $remove )
)->parse();
}
+
if ( $addSelf === true ) {
$r[] = $this->msg( 'listgrouprights-addgroup-self-all' )->escaped();
} elseif ( is_array( $addSelf ) && count( $addSelf ) ) {
count( $addSelf )
)->parse();
}
+
if ( $removeSelf === true ) {
$r[] = $this->msg( 'listgrouprights-removegroup-self-all' )->parse();
} elseif ( is_array( $removeSelf ) && count( $removeSelf ) ) {
count( $removeSelf )
)->parse();
}
+
if ( empty( $r ) ) {
return '';
} else {
* @ingroup SpecialPage
*/
class ListredirectsPage extends QueryPage {
-
function __construct( $name = 'Listredirects' ) {
parent::__construct( $name );
}
return array(
'tables' => array( 'p1' => 'page', 'redirect', 'p2' => 'page' ),
'fields' => array( 'namespace' => 'p1.page_namespace',
- 'title' => 'p1.page_title',
- 'value' => 'p1.page_title',
- 'rd_namespace',
- 'rd_title',
- 'rd_fragment',
- 'rd_interwiki',
- 'redirid' => 'p2.page_id' ),
+ 'title' => 'p1.page_title',
+ 'value' => 'p1.page_title',
+ 'rd_namespace',
+ 'rd_title',
+ 'rd_fragment',
+ 'rd_interwiki',
+ 'redirid' => 'p2.page_id' ),
'conds' => array( 'p1.page_is_redirect' => 1 ),
'join_conds' => array( 'redirect' => array(
- 'LEFT JOIN', 'rd_from=p1.page_id' ),
+ 'LEFT JOIN', 'rd_from=p1.page_id' ),
'p2' => array( 'LEFT JOIN', array(
'p2.page_namespace=rd_namespace',
'p2.page_title=rd_title' ) ) )
*/
function preprocessResults( $db, $res ) {
$batch = new LinkBatch;
+
foreach ( $res as $row ) {
$batch->add( $row->namespace, $row->title );
$batch->addObj( $this->getRedirectTarget( $row ) );
}
+
$batch->execute();
// Back to start for display
} else {
$title = Title::makeTitle( $row->namespace, $row->title );
$article = WikiPage::factory( $title );
+
return $article->getRedirectTarget();
}
}
$lang = $this->getLanguage();
$arr = $lang->getArrow() . $lang->getDirMark();
$targetLink = Linker::link( $target );
+
return "$rd_link $arr $targetLink";
} else {
return "<del>$rd_link</del>";
$par = ( $par !== null ) ? $par : '';
$parms = explode( '/', $par );
$symsForAll = array( '*', 'user' );
- if ( $parms[0] != '' && ( in_array( $par, User::getAllGroups() ) || in_array( $par, $symsForAll ) ) ) {
+
+ if ( $parms[0] != '' &&
+ ( in_array( $par, User::getAllGroups() ) || in_array( $par, $symsForAll ) )
+ ) {
$this->requestedGroup = $par;
$un = $request->getText( 'username' );
} elseif ( count( $parms ) == 2 ) {
$this->requestedGroup = $request->getVal( 'group' );
$un = ( $par != '' ) ? $par : $request->getText( 'username' );
}
+
if ( in_array( $this->requestedGroup, $symsForAll ) ) {
$this->requestedGroup = '';
}
$this->including = $including;
$this->requestedUser = '';
+
if ( $un != '' ) {
$username = Title::makeTitleSafe( NS_USER, $un );
- if ( ! is_null( $username ) ) {
+
+ if ( !is_null( $username ) ) {
$this->requestedUser = $username->getText();
}
}
+
parent::__construct();
}
function getQueryInfo() {
$dbr = wfGetDB( DB_SLAVE );
$conds = array();
+
// Don't show hidden names
if ( !$this->getUser()->isAllowed( 'hideuser' ) ) {
$conds[] = 'ipb_deleted IS NULL OR ipb_deleted = 0';
if ( $this->requestedGroup != '' ) {
$conds['ug_group'] = $this->requestedGroup;
- } else {
- //$options['USE INDEX'] = $this->creationSort ? 'PRIMARY' : 'user_name';
}
+
if ( $this->requestedUser != '' ) {
# Sorted either by account creation or name
if ( $this->creationSort ) {
$conds[] = 'user_name >= ' . $dbr->addQuotes( $this->requestedUser );
}
}
+
if ( $this->editsOnly ) {
$conds[] = 'user_editcount > 0';
}
'options' => $options,
'join_conds' => array(
'user_groups' => array( 'LEFT JOIN', 'user_id=ug_user' ),
- 'ipblocks' => array( 'LEFT JOIN', array(
- 'user_id=ipb_user',
- 'ipb_auto' => 0
- )),
+ 'ipblocks' => array(
+ 'LEFT JOIN', array(
+ 'user_id=ipb_user',
+ 'ipb_auto' => 0
+ )
+ ),
),
'conds' => $conds
);
wfRunHooks( 'SpecialListusersQueryInfo', array( $this, &$query ) );
+
return $query;
}
$userName = $row->user_name;
$ulinks = Linker::userLink( $row->user_id, $userName );
- $ulinks .= Linker::userToolLinksRedContribs( $row->user_id, $userName, intval( $row->edits ) );
+ $ulinks .= Linker::userToolLinksRedContribs(
+ $row->user_id,
+ $userName,
+ (int)$row->edits
+ );
$lang = $this->getLanguage();
$groups = '';
$groups_list = self::getGroups( $row->user_id );
+
if ( !$this->including && count( $groups_list ) > 0 ) {
$list = array();
foreach ( $groups_list as $group ) {
}
$item = $lang->specialList( $ulinks, $groups );
+
if ( $row->ipb_deleted ) {
$item = "<span class=\"deleted\">$item</span>";
}
$edits = '';
global $wgEdititis;
if ( !$this->including && $wgEdititis ) {
- $edits = ' [' . $this->msg( 'usereditcount' )->numParams( $row->edits )->escaped() . ']';
+ // @fixme i18n issue: Hardcoded square brackets.
+ $edits = ' [' .
+ $this->msg( 'usereditcount' )->numParams( $row->edits )->escaped() .
+ ']';
}
$created = '';
- # Some rows may be NULL
+ # Some rows may be null
if ( !$this->including && $row->creation ) {
$user = $this->getUser();
$d = $lang->userDate( $row->creation, $user );
$created = $this->msg( 'usercreated', $d, $t, $row->user_name )->escaped();
$created = ' ' . $this->msg( 'parentheses' )->rawParams( $created )->escaped();
}
- $blocked = !is_null( $row->ipb_deleted ) ? ' ' . $this->msg( 'listusers-blocked', $userName )->escaped() : '';
+ $blocked = !is_null( $row->ipb_deleted ) ?
+ ' ' . $this->msg( 'listusers-blocked', $userName )->escaped() :
+ '';
wfRunHooks( 'SpecialListusersFormatRow', array( &$item, $row ) );
+
return Html::rawElement( 'li', array(), "{$item}{$edits}{$created}{$blocked}" );
}
list( $self ) = explode( '/', $this->getTitle()->getPrefixedDBkey() );
# Form tag
- $out = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' ) ) .
+ $out = Xml::openElement(
+ 'form',
+ array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listusers-form' )
+ ) .
Xml::fieldset( $this->msg( 'listusers' )->text() ) .
Html::hidden( 'title', $self );
$out .= Xml::option( $groupText, $group, $group == $this->requestedGroup );
}
$out .= Xml::closeElement( 'select' ) . '<br />';
- $out .= Xml::checkLabel( $this->msg( 'listusers-editsonly' )->text(), 'editsOnly', 'editsOnly', $this->editsOnly );
+ $out .= Xml::checkLabel(
+ $this->msg( 'listusers-editsonly' )->text(),
+ 'editsOnly',
+ 'editsOnly',
+ $this->editsOnly
+ );
$out .= ' ';
- $out .= Xml::checkLabel( $this->msg( 'listusers-creationsort' )->text(), 'creationSort', 'creationSort', $this->creationSort );
+ $out .= Xml::checkLabel(
+ $this->msg( 'listusers-creationsort' )->text(),
+ 'creationSort',
+ 'creationSort',
+ $this->creationSort
+ );
$out .= '<br />';
wfRunHooks( 'SpecialListusersHeaderForm', array( $this, &$out ) );
$result[$group] = User::getGroupName( $group );
}
asort( $result );
+
return $result;
}
$query['username'] = $this->requestedUser;
}
wfRunHooks( 'SpecialListusersDefaultQuery', array( $this, &$query ) );
+
return $query;
}
protected static function getGroups( $uid ) {
$user = User::newFromId( $uid );
$groups = array_diff( $user->getEffectiveGroups(), User::getImplicitGroups() );
+
return $groups;
}
* @return string
*/
protected static function buildGroupLink( $group, $username ) {
- return User::makeGroupLinkHtml( $group, htmlspecialchars( User::getGroupMember( $group, $username ) ) );
+ return User::makeGroupLinkHtml(
+ $group,
+ htmlspecialchars( User::getGroupMember( $group, $username ) )
+ );
}
}
* @ingroup SpecialPage
*/
class SpecialListUsers extends IncludableSpecialPage {
-
/**
* Constructor
*/
* @ingroup SpecialPage
*/
class SpecialLog extends SpecialPage {
-
/**
* List log type for which the target is a user
* Thus if the given target is in NS_MAIN we can alter it to be an NS_USER
# Get parameters
$parms = explode( '/', ( $par = ( $par !== null ) ? $par : '' ) );
$symsForAll = array( '*', 'all' );
- if ( $parms[0] != '' && ( in_array( $par, $wgLogTypes ) || in_array( $par, $symsForAll ) ) ) {
+ if ( $parms[0] != '' &&
+ ( in_array( $par, $wgLogTypes ) || in_array( $par, $symsForAll ) )
+ ) {
$opts->setValue( 'type', $par );
} elseif ( count( $parms ) == 2 ) {
$opts->setValue( 'type', $parms[0] );
private function show( FormOptions $opts, array $extraConds ) {
# Create a LogPager item to get the results and a LogEventsList item to format them...
- $loglist = new LogEventsList( $this->getContext(), null, LogEventsList::USE_REVDEL_CHECKBOXES );
- $pager = new LogPager( $loglist, $opts->getValue( 'type' ), $opts->getValue( 'user' ),
- $opts->getValue( 'page' ), $opts->getValue( 'pattern' ), $extraConds, $opts->getValue( 'year' ),
- $opts->getValue( 'month' ), $opts->getValue( 'tagfilter' ) );
+ $loglist = new LogEventsList(
+ $this->getContext(),
+ null,
+ LogEventsList::USE_REVDEL_CHECKBOXES
+ );
+ $pager = new LogPager(
+ $loglist,
+ $opts->getValue( 'type' ),
+ $opts->getValue( 'user' ),
+ $opts->getValue( 'page' ),
+ $opts->getValue( 'pattern' ),
+ $extraConds,
+ $opts->getValue( 'year' ),
+ $opts->getValue( 'month' ),
+ $opts->getValue( 'tagfilter' )
+ );
$this->addHeader( $opts->getValue( 'type' ) );
}
# Show form options
- $loglist->showOptions( $pager->getType(), $opts->getValue( 'user' ), $pager->getPage(), $pager->getPattern(),
- $pager->getYear(), $pager->getMonth(), $pager->getFilterParams(), $opts->getValue( 'tagfilter' ) );
+ $loglist->showOptions(
+ $pager->getType(),
+ $opts->getValue( 'user' ),
+ $pager->getPage(),
+ $pager->getPattern(),
+ $pager->getYear(),
+ $pager->getMonth(),
+ $pager->getFilterParams(),
+ $opts->getValue( 'tagfilter' )
+ );
# Insert list
$logBody = $pager->getBody();
if ( $logBody ) {
$this->getOutput()->addHTML(
$pager->getNavigationBar() .
- $this->getRevisionButton( $loglist->beginLogEventsList() . $logBody . $loglist->endLogEventsList() ) .
- $pager->getNavigationBar()
+ $this->getRevisionButton(
+ $loglist->beginLogEventsList() .
+ $logBody .
+ $loglist->endLogEventsList()
+ ) .
+ $pager->getNavigationBar()
);
} else {
$this->getOutput()->addWikiMsg( 'logempty' );
}
private function getRevisionButton( $formcontents ) {
- # If the user doesn't have the ability to delete log entries, don't bother showing him/her the button.
+ # If the user doesn't have the ability to delete log entries,
+ # don't bother showing them the button.
if ( !$this->getUser()->isAllowedAll( 'deletedhistory', 'deletelogentry' ) ) {
return $formcontents;
}
# Show button to hide log entries
global $wgScript;
- $s = Html::openElement( 'form', array( 'action' => $wgScript, 'id' => 'mw-log-deleterevision-submit' ) ) . "\n";
+ $s = Html::openElement(
+ 'form',
+ array( 'action' => $wgScript, 'id' => 'mw-log-deleterevision-submit' )
+ ) . "\n";
$s .= Html::hidden( 'title', SpecialPage::getTitleFor( 'Revisiondelete' ) ) . "\n";
$s .= Html::hidden( 'target', SpecialPage::getTitleFor( 'Log' ) ) . "\n";
$s .= Html::hidden( 'type', 'logging' ) . "\n";
- $button = Html::element( 'button',
- array( 'type' => 'submit', 'class' => "deleterevision-log-submit mw-log-deleterevision-button" ),
+ $button = Html::element(
+ 'button',
+ array(
+ 'type' => 'submit',
+ 'class' => "deleterevision-log-submit mw-log-deleterevision-button"
+ ),
$this->msg( 'showhideselectedlogentries' )->text()
) . "\n";
$s .= $button . $formcontents . $button;
* @ingroup SpecialPage
*/
class LonelyPagesPage extends PageQueryPage {
-
function __construct( $name = 'Lonelypages' ) {
parent::__construct( $name );
}
function getQueryInfo() {
return array(
- 'tables' => array( 'page', 'pagelinks',
- 'templatelinks' ),
- 'fields' => array( 'namespace' => 'page_namespace',
- 'title' => 'page_title',
- 'value' => 'page_title' ),
- 'conds' => array( 'pl_namespace IS NULL',
- 'page_namespace' => MWNamespace::getContentNamespaces(),
- 'page_is_redirect' => 0,
- 'tl_namespace IS NULL' ),
+ 'tables' => array(
+ 'page', 'pagelinks',
+ 'templatelinks'
+ ),
+ 'fields' => array(
+ 'namespace' => 'page_namespace',
+ 'title' => 'page_title',
+ 'value' => 'page_title'
+ ),
+ 'conds' => array(
+ 'pl_namespace IS NULL',
+ 'page_namespace' => MWNamespace::getContentNamespaces(),
+ 'page_is_redirect' => 0,
+ 'tl_namespace IS NULL'
+ ),
'join_conds' => array(
- 'pagelinks' => array(
- 'LEFT JOIN', array(
+ 'pagelinks' => array(
+ 'LEFT JOIN', array(
'pl_namespace = page_namespace',
- 'pl_title = page_title' ) ),
- 'templatelinks' => array(
- 'LEFT JOIN', array(
+ 'pl_title = page_title'
+ )
+ ),
+ 'templatelinks' => array(
+ 'LEFT JOIN', array(
'tl_namespace = page_namespace',
- 'tl_title = page_title' ) ) )
+ 'tl_title = page_title'
+ )
+ )
+ )
);
}
* @ingroup SpecialPage
*/
class LongPagesPage extends ShortPagesPage {
-
function __construct( $name = 'Longpages' ) {
parent::__construct( $name );
}
public function getQueryInfo() {
return array(
'tables' => array( 'image' ),
- 'fields' => array( 'namespace' => NS_FILE,
- 'title' => 'img_name',
- 'value' => 'img_major_mime',
- 'img_size',
- 'img_width',
- 'img_height',
- 'img_user_text',
- 'img_timestamp' ),
- 'conds' => array( 'img_major_mime' => $this->major,
- 'img_minor_mime' => $this->minor )
+ 'fields' => array(
+ 'namespace' => NS_FILE,
+ 'title' => 'img_name',
+ 'value' => 'img_major_mime',
+ 'img_size',
+ 'img_width',
+ 'img_height',
+ 'img_user_text',
+ 'img_timestamp'
+ ),
+ 'conds' => array(
+ 'img_major_mime' => $this->major,
+ 'img_minor_mime' => $this->minor
+ )
);
}
$this->setHeaders();
$this->outputHeader();
$this->getOutput()->addHTML(
- Xml::openElement( 'form', array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgScript ) ) .
- Xml::openElement( 'fieldset' ) .
- Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
- Xml::element( 'legend', null, $this->msg( 'mimesearch' )->text() ) .
- Xml::inputLabel( $this->msg( 'mimetype' )->text(), 'mime', 'mime', 20, $mime ) . ' ' .
- Xml::submitButton( $this->msg( 'ilsubmit' )->text() ) .
- Xml::closeElement( 'fieldset' ) .
- Xml::closeElement( 'form' )
+ Xml::openElement(
+ 'form',
+ array( 'id' => 'specialmimesearch', 'method' => 'get', 'action' => $wgScript )
+ ) .
+ Xml::openElement( 'fieldset' ) .
+ Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
+ Xml::element( 'legend', null, $this->msg( 'mimesearch' )->text() ) .
+ Xml::inputLabel( $this->msg( 'mimetype' )->text(), 'mime', 'mime', 20, $mime ) .
+ ' ' .
+ Xml::submitButton( $this->msg( 'ilsubmit' )->text() ) .
+ Xml::closeElement( 'fieldset' ) .
+ Xml::closeElement( 'form' )
);
list( $this->major, $this->minor ) = File::splitMime( $mime );
+
if ( $this->major == '' || $this->minor == '' || $this->minor == 'unknown' ||
- !self::isValidType( $this->major ) ) {
+ !self::isValidType( $this->major )
+ ) {
return;
}
+
parent::execute( $par );
}
$bytes = htmlspecialchars( $lang->formatSize( $result->img_size ) );
$dimensions = $this->msg( 'widthheight' )->numParams( $result->img_width,
$result->img_height )->escaped();
- $user = Linker::link( Title::makeTitle( NS_USER, $result->img_user_text ), htmlspecialchars( $result->img_user_text ) );
- $time = htmlspecialchars( $lang->userTimeAndDate( $result->img_timestamp, $this->getUser() ) );
+ $user = Linker::link(
+ Title::makeTitle( NS_USER, $result->img_user_text ),
+ htmlspecialchars( $result->img_user_text )
+ );
+
+ $time = $lang->userTimeAndDate( $result->img_timestamp, $this->getUser() );
+ $time = htmlspecialchars( $time );
return "$download $plink . . $dimensions . . $bytes . . $user . . $time";
}
'model',
'multipart'
);
+
return in_array( $type, $types );
}
if ( $this->mTargetID && $this->mDestID && $this->mAction == 'submit' && $this->mMerge ) {
$this->merge();
+
return;
}
if ( !$this->mSubmitted ) {
$this->showMergeForm();
+
return;
}
} else {
$this->showHistory();
}
-
}
function showMergeForm() {
Xml::openElement( 'form', array(
'method' => 'get',
'action' => $wgScript ) ) .
- '<fieldset>' .
- Xml::element( 'legend', array(),
- $this->msg( 'mergehistory-box' )->text() ) .
- Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
- Html::hidden( 'submitted', '1' ) .
- Html::hidden( 'mergepoint', $this->mTimestamp ) .
- Xml::openElement( 'table' ) .
- '<tr>
+ '<fieldset>' .
+ Xml::element( 'legend', array(),
+ $this->msg( 'mergehistory-box' )->text() ) .
+ Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
+ Html::hidden( 'submitted', '1' ) .
+ Html::hidden( 'mergepoint', $this->mTimestamp ) .
+ Xml::openElement( 'table' ) .
+ '<tr>
<td>' . Xml::label( $this->msg( 'mergehistory-from' )->text(), 'target' ) . '</td>
<td>' . Xml::input( 'target', 30, $this->mTarget, array( 'id' => 'target' ) ) . '</td>
</tr><tr>
<td>' . Xml::label( $this->msg( 'mergehistory-into' )->text(), 'dest' ) . '</td>
<td>' . Xml::input( 'dest', 30, $this->mDest, array( 'id' => 'dest' ) ) . '</td>
</tr><tr><td>' .
- Xml::submitButton( $this->msg( 'mergehistory-go' )->text() ) .
- '</td></tr>' .
- Xml::closeElement( 'table' ) .
- '</fieldset>' .
- '</form>'
+ Xml::submitButton( $this->msg( 'mergehistory-go' )->text() ) .
+ '</td></tr>' .
+ Xml::closeElement( 'table' ) .
+ '</fieldset>' .
+ '</form>'
);
}
# in a nice little table
$table =
Xml::openElement( 'fieldset' ) .
- $this->msg( 'mergehistory-merge', $this->mTargetObj->getPrefixedText(),
- $this->mDestObj->getPrefixedText() )->parse() .
- Xml::openElement( 'table', array( 'id' => 'mw-mergehistory-table' ) ) .
+ $this->msg( 'mergehistory-merge', $this->mTargetObj->getPrefixedText(),
+ $this->mDestObj->getPrefixedText() )->parse() .
+ Xml::openElement( 'table', array( 'id' => 'mw-mergehistory-table' ) ) .
'<tr>
<td class="mw-label">' .
- Xml::label( $this->msg( 'mergehistory-reason' )->text(), 'wpComment' ) .
- '</td>
- <td class="mw-input">' .
- Xml::input( 'wpComment', 50, $this->mComment, array( 'id' => 'wpComment' ) ) .
- '</td>
+ Xml::label( $this->msg( 'mergehistory-reason' )->text(), 'wpComment' ) .
+ '</td>
+ <td class="mw-input">' .
+ Xml::input( 'wpComment', 50, $this->mComment, array( 'id' => 'wpComment' ) ) .
+ '</td>
</tr>
<tr>
<td> </td>
<td class="mw-submit">' .
- Xml::submitButton( $this->msg( 'mergehistory-submit' )->text(), array( 'name' => 'merge', 'id' => 'mw-merge-submit' ) ) .
- '</td>
+ Xml::submitButton( $this->msg( 'mergehistory-submit' )->text(), array( 'name' => 'merge', 'id' => 'mw-merge-submit' ) ) .
+ '</td>
</tr>' .
- Xml::closeElement( 'table' ) .
- Xml::closeElement( 'fieldset' );
+ Xml::closeElement( 'table' ) .
+ Xml::closeElement( 'fieldset' );
$out->addHTML( $table );
}
$out->addHTML(
'<h2 id="mw-mergehistory">' .
- $this->msg( 'mergehistory-list' )->escaped() . "</h2>\n"
+ $this->msg( 'mergehistory-list' )->escaped() . "</h2>\n"
);
if ( $haveRevisions ) {
# Destination page must exist with revisions
if ( !$maxtimestamp ) {
$this->getOutput()->addWikiMsg( 'mergehistory-fail' );
+
return false;
}
# Get the latest timestamp of the source
# $this->mTimestamp must be older than $maxtimestamp
if ( $this->mTimestamp >= $maxtimestamp ) {
$this->getOutput()->addWikiMsg( 'mergehistory-fail' );
+
return false;
}
# Update the revisions
# Check if this did anything
if ( !$count ) {
$this->getOutput()->addWikiMsg( 'mergehistory-fail' );
+
return false;
}
# Update our logs
$this->mResult->seek( 0 );
wfProfileOut( __METHOD__ );
+
return '';
}
$conds = $this->mConds;
$conds['rev_page'] = $this->articleID;
$conds[] = "rev_timestamp < {$this->maxTimestamp}";
+
return array(
'tables' => array( 'revision', 'page', 'user' ),
'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
function getQueryInfo() {
return array(
'tables' => array( 'categorylinks', 'page' ),
- 'fields' => array( 'namespace' => 'page_namespace',
- 'title' => 'page_title',
- 'value' => 'COUNT(*)' ),
+ 'fields' => array(
+ 'namespace' => 'page_namespace',
+ 'title' => 'page_title',
+ 'value' => 'COUNT(*)'
+ ),
'conds' => array( 'page_namespace' => MWNamespace::getContentNamespaces() ),
- 'options' => array( 'HAVING' => 'COUNT(*) > 1',
- 'GROUP BY' => array( 'page_namespace', 'page_title' ) ),
- 'join_conds' => array( 'page' => array( 'LEFT JOIN',
- 'page_id = cl_from' ) )
+ 'options' => array(
+ 'HAVING' => 'COUNT(*) > 1',
+ 'GROUP BY' => array( 'page_namespace', 'page_title' )
+ ),
+ 'join_conds' => array(
+ 'page' => array(
+ 'LEFT JOIN',
+ 'page_id = cl_from'
+ )
+ )
);
}
function formatResult( $skin, $result ) {
$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 ) );
+ return Html::element(
+ 'span',
+ array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
+ $this->getContext(),
+ $result->namespace,
+ $result->title
+ )
+ );
}
if ( $this->isCached() ) {
* @ingroup SpecialPage
*/
class MostimagesPage extends ImageQueryPage {
-
function __construct( $name = 'Mostimages' ) {
parent::__construct( $name );
}
function getQueryInfo() {
return array(
'tables' => array( 'imagelinks' ),
- 'fields' => array( 'namespace' => NS_FILE,
- 'title' => 'il_to',
- 'value' => 'COUNT(*)' ),
- 'options' => array( 'GROUP BY' => 'il_to',
- 'HAVING' => 'COUNT(*) > 1' )
+ 'fields' => array(
+ 'namespace' => NS_FILE,
+ 'title' => 'il_to',
+ 'value' => 'COUNT(*)'
+ ),
+ 'options' => array(
+ 'GROUP BY' => 'il_to',
+ 'HAVING' => 'COUNT(*) > 1'
+ )
);
}
* @ingroup SpecialPage
*/
class MostinterwikisPage extends QueryPage {
-
function __construct( $name = 'Mostinterwikis' ) {
parent::__construct( $name );
}
function formatResult( $skin, $result ) {
$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 ) );
+ return Html::element(
+ 'span',
+ array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
+ $this->getContext(),
+ $result->namespace,
+ $result->title
+ )
+ );
}
if ( $this->isCached() ) {
* @ingroup SpecialPage
*/
class MostlinkedPage extends QueryPage {
-
function __construct( $name = 'Mostlinked' ) {
parent::__construct( $name );
}
function getQueryInfo() {
return array(
'tables' => array( 'pagelinks', 'page' ),
- 'fields' => array( 'namespace' => 'pl_namespace',
- 'title' => 'pl_title',
- 'value' => 'COUNT(*)',
- 'page_namespace' ),
- 'options' => array( 'HAVING' => 'COUNT(*) > 1',
- 'GROUP BY' => array( 'pl_namespace', 'pl_title',
- 'page_namespace' ) ),
- 'join_conds' => array( 'page' => array( 'LEFT JOIN',
- array( 'page_namespace = pl_namespace',
- 'page_title = pl_title' ) ) )
+ 'fields' => array(
+ 'namespace' => 'pl_namespace',
+ 'title' => 'pl_title',
+ 'value' => 'COUNT(*)',
+ 'page_namespace'
+ ),
+ 'options' => array(
+ 'HAVING' => 'COUNT(*) > 1',
+ 'GROUP BY' => array(
+ 'pl_namespace', 'pl_title',
+ 'page_namespace'
+ )
+ ),
+ 'join_conds' => array(
+ 'page' => array(
+ 'LEFT JOIN',
+ array(
+ 'page_namespace = pl_namespace',
+ 'page_title = pl_title'
+ )
+ )
+ )
);
}
function preprocessResults( $db, $res ) {
if ( $res->numRows() > 0 ) {
$linkBatch = new LinkBatch();
+
foreach ( $res as $row ) {
$linkBatch->add( $row->namespace, $row->title );
}
+
$res->seek( 0 );
$linkBatch->execute();
}
*/
function makeWlhLink( $title, $caption ) {
$wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedDBkey() );
+
return Linker::linkKnown( $wlh, $caption );
}
/**
- * Make links to the page corresponding to the item, and the "what links here" page for it
+ * Make links to the page corresponding to the item,
+ * and the "what links here" page for it
*
* @param Skin $skin Skin to be used
* @param object $result Result row
function formatResult( $skin, $result ) {
$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 ) );
+ return Html::element(
+ 'span',
+ array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
+ $this->getContext(),
+ $result->namespace,
+ $result->title )
+ );
}
+
$link = Linker::link( $title );
- $wlh = $this->makeWlhLink( $title,
- $this->msg( 'nlinks' )->numParams( $result->value )->escaped() );
+ $wlh = $this->makeWlhLink(
+ $title,
+ $this->msg( 'nlinks' )->numParams( $result->value )->escaped()
+ );
+
return $this->getLanguage()->specialList( $link, $wlh );
}
* @ingroup SpecialPage
*/
class MostlinkedCategoriesPage extends QueryPage {
-
function __construct( $name = 'Mostlinkedcategories' ) {
parent::__construct( $name );
}
return array(
'tables' => array( 'category' ),
'fields' => array( 'title' => 'cat_title',
- 'namespace' => NS_CATEGORY,
- 'value' => 'cat_pages' ),
+ 'namespace' => NS_CATEGORY,
+ 'value' => 'cat_pages' ),
);
}
$nt = Title::makeTitleSafe( NS_CATEGORY, $result->title );
if ( !$nt ) {
- return Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
- Linker::getInvalidTitleDescription( $this->getContext(), NS_CATEGORY, $result->title ) );
+ return Html::element(
+ 'span',
+ array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
+ $this->getContext(),
+ NS_CATEGORY,
+ $result->title )
+ );
}
$text = $wgContLang->convert( $nt->getText() );
-
$plink = Linker::link( $nt, htmlspecialchars( $text ) );
-
$nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
+
return $this->getLanguage()->specialList( $plink, $nlinks );
}
* @ingroup SpecialPage
*/
class MostlinkedTemplatesPage extends QueryPage {
-
function __construct( $name = 'Mostlinkedtemplates' ) {
parent::__construct( $name );
}
public function getQueryInfo() {
return array(
'tables' => array( 'templatelinks' ),
- 'fields' => array( 'namespace' => 'tl_namespace',
- 'title' => 'tl_title',
- 'value' => 'COUNT(*)' ),
+ 'fields' => array(
+ 'namespace' => 'tl_namespace',
+ 'title' => 'tl_title',
+ 'value' => 'COUNT(*)'
+ ),
'conds' => array( 'tl_namespace' => NS_TEMPLATE ),
'options' => array( 'GROUP BY' => array( 'tl_namespace', 'tl_title' ) )
);
public function formatResult( $skin, $result ) {
$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 ) );
+ return Html::element(
+ 'span',
+ array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
+ $this->getContext(),
+ $result->namespace,
+ $result->title
+ )
+ );
}
return $this->getLanguage()->specialList(
private function makeWlhLink( $title, $result ) {
$wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() );
$label = $this->msg( 'ntransclusions' )->numParams( $result->value )->escaped();
+
return Linker::link( $wlh, $label );
}
* @ingroup SpecialPage
*/
class MovePageForm extends UnlistedSpecialPage {
-
/**
+ * Objects
* @var Title
*/
- var $oldTitle, $newTitle; # Objects
- var $reason; # Text input
- var $moveTalk, $deleteAndMove, $moveSubpages, $fixRedirects, $leaveRedirect, $moveOverShared; # Checks
+ var $oldTitle, $newTitle;
+ // Text input
+ var $reason;
+ // Checks
+ var $moveTalk, $deleteAndMove, $moveSubpages, $fixRedirects, $leaveRedirect, $moveOverShared;
private $watch = false;
$this->watch = $request->getCheck( 'wpWatch' ) && $user->isLoggedIn();
if ( 'submit' == $request->getVal( 'action' ) && $request->wasPosted()
- && $user->matchEditToken( $request->getVal( 'wpEditToken' ) ) ) {
+ && $user->matchEditToken( $request->getVal( 'wpEditToken' ) )
+ ) {
$this->doSubmit();
} else {
$this->showForm( array() );
<tr>
<td></td>
<td class='mw-input'>" .
- Xml::checkLabel( $this->msg( 'delete_and_move_confirm' )->text(), 'wpConfirm', 'wpConfirm' ) .
- "</td>
+ Xml::checkLabel(
+ $this->msg( 'delete_and_move_confirm' )->text(),
+ 'wpConfirm',
+ 'wpConfirm'
+ ) .
+ "</td>
</tr>";
$err = array();
} else {
if ( $this->oldTitle->getNamespace() == NS_USER && !$this->oldTitle->isSubpage() ) {
- $out->wrapWikiMsg( "<div class=\"error mw-moveuserpage-warning\">\n$1\n</div>", 'moveuserpage-warning' );
+ $out->wrapWikiMsg(
+ "<div class=\"error mw-moveuserpage-warning\">\n$1\n</div>",
+ 'moveuserpage-warning'
+ );
}
- $out->addWikiMsg( $wgFixDoubleRedirects ? 'movepagetext' :
- 'movepagetext-noredirectfixer' );
+
+ $out->addWikiMsg( $wgFixDoubleRedirects ?
+ 'movepagetext' :
+ 'movepagetext-noredirectfixer'
+ );
$movepagebtn = $this->msg( 'movepagebtn' )->text();
$submitVar = 'wpMove';
$confirm = false;
if ( count( $err ) == 1 ) {
$errMsg = $err[0];
$errMsgName = array_shift( $errMsg );
+
if ( $errMsgName == 'hookaborted' ) {
$out->addHTML( "<p>{$errMsg[0]}</p>\n" );
} else {
}
} else {
$errStr = array();
+
foreach ( $err as $errMsg ) {
if ( $errMsg[0] == 'hookaborted' ) {
$errStr[] = $errMsg[1];
}
$out->addHTML( "<div class='mw-warning-with-logexcerpt'>\n" );
$out->addWikiMsg( $noticeMsg );
- LogEventsList::showLogExtract( $out, 'protect', $this->oldTitle, '', array( 'lim' => 1 ) );
+ LogEventsList::showLogExtract(
+ $out,
+ 'protect',
+ $this->oldTitle,
+ '',
+ array( 'lim' => 1 )
+ );
$out->addHTML( "</div>\n" );
}
$handler = ContentHandler::getForTitle( $this->oldTitle );
$out->addHTML(
- Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) .
- Xml::openElement( 'fieldset' ) .
- Xml::element( 'legend', null, $this->msg( 'move-page-legend' )->text() ) .
- Xml::openElement( 'table', array( 'id' => 'mw-movepage-table' ) ) .
- "<tr>
+ Xml::openElement(
+ 'form',
+ array(
+ 'method' => 'post',
+ 'action' => $this->getTitle()->getLocalURL( 'action=submit' ),
+ 'id' => 'movepage'
+ )
+ ) .
+ Xml::openElement( 'fieldset' ) .
+ Xml::element( 'legend', null, $this->msg( 'move-page-legend' )->text() ) .
+ Xml::openElement( 'table', array( 'id' => 'mw-movepage-table' ) ) .
+ "<tr>
<td class='mw-label'>" .
- $this->msg( 'movearticle' )->escaped() .
+ $this->msg( 'movearticle' )->escaped() .
"</td>
<td class='mw-input'>
<strong>{$oldTitleLink}</strong>
</tr>
<tr>
<td class='mw-label'>" .
- Xml::label( $this->msg( 'newtitle' )->text(), 'wpNewTitleMain' ) .
+ Xml::label( $this->msg( 'newtitle' )->text(), 'wpNewTitleMain' ) .
"</td>
<td class='mw-input'>" .
- Html::namespaceSelector(
- array(
- 'selected' => $newTitle->getNamespace(),
- 'exclude' => $immovableNamespaces
- ),
- array( 'name' => 'wpNewTitleNs', 'id' => 'wpNewTitleNs' )
- ) .
- Xml::input( 'wpNewTitleMain', 60, $wgContLang->recodeForEdit( $newTitle->getText() ), array(
+ Html::namespaceSelector(
+ array(
+ 'selected' => $newTitle->getNamespace(),
+ 'exclude' => $immovableNamespaces
+ ),
+ array( 'name' => 'wpNewTitleNs', 'id' => 'wpNewTitleNs' )
+ ) .
+ Xml::input(
+ 'wpNewTitleMain',
+ 60,
+ $wgContLang->recodeForEdit( $newTitle->getText() ),
+ array(
'type' => 'text',
'id' => 'wpNewTitleMain',
- 'maxlength' => 255,
- ) ) .
- Html::hidden( 'wpOldTitle', $this->oldTitle->getPrefixedText() ) .
+ 'maxlength' => 255
+ )
+ ) .
+ Html::hidden( 'wpOldTitle', $this->oldTitle->getPrefixedText() ) .
"</td>
</tr>
<tr>
<td class='mw-label'>" .
- Xml::label( $this->msg( 'movereason' )->text(), 'wpReason' ) .
+ Xml::label( $this->msg( 'movereason' )->text(), 'wpReason' ) .
"</td>
<td class='mw-input'>" .
Xml::input( 'wpReason', 60, $this->reason, array(
<tr>
<td></td>
<td class='mw-input'>" .
- Xml::checkLabel( $this->msg( 'movetalk' )->text(), 'wpMovetalk', 'wpMovetalk', $this->moveTalk ) .
+ Xml::checkLabel(
+ $this->msg( 'movetalk' )->text(),
+ 'wpMovetalk',
+ 'wpMovetalk',
+ $this->moveTalk
+ ) .
"</td>
</tr>"
);
<tr>
<td></td>
<td class='mw-input' >" .
- Xml::checkLabel( $this->msg( 'move-leave-redirect' )->text(), 'wpLeaveRedirect',
- 'wpLeaveRedirect', $this->leaveRedirect ) .
+ Xml::checkLabel(
+ $this->msg( 'move-leave-redirect' )->text(),
+ 'wpLeaveRedirect',
+ 'wpLeaveRedirect',
+ $this->leaveRedirect
+ ) .
"</td>
</tr>"
);
<tr>
<td></td>
<td class='mw-input' >" .
- Xml::checkLabel( $this->msg( 'fix-double-redirects' )->text(), 'wpFixRedirects',
- 'wpFixRedirects', $this->fixRedirects ) .
+ Xml::checkLabel(
+ $this->msg( 'fix-double-redirects' )->text(),
+ 'wpFixRedirects',
+ 'wpFixRedirects',
+ $this->fixRedirects
+ ) .
"</td>
</tr>"
);
<tr>
<td></td>
<td class=\"mw-input\">" .
- Xml::check(
- 'wpMovesubpages',
- # Don't check the box if we only have talk subpages to
- # move and we aren't moving the talk page.
- $this->moveSubpages && ( $this->oldTitle->hasSubpages() || $this->moveTalk ),
- array( 'id' => 'wpMovesubpages' )
- ) . ' ' .
- Xml::tags( 'label', array( 'for' => 'wpMovesubpages' ),
- $this->msg(
- ( $this->oldTitle->hasSubpages()
- ? 'move-subpages'
- : 'move-talk-subpages' )
+ Xml::check(
+ 'wpMovesubpages',
+ # Don't check the box if we only have talk subpages to
+ # move and we aren't moving the talk page.
+ $this->moveSubpages && ( $this->oldTitle->hasSubpages() || $this->moveTalk ),
+ array( 'id' => 'wpMovesubpages' )
+ ) . ' ' .
+ Xml::tags( 'label', array( 'for' => 'wpMovesubpages' ),
+ $this->msg(
+ ( $this->oldTitle->hasSubpages()
+ ? 'move-subpages'
+ : 'move-talk-subpages' )
)->numParams( $wgMaximumMovedPages )->params( $wgMaximumMovedPages )->parse()
- ) .
+ ) .
"</td>
</tr>"
);
<tr>
<td></td>
<td class='mw-input'>" .
- Xml::checkLabel( $this->msg( 'move-watch' )->text(), 'wpWatch', 'watch', $watchChecked ) .
+ Xml::checkLabel(
+ $this->msg( 'move-watch' )->text(),
+ 'wpWatch',
+ 'watch',
+ $watchChecked
+ ) .
"</td>
</tr>" );
}
<tr>
<td> </td>
<td class='mw-submit'>" .
- Xml::submitButton( $movepagebtn, array( 'name' => $submitVar ) ) .
+ Xml::submitButton( $movepagebtn, array( 'name' => $submitVar ) ) .
"</td>
</tr>" .
- Xml::closeElement( 'table' ) .
- Html::hidden( 'wpEditToken', $user->getEditToken() ) .
- Xml::closeElement( 'fieldset' ) .
- Xml::closeElement( 'form' ) .
- "\n"
+ Xml::closeElement( 'table' ) .
+ Html::hidden( 'wpEditToken', $user->getEditToken() ) .
+ Xml::closeElement( 'fieldset' ) .
+ Xml::closeElement( 'form' ) .
+ "\n"
);
$this->showLogFragment( $this->oldTitle );
$this->showSubpages( $this->oldTitle );
-
}
function doSubmit() {
# don't allow moving to pages with # in
if ( !$nt || $nt->getFragment() != '' ) {
$this->showForm( array( array( 'badtitletext' ) ) );
+
return;
}
if ( $nt->getNamespace() == NS_FILE
&& !( $this->moveOverShared && $user->isAllowed( 'reupload-shared' ) )
&& !RepoGroup::singleton()->getLocalRepo()->findFile( $nt )
- && wfFindFile( $nt ) )
- {
+ && wfFindFile( $nt )
+ ) {
$this->showForm( array( array( 'file-exists-sharedrepo' ) ) );
- return;
+ return;
}
# Delete to make way if requested
if ( count( $permErrors ) ) {
# Only show the first error
$this->showForm( $permErrors );
+
return;
}
$deleteStatus = $page->doDeleteArticleReal( $reason, false, 0, true, $error, $user );
if ( !$deleteStatus->isGood() ) {
$this->showForm( $deleteStatus->getErrorsArray() );
+
return;
}
}
$error = $ot->moveTo( $nt, true, $this->reason, $createRedirect );
if ( $error !== true ) {
$this->showForm( $error );
+
return;
}
if ( $this->moveSubpages && (
MWNamespace::hasSubpages( $nt->getNamespace() ) || (
$this->moveTalk &&
- MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() )
+ MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() )
)
) ) {
$conds = array(
if ( MWNamespace::hasSubpages( $nt->getNamespace() ) ) {
$conds['page_namespace'][] = $ot->getNamespace();
}
- if ( $this->moveTalk && MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() ) ) {
+ if ( $this->moveTalk &&
+ MWNamespace::hasSubpages( $nt->getTalkPage()->getNamespace() )
+ ) {
$conds['page_namespace'][] = $ot->getTalkPage()->getNamespace();
}
} elseif ( $this->moveTalk ) {
StringUtils::escapeRegexReplacement( $nt->getDBkey() ), # bug 21234
$oldSubpage->getDBkey()
);
+
if ( $oldSubpage->isTalkPage() ) {
$newNs = $nt->getTalkPage()->getNamespace();
} else {
$newNs = $nt->getSubjectPage()->getNamespace();
}
+
# Bug 14385: we need makeTitleSafe because the new page names may
# be longer than 255 characters.
$newSubpage = Title::makeTitleSafe( $newNs, $newPageName );
if ( !$newSubpage ) {
$oldLink = Linker::linkKnown( $oldSubpage );
- $extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink
- )->params( Title::makeName( $newNs, $newPageName ) )->escaped();
+ $extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink )
+ ->params( Title::makeName( $newNs, $newPageName ) )->escaped();
continue;
}
$extraOutput[] = $this->msg( 'movepage-page-exists' )->rawParams( $link )->escaped();
} else {
$success = $oldSubpage->moveTo( $newSubpage, true, $this->reason, $createRedirect );
+
if ( $success === true ) {
if ( $this->fixRedirects ) {
DoubleRedirectJob::fixRedirects( 'move', $oldSubpage, $newSubpage );
array(),
array( 'redirect' => 'no' )
);
+
$newLink = Linker::linkKnown( $newSubpage );
$extraOutput[] = $this->msg( 'movepage-page-moved' )->rawParams( $oldLink, $newLink )->escaped();
++$count;
+
if ( $count >= $wgMaximumMovedPages ) {
$extraOutput[] = $this->msg( 'movepage-max-pages' )->numParams( $wgMaximumMovedPages )->escaped();
break;
$extraOutput[] = $this->msg( 'movepage-page-unmoved' )->rawParams( $oldLink, $newLink )->escaped();
}
}
-
}
if ( $extraOutput !== array() ) {
# No subpages.
if ( $count == 0 ) {
$out->addWikiMsg( 'movenosubpage' );
+
return;
}
* @ingroup SpecialPage
*/
class SpecialNewFiles extends IncludableSpecialPage {
-
public function __construct() {
parent::__construct( 'Newimages' );
}
$form->prepareForm();
$form->displayForm( '' );
}
+
$this->getOutput()->addHTML( $pager->getBody() );
if ( !$this->including() ) {
$this->getOutput()->addHTML( $pager->getNavigationBar() );
* @ingroup SpecialPage Pager
*/
class NewFilesPager extends ReverseChronologicalPager {
-
/**
* @var ImageGallery
*/
if ( !$this->showbots ) {
$groupsWithBotPermission = User::getGroupsWithPermission( 'bot' );
+
if ( count( $groupsWithBotPermission ) ) {
$tables[] = 'user_groups';
$conds[] = 'ug_group IS NULL';
$dbr = wfGetDB( DB_SLAVE );
$likeObj = Title::newFromURL( $this->like );
if ( $likeObj instanceof Title ) {
- $like = $dbr->buildLike( $dbr->anyString(), strtolower( $likeObj->getDBkey() ), $dbr->anyString() );
+ $like = $dbr->buildLike(
+ $dbr->anyString(),
+ strtolower( $likeObj->getDBkey() ),
+ $dbr->anyString()
+ );
$conds[] = "LOWER(img_name) $like";
}
}
if ( !$this->gallery ) {
$this->gallery = new ImageGallery();
}
+
return '';
}
$title = Title::makeTitle( NS_FILE, $name );
$ul = Linker::link( $user->getUserpage(), $user->getName() );
+ $time = $this->getLanguage()->userTimeAndDate( $row->img_timestamp, $this->getUser() );
$this->gallery->add(
$title,
"$ul<br />\n<i>"
- . htmlspecialchars( $this->getLanguage()->userTimeAndDate( $row->img_timestamp, $this->getUser() ) )
+ . htmlspecialchars( $time )
. "</i><br />\n"
);
}
'type' => 'check',
'label' => $this->msg( 'showhidebots', $this->msg( 'show' )->plain() )->escaped(),
'name' => 'showbots',
- # 'default' => $this->getRequest()->getBool( 'showbots', 0 ),
),
'limit' => array(
'type' => 'hidden',
* @ingroup SpecialPage
*/
class SpecialNewpages extends IncludableSpecialPage {
-
// Stored objects
/**
$feedType = $this->opts->getValue( 'feed' );
if ( $feedType ) {
$this->feed( $feedType );
+
return;
}
foreach ( $filters as $key => $msg ) {
$onoff = 1 - $this->opts->getValue( $key );
$link = Linker::link( $self, $showhide[$onoff], array(),
- array( $key => $onoff ) + $changed
+ array( $key => $onoff ) + $changed
);
$links[$key] = $this->msg( $msg )->rawParams( $link )->escaped();
}
Xml::openElement( 'table', array( 'id' => 'mw-newpages-table' ) ) .
'<tr>
<td class="mw-label">' .
- Xml::label( $this->msg( 'namespace' )->text(), 'namespace' ) .
- '</td>
- <td class="mw-input">' .
- Html::namespaceSelector(
- array(
- 'selected' => $namespace,
- 'all' => 'all',
- ), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
- 'class' => 'namespaceselector',
- )
- ) . ' ' .
- Xml::checkLabel(
- $this->msg( 'invert' )->text(),
- 'invert',
- 'nsinvert',
- $nsinvert,
- array( 'title' => $this->msg( 'tooltip-invert' )->text() )
- ) .
- '</td>
+ Xml::label( $this->msg( 'namespace' )->text(), 'namespace' ) .
+ '</td>
+ <td class="mw-input">' .
+ Html::namespaceSelector(
+ array(
+ 'selected' => $namespace,
+ 'all' => 'all',
+ ), array(
+ 'name' => 'namespace',
+ 'id' => 'namespace',
+ 'class' => 'namespaceselector',
+ )
+ ) . ' ' .
+ Xml::checkLabel(
+ $this->msg( 'invert' )->text(),
+ 'invert',
+ 'nsinvert',
+ $nsinvert,
+ array( 'title' => $this->msg( 'tooltip-invert' )->text() )
+ ) .
+ '</td>
</tr>' . ( $tagFilter ? (
'<tr>
<td class="mw-label">' .
- $tagFilterLabel .
+ $tagFilterLabel .
'</td>
<td class="mw-input">' .
- $tagFilterSelector .
+ $tagFilterSelector .
'</td>
</tr>' ) : '' ) .
( $wgEnableNewpagesUserFilter ?
- '<tr>
+ '<tr>
<td class="mw-label">' .
Xml::label( $this->msg( 'newpages-username' )->text(), 'mw-np-username' ) .
- '</td>
+ '</td>
<td class="mw-input">' .
Xml::input( 'username', 30, $userText, array( 'id' => 'mw-np-username' ) ) .
- '</td>
+ '</td>
</tr>' : '' ) .
'<tr> <td></td>
<td class="mw-submit">' .
- Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) .
- '</td>
- </tr>' .
+ Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) .
+ '</td>
+ </tr>' .
'<tr>
<td></td>
<td class="mw-input">' .
- $this->filterLinks() .
- '</td>
+ $this->filterLinks() .
+ '</td>
</tr>' .
Xml::closeElement( 'table' ) .
Xml::closeElement( 'fieldset' ) .
}
/**
- * Format a row, providing the timestamp, links to the page/history, size, user links, and a comment
+ * Format a row, providing the timestamp, links to the page/history,
+ * size, user links, and a comment
*
- * @param $result Result row
+ * @param object $result Result row
* @return String
*/
public function formatRow( $result ) {
$query['rcid'] = $result->rc_id;
}
- // Linker::linkKnown() uses 'known' and 'noclasses' options. This breaks the colouration for stubs.
+ // Linker::linkKnown() uses 'known' and 'noclasses' options.
+ // This breaks the colouration for stubs.
$plink = Linker::link(
$title,
null,
$hist = Html::rawElement( 'span', array( 'class' => 'mw-newpages-history' ),
$this->msg( 'parentheses' )->rawParams( $histLink )->escaped() );
- $length = Html::element( 'span', array( 'class' => 'mw-newpages-length' ),
- $this->msg( 'brackets' )->params( $this->msg( 'nbytes' )->numParams( $result->length )->text() )
+ $length = Html::element(
+ 'span',
+ array( 'class' => 'mw-newpages-length' ),
+ $this->msg( 'brackets' )->params( $this->msg( 'nbytes' )
+ ->numParams( $result->length )->text()
+ )
);
$ulink = Linker::revUserTools( $rev );
# Tags, if any.
if ( isset( $result->ts_tags ) ) {
- list( $tagDisplay, $newClasses ) = ChangeTags::formatSummaryRow( $result->ts_tags, 'newpages' );
+ list( $tagDisplay, $newClasses ) = ChangeTags::formatSummaryRow(
+ $result->ts_tags,
+ 'newpages'
+ );
$classes = array_merge( $classes, $newClasses );
} else {
$tagDisplay = '';
# Display the old title if the namespace/title has been changed
$oldTitleText = '';
$oldTitle = Title::makeTitle( $result->rc_namespace, $result->rc_title );
+
if ( !$title->equals( $oldTitle ) ) {
- $oldTitleText = $this->msg( 'rc-old-title' )->params( $oldTitle->getPrefixedText() )->escaped();
+ $oldTitleText = $oldTitle->getPrefixedText();
+ $oldTitleText = $this->msg( 'rc-old-title' )->params( $oldTitleText )->escaped();
}
return "<li{$css}>{$time} {$dm}{$plink} {$hist} {$dm}{$length} {$dm}{$ulink} {$comment} {$tagDisplay} {$oldTitleText}</li>\n";
/**
* Should a specific result row provide "patrollable" links?
*
- * @param $result Result row
+ * @param object $result Result row
* @return Boolean
*/
protected function patrollable( $result ) {
if ( !$wgFeed ) {
$this->getOutput()->addWikiMsg( 'feed-unavailable' );
+
return;
}
if ( !isset( $wgFeedClasses[$type] ) ) {
$this->getOutput()->addWikiMsg( 'feed-invalid' );
+
return;
}
protected function feedTitle() {
global $wgLanguageCode, $wgSitename;
$desc = $this->getDescription();
+
return "$wgSitename - $desc [$wgLanguageCode]";
}
"</p>\n<hr />\n<div>" .
nl2br( htmlspecialchars( $revision->getContent()->serialize() ) ) . "</div>";
}
+
return '';
}
if ( $wgEnableNewpagesUserFilter && $user ) {
$conds['rc_user_text'] = $user->getText();
$rcIndexes = 'rc_user_text';
- # If anons cannot make new pages, don't "exclude logged in users"!
- } elseif ( User::groupHasPermission( '*', 'createpage' ) && $this->opts->getValue( 'hideliu' ) ) {
+ } elseif ( User::groupHasPermission( '*', 'createpage' ) &&
+ $this->opts->getValue( 'hideliu' )
+ ) {
+ # If anons cannot make new pages, don't "exclude logged in users"!
$conds['rc_user'] = 0;
}
+
# If this user cannot see patrolled edits or they are off, don't do dumb queries!
if ( $this->opts->getValue( 'hidepatrolled' ) && $this->getUser()->useNPPatrol() ) {
$conds['rc_patrolled'] = 0;
}
+
if ( $this->opts->getValue( 'hidebots' ) ) {
$conds['rc_bot'] = 0;
}
$linkBatch->add( $row->rc_namespace, $row->rc_title );
}
$linkBatch->execute();
+
return '<ul>';
}
* @author Brad Jorsch
*/
-
/**
* Special:PagesWithProp to search the page_props table
* @ingroup SpecialPage
$title = Title::newFromRow( $result );
$ret = Linker::link( $title, null, array(), array(), array( 'known' ) );
if ( $result->pp_value !== '' ) {
- $value = $this->msg( 'parentheses' )
- ->rawParams( Html::element( 'span', array( 'class' => 'prop-value' ), $result->pp_value ) )
- ->escaped();
+ $propValue = Html::element( 'span', array( 'class' => 'prop-value' ), $result->pp_value );
+ $value = $this->msg( 'parentheses' )->rawParams( $propValue )->escaped();
$ret .= " $value";
}
+
return $ret;
}
* @ingroup SpecialPage
*/
class SpecialPasswordReset extends FormSpecialPage {
-
/**
* @var Message
*/
'type' => 'text',
'label-message' => 'passwordreset-username',
);
+
if ( $this->getUser()->isLoggedIn() ) {
$a['Username']['default'] = $this->getUser()->getName();
}
if ( isset( $wgPasswordResetRoutes['domain'] ) && $wgPasswordResetRoutes['domain'] ) {
$i++;
}
+
return $this->msg( 'passwordreset-pretext', $i )->parseAsBlock();
}
}
if ( isset( $data['Capture'] ) && !$this->getUser()->isAllowed( 'passwordreset' ) ) {
- // The user knows they don't have the passwordreset permission, but they tried to spoof the form. That's naughty
+ // The user knows they don't have the passwordreset permission,
+ // but they tried to spoof the form. That's naughty
throw new PermissionsError( 'passwordreset' );
}
$users = array( User::newFromName( $data['Username'] ) );
} elseif ( isset( $data['Email'] )
&& $data['Email'] !== ''
- && Sanitizer::validateEmail( $data['Email'] ) )
- {
+ && Sanitizer::validateEmail( $data['Email'] )
+ ) {
$method = 'email';
$res = wfGetDB( DB_SLAVE )->select(
'user',
array( 'user_email' => $data['Email'] ),
__METHOD__
);
+
if ( $res ) {
$users = array();
+
foreach ( $res as $row ) {
$users[] = User::newFromRow( $row );
}
foreach ( $users as $user ) {
if ( $user->isPasswordReminderThrottled() ) {
global $wgPasswordReminderResendTime;
+
# Round the time in hours to 3 d.p., in case someone is specifying
# minutes or seconds.
- return array( array( 'throttled-mailpassword', round( $wgPasswordReminderResendTime, 3 ) ) );
+ return array( array(
+ 'throttled-mailpassword',
+ round( $wgPasswordReminderResendTime, 3 )
+ ) );
}
}
$password = $user->randomPassword();
$user->setNewpassword( $password );
$user->saveSettings();
- $passwords[] = $this->msg( 'passwordreset-emailelement', $user->getName(), $password
- )->inLanguage( $userLanguage )->text(); // We'll escape the whole thing later
+ $passwords[] = $this->msg( 'passwordreset-emailelement', $user->getName(), $password )
+ ->inLanguage( $userLanguage )->text(); // We'll escape the whole thing later
}
$passwordBlock = implode( "\n\n", $passwords );
// The email didn't send, but maybe they knew that and that's why they captured it
return true;
} else {
- // @todo FIXME: The email didn't send, but we have already set the password throttle
- // timestamp, so they won't be able to try again until it expires... :(
+ // @todo FIXME: The email wasn't sent, but we have already set
+ // the password throttle timestamp, so they won't be able to try
+ // again until it expires... :(
return array( array( 'mailerror', $this->result->getMessage() ) );
}
}
// Maybe password resets are disabled, or there are no allowable routes
if ( !is_array( $wgPasswordResetRoutes ) ||
- !in_array( true, array_values( $wgPasswordResetRoutes ) ) )
- {
+ !in_array( true, array_values( $wgPasswordResetRoutes ) )
+ ) {
return 'passwordreset-disabled';
}
* @ingroup SpecialPage
*/
class PopularPagesPage extends QueryPage {
-
function __construct( $name = 'Popularpages' ) {
parent::__construct( $name );
}
function getQueryInfo() {
return array(
'tables' => array( 'page' ),
- 'fields' => array( 'namespace' => 'page_namespace',
- 'title' => 'page_title',
- 'value' => 'page_counter' ),
- 'conds' => array( 'page_is_redirect' => 0,
- 'page_namespace' => MWNamespace::getContentNamespaces() ) );
+ 'fields' => array(
+ 'namespace' => 'page_namespace',
+ 'title' => 'page_title',
+ 'value' => 'page_counter' ),
+ 'conds' => array(
+ 'page_is_redirect' => 0,
+ 'page_namespace' => MWNamespace::getContentNamespaces()
+ )
+ );
}
/**
$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 ) );
+ return Html::element(
+ 'span',
+ array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
+ $this->getContext(),
+ $result->namespace,
+ $result->title )
+ );
}
$link = Linker::linkKnown(
htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) )
);
$nv = $this->msg( 'nviews' )->numParams( $result->value )->escaped();
+
return $this->getLanguage()->specialList( $link, $nv );
}
$this->setHeaders();
$this->outputHeader();
$out = $this->getOutput();
- $out->disallowUserJs(); # Prevent hijacked user scripts from sniffing passwords etc.
+ $out->disallowUserJs(); # Prevent hijacked user scripts from sniffing passwords etc.
$user = $this->getUser();
if ( $user->isAnon() ) {
- throw new ErrorPageError( 'prefsnologin', 'prefsnologintext', array( $this->getTitle()->getPrefixedDBkey() ) );
+ throw new ErrorPageError(
+ 'prefsnologin',
+ 'prefsnologintext',
+ array( $this->getTitle()->getPrefixedDBkey() )
+ );
}
$this->checkReadOnly();
if ( $par == 'reset' ) {
$this->showResetForm();
+
return;
}
$out .= Xml::openElement( 'table', array( 'id' => 'nsselect', 'class' => 'allpages' ) );
$out .= "<tr>
<td class='mw-label'>" .
- Xml::label( $this->msg( 'allpagesprefix' )->text(), 'nsfrom' ) .
- "</td>
+ Xml::label( $this->msg( 'allpagesprefix' )->text(), 'nsfrom' ) .
+ "</td>
<td class='mw-input'>" .
- Xml::input( 'prefix', 30, str_replace( '_', ' ', $from ), array( 'id' => 'nsfrom' ) ) .
- "</td>
+ Xml::input( 'prefix', 30, str_replace( '_', ' ', $from ), array( 'id' => 'nsfrom' ) ) .
+ "</td>
</tr>
<tr>
- <td class='mw-label'>" .
- Xml::label( $this->msg( 'namespace' )->text(), 'namespace' ) .
- "</td>
+ <td class='mw-label'>" .
+ Xml::label( $this->msg( 'namespace' )->text(), 'namespace' ) .
+ "</td>
<td class='mw-input'>" .
- Html::namespaceSelector( array(
- 'selected' => $namespace,
- ), array(
- 'name' => 'namespace',
- 'id' => 'namespace',
- 'class' => 'namespaceselector',
- ) ) .
- Xml::checkLabel(
- $this->msg( 'allpages-hide-redirects' )->text(),
- 'hideredirects',
- 'hideredirects',
- $hideredirects
- ) . ' ' .
- Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) .
- "</td>
+ Html::namespaceSelector( array(
+ 'selected' => $namespace,
+ ), array(
+ 'name' => 'namespace',
+ 'id' => 'namespace',
+ 'class' => 'namespaceselector',
+ ) ) .
+ Xml::checkLabel(
+ $this->msg( 'allpages-hide-redirects' )->text(),
+ 'hideredirects',
+ 'hideredirects',
+ $hideredirects
+ ) . ' ' .
+ Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) .
+ "</td>
</tr>";
$out .= Xml::closeElement( 'table' );
$out .= Xml::closeElement( 'fieldset' );
$out .= Xml::closeElement( 'form' );
$out .= Xml::closeElement( 'div' );
+
return $out;
}
$out .= '</tr>';
}
}
+
if ( $n % 3 != 0 ) {
$out .= '</tr>';
}
+
$out .= Xml::closeElement( 'table' );
} else {
$out = '';
$out2 = Xml::openElement( 'table', array( 'id' => 'mw-prefixindex-nav-table' ) ) .
'<tr>
<td>' .
- $nsForm .
- '</td>
- <td id="mw-prefixindex-nav-form" class="mw-prefixindex-nav">';
+ $nsForm .
+ '</td>
+ <td id="mw-prefixindex-nav-form" class="mw-prefixindex-nav">';
- if ( isset( $res ) && $res && ( $n == $this->maxPerPage ) && ( $s = $res->fetchObject() ) ) {
+ if ( isset( $res ) && $res && ( $n == $this->maxPerPage ) &&
+ ( $s = $res->fetchObject() )
+ ) {
$query = array(
'from' => $s->page_title,
'prefix' => $prefix,
// This tells us we're not just a holdover from old links.
$query['namespace'] = $namespace;
}
+
$nextLink = Linker::linkKnown(
- $self,
- $this->msg( 'nextpage', str_replace( '_', ' ', $s->page_title ) )->escaped(),
- array(),
- $query
- );
+ $self,
+ $this->msg( 'nextpage', str_replace( '_', ' ', $s->page_title ) )->escaped(),
+ array(),
+ $query
+ );
+
$out2 .= $nextLink;
- $footer = "\n" . Html::element( "hr" )
- . Html::rawElement( "div", array( "class" => "mw-prefixindex-nav" ), $nextLink );
+ $footer = "\n" . Html::element( 'hr' ) .
+ Html::rawElement(
+ 'div',
+ array( 'class' => 'mw-prefixindex-nav' ),
+ $nextLink
+ );
}
$out2 .= "</td></tr>" .
Xml::closeElement( 'table' );
$level = $request->getVal( $this->IdLevel );
$sizetype = $request->getVal( 'sizetype' );
$size = $request->getIntOrNull( 'size' );
- $NS = $request->getIntOrNull( 'namespace' );
+ $ns = $request->getIntOrNull( 'namespace' );
$indefOnly = $request->getBool( 'indefonly' ) ? 1 : 0;
$cascadeOnly = $request->getBool( 'cascadeonly' ) ? 1 : 0;
- $pager = new ProtectedPagesPager( $this, array(), $type, $level, $NS, $sizetype, $size, $indefOnly, $cascadeOnly );
+ $pager = new ProtectedPagesPager(
+ $this,
+ array(),
+ $type,
+ $level,
+ $ns,
+ $sizetype,
+ $size,
+ $indefOnly,
+ $cascadeOnly
+ );
- $this->getOutput()->addHTML( $this->showOptions( $NS, $type, $level, $sizetype, $size, $indefOnly, $cascadeOnly ) );
+ $this->getOutput()->addHTML( $this->showOptions(
+ $ns,
+ $type,
+ $level,
+ $sizetype,
+ $size,
+ $indefOnly,
+ $cascadeOnly
+ ) );
if ( $pager->getNumRows() ) {
$this->getOutput()->addHTML(
$pager->getNavigationBar() .
- '<ul>' . $pager->getBody() . '</ul>' .
- $pager->getNavigationBar()
+ '<ul>' . $pager->getBody() . '</ul>' .
+ $pager->getNavigationBar()
);
} else {
$this->getOutput()->addWikiMsg( 'protectedpagesempty' );
$title = Title::makeTitleSafe( $row->page_namespace, $row->page_title );
if ( !$title ) {
wfProfileOut( __METHOD__ );
- return Html::rawElement( 'li', array(),
- Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
- Linker::getInvalidTitleDescription( $this->getContext(), $row->page_namespace, $row->page_title ) ) ) . "\n";
+
+ return Html::rawElement(
+ 'li',
+ array(),
+ Html::element(
+ 'span',
+ array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
+ $this->getContext(),
+ $row->page_namespace,
+ $row->page_title
+ )
+ )
+ ) . "\n";
}
$link = Linker::link( $title );
$stxt = $lang->getDirMark() . ' ' . Linker::formatRevisionSize( $size );
}
- # Show a link to the change protection form for allowed users otherwise a link to the protection log
+ # Show a link to the change protection form for allowed users otherwise
+ # a link to the protection log
if ( $this->getUser()->isAllowed( 'protect' ) ) {
$changeProtection = Linker::linkKnown(
$title,
);
}
- $changeProtection = ' ' . $this->msg( 'parentheses' )->rawParams( $changeProtection )->escaped();
+ $changeProtection = ' ' . $this->msg( 'parentheses' )->rawParams( $changeProtection )
+ ->escaped();
wfProfileOut( __METHOD__ );
return Html::rawElement(
'li',
array(),
- $lang->specialList( $link . $stxt, $lang->commaList( $description_items ), false ) . $changeProtection ) . "\n";
+ $lang->specialList( $link . $stxt, $lang->commaList( $description_items ), false ) .
+ $changeProtection
+ ) . "\n";
}
/**
* @param $cascadeOnly Boolean: only cascading protection
* @return String: input form
*/
- protected function showOptions( $namespace, $type = 'edit', $level, $sizetype, $size, $indefOnly, $cascadeOnly ) {
+ protected function showOptions( $namespace, $type = 'edit', $level, $sizetype,
+ $size, $indefOnly, $cascadeOnly
+ ) {
global $wgScript;
+
$title = $this->getTitle();
+
return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
Xml::openElement( 'fieldset' ) .
Xml::element( 'legend', array(), $this->msg( 'protectedpages' )->text() ) .
* @return string Formatted HTML
*/
protected function getExpiryCheck( $indefOnly ) {
- return Xml::checkLabel( $this->msg( 'protectedpages-indef' )->text(), 'indefonly', 'indefonly', $indefOnly ) . "\n";
+ return Xml::checkLabel(
+ $this->msg( 'protectedpages-indef' )->text(),
+ 'indefonly',
+ 'indefonly',
+ $indefOnly
+ ) . "\n";
}
/**
* @return string Formatted HTML
*/
protected function getCascadeCheck( $cascadeOnly ) {
- return Xml::checkLabel( $this->msg( 'protectedpages-cascade' )->text(), 'cascadeonly', 'cascadeonly', $cascadeOnly ) . "\n";
+ return Xml::checkLabel(
+ $this->msg( 'protectedpages-cascade' )->text(),
+ 'cascadeonly',
+ 'cascadeonly',
+ $cascadeOnly
+ ) . "\n";
}
/**
protected function getSizeLimit( $sizetype, $size ) {
$max = $sizetype === 'max';
- return Xml::radioLabel( $this->msg( 'minimum-size' )->text(), 'sizetype', 'min', 'wpmin', !$max ) .
+ return Xml::radioLabel(
+ $this->msg( 'minimum-size' )->text(),
+ 'sizetype',
+ 'min',
+ 'wpmin',
+ !$max
+ ) .
' ' .
- Xml::radioLabel( $this->msg( 'maximum-size' )->text(), 'sizetype', 'max', 'wpmax', $max ) .
+ Xml::radioLabel(
+ $this->msg( 'maximum-size' )->text(),
+ 'sizetype',
+ 'max',
+ 'wpmax',
+ $max
+ ) .
' ' .
Xml::input( 'size', 9, $size, array( 'id' => 'wpsize' ) ) .
' ' .
protected function getLevelMenu( $pr_level ) {
global $wgRestrictionLevels;
- $m = array( $this->msg( 'restriction-level-all' )->text() => 0 ); // Temporary array
+ // Temporary array
+ $m = array( $this->msg( 'restriction-level-all' )->text() => 0 );
$options = array();
// First pass to load the log names
public $mForm, $mConds;
private $type, $level, $namespace, $sizetype, $size, $indefonly;
- function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype = '', $size = 0,
- $indefonly = false, $cascadeonly = false )
- {
+ function __construct( $form, $conds = array(), $type, $level, $namespace,
+ $sizetype = '', $size = 0, $indefonly = false, $cascadeonly = false
+ ) {
$this->mForm = $form;
$this->mConds = $conds;
$this->type = ( $type ) ? $type : 'edit';
$lb->add( $row->page_namespace, $row->page_title );
}
$lb->execute();
+
return '';
}
function getQueryInfo() {
$conds = $this->mConds;
$conds[] = '(pr_expiry>' . $this->mDb->addQuotes( $this->mDb->timestamp() ) .
- 'OR pr_expiry IS NULL)';
+ 'OR pr_expiry IS NULL)';
$conds[] = 'page_id=pr_page';
$conds[] = 'pr_type=' . $this->mDb->addQuotes( $this->type );
}
if ( $this->indefonly ) {
- $conds[] = "pr_expiry = {$this->mDb->addQuotes( $this->mDb->getInfinity() )} OR pr_expiry IS NULL";
+ $infinity = $this->mDb->addQuotes( $this->mDb->getInfinity() );
+ $conds[] = "pr_expiry = $infinity OR pr_expiry IS NULL";
}
if ( $this->cascadeonly ) {
$conds[] = 'pr_cascade = 1';
if ( !is_null( $this->namespace ) ) {
$conds[] = 'page_namespace=' . $this->mDb->addQuotes( $this->namespace );
}
+
return array(
'tables' => array( 'page_restrictions', 'page' ),
'fields' => array( 'pr_id', 'page_namespace', 'page_title', 'page_len',
* @ingroup SpecialPage
*/
class SpecialProtectedtitles extends SpecialPage {
-
protected $IdLevel = 'level';
protected $IdType = 'type';
if ( $pager->getNumRows() ) {
$this->getOutput()->addHTML(
$pager->getNavigationBar() .
- '<ul>' . $pager->getBody() . '</ul>' .
- $pager->getNavigationBar()
+ '<ul>' . $pager->getBody() . '</ul>' .
+ $pager->getNavigationBar()
);
} else {
$this->getOutput()->addWikiMsg( 'protectedtitlesempty' );
$title = Title::makeTitleSafe( $row->pt_namespace, $row->pt_title );
if ( !$title ) {
wfProfileOut( __METHOD__ );
- return Html::rawElement( 'li', array(),
- Html::element( 'span', array( 'class' => 'mw-invalidtitle' ),
- Linker::getInvalidTitleDescription( $this->getContext(), $row->pt_namespace, $row->pt_title ) ) ) . "\n";
+
+ return Html::rawElement(
+ 'li',
+ array(),
+ Html::element(
+ 'span',
+ array( 'class' => 'mw-invalidtitle' ),
+ Linker::getInvalidTitleDescription(
+ $this->getContext(),
+ $row->pt_namespace,
+ $row->pt_title
+ )
+ )
+ ) . "\n";
}
$link = Linker::link( $title );
-
$description_items = array();
-
$protType = $this->msg( 'restriction-level-' . $row->pt_create_perm )->escaped();
-
$description_items[] = $protType;
-
$lang = $this->getLanguage();
- $expiry = strlen( $row->pt_expiry ) ? $lang->formatExpiry( $row->pt_expiry, TS_MW ) : $infinity;
+ $expiry = strlen( $row->pt_expiry ) ?
+ $lang->formatExpiry( $row->pt_expiry, TS_MW ) :
+ $infinity;
+
if ( $expiry != $infinity ) {
$user = $this->getUser();
$description_items[] = $this->msg(
wfProfileOut( __METHOD__ );
+ // @todo i18n: This should use a comma separator instead of a hard coded comma, right?
return '<li>' . $lang->specialList( $link, implode( $description_items, ', ' ) ) . "</li>\n";
}
$action = htmlspecialchars( $wgScript );
$title = $this->getTitle();
$special = htmlspecialchars( $title->getPrefixedDBkey() );
+
return "<form action=\"$action\" method=\"get\">\n" .
'<fieldset>' .
Xml::element( 'legend', array(), $this->msg( 'protectedtitles' )->text() ) .
function getLevelMenu( $pr_level ) {
global $wgRestrictionLevels;
- $m = array( $this->msg( 'restriction-level-all' )->text() => 0 ); // Temporary array
+ // Temporary array
+ $m = array( $this->msg( 'restriction-level-all' )->text() => 0 );
$options = array();
// First pass to load the log names
$m[$text] = $type;
}
}
+
// Is there only one level (aside from "all")?
if ( count( $m ) <= 2 ) {
return '';
class ProtectedTitlesPager extends AlphabeticPager {
public $mForm, $mConds;
- function __construct( $form, $conds = array(), $type, $level, $namespace, $sizetype = '', $size = 0 ) {
+ function __construct( $form, $conds = array(), $type, $level, $namespace,
+ $sizetype = '', $size = 0
+ ) {
$this->mForm = $form;
$this->mConds = $conds;
$this->level = $level;
$lb->execute();
wfProfileOut( __METHOD__ );
+
return '';
}
if ( $this->level ) {
$conds['pt_create_perm'] = $this->level;
}
+
if ( !is_null( $this->namespace ) ) {
$conds[] = 'pt_namespace=' . $this->mDb->addQuotes( $this->namespace );
}
+
return array(
'tables' => 'protected_titles',
'fields' => array( 'pt_namespace', 'pt_title', 'pt_create_perm',
$this->setHeaders();
$this->getOutput()->addWikiMsg( strtolower( $this->getName() ) . '-nopages',
$this->getNsList(), count( $this->namespaces ) );
+
return;
}
$nsNames[] = $wgContLang->getNsText( $n );
}
}
+
return $wgContLang->commaList( $nsNames );
}
public function getRandomTitle() {
$randstr = wfRandom();
$title = null;
- if ( !wfRunHooks( 'SpecialRandomGetRandomTitle', array( &$randstr, &$this->isRedir, &$this->namespaces,
- &$this->extra, &$title ) ) ) {
+
+ if ( !wfRunHooks(
+ 'SpecialRandomGetRandomTitle',
+ array( &$randstr, &$this->isRedir, &$this->namespaces, &$this->extra, &$title )
+ ) ) {
return $title;
}
+
$row = $this->selectRandomPageFromDB( $randstr );
/* If we picked a value that was higher than any in
if ( $row ) {
return Title::makeTitleSafe( $row->page_namespace, $row->page_title );
- } else {
- return null;
}
+
+ return null;
}
protected function getQueryInfo( $randstr ) {
parent::__construct( 'Randomredirect' );
$this->isRedir = true;
}
-
}
$opts->add( 'categories', '' );
$opts->add( 'categories_any', false );
$opts->add( 'tagfilter', '' );
+
return $opts;
}
}
$opts->validateIntBounds( 'limit', 0, 5000 );
+
return $opts;
}
$this->customFilters = array();
wfRunHooks( 'SpecialRecentChangesFilters', array( $this, &$this->customFilters ) );
}
+
return $this->customFilters;
}
$opts = $this->getDefaultOptions();
$opts->fetchValuesFromRequest( $this->getRequest() );
$opts->validateIntBounds( 'limit', 0, $wgFeedLimit );
+
return $opts;
}
}
$this->rcOptions = $isFeed ? $this->feedSetup() : $this->setup( $this->rcSubpage );
}
+
return $this->rcOptions;
}
if ( !$this->including() ) {
$this->doHeader( $opts );
}
+
return;
}
$this->msg( 'recentchanges-feed-description' )->inContentLanguage()->text(),
$this->getTitle()->getFullURL()
);
+
return array( $changesFeed, $formatter );
}
return false;
}
}
+
return $lastmod;
}
# Namespace filtering
if ( $opts['namespace'] !== '' ) {
$selectedNS = $dbr->addQuotes( $opts['namespace'] );
- $operator = $opts['invert'] ? '!=' : '=';
+ $operator = $opts['invert'] ? '!=' : '=';
$boolean = $opts['invert'] ? 'AND' : 'OR';
# namespace association (bug 2429)
$conds[] = $condition;
}
+
return $conds;
}
'wl_user' => $uid,
'wl_title=rc_title',
'wl_namespace=rc_namespace'
- ));
+ ) );
}
if ( $this->getUser()->isAllowed( 'rollback' ) ) {
$tables[] = 'page';
);
if ( !wfRunHooks( 'SpecialRecentChangesQuery',
- array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ) ) )
- {
+ array( &$conds, &$tables, &$join_conds, $opts, &$query_options, &$fields ) )
+ ) {
return false;
}
if ( $namespace === ''
|| ( $invert || $associated )
|| $opts['tagfilter'] != ''
- || !$dbr->unionSupportsOrderAndLimit() )
- {
+ || !$dbr->unionSupportsOrderAndLimit()
+ ) {
$res = $dbr->select( $tables, $fields, $conds, __METHOD__,
array( 'ORDER BY' => 'rc_timestamp DESC', 'LIMIT' => $limit ) +
- $query_options,
+ $query_options,
$join_conds );
- // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
} else {
+ // We have a new_namespace_time index! UNION over new=(0,1) and sort result set!
+
// New pages
$sqlNew = $dbr->selectSQLText(
$tables,
),
$join_conds
);
+
// Old pages
$sqlOld = $dbr->selectSQLText(
$tables,
),
$join_conds
);
+
# Join the two fast queries, and sort the result set
$sql = $dbr->unionQueries( array( $sqlNew, $sqlOld ), false ) .
' ORDER BY rc_timestamp DESC';
$this->filterByCategories( $rows, $opts );
}
- $showWatcherCount = $wgRCShowWatchingUsers && $this->getUser()->getOption( 'shownumberswatching' );
+ $showNumsWachting = $this->getUser()->getOption( 'shownumberswatching' );
+ $showWatcherCount = $wgRCShowWatchingUsers && $showNumsWachting;
$watcherCache = array();
$dbr = wfGetDB( DB_SLAVE );
$out .= Xml::openElement( 'tr' );
if ( is_array( $optionRow ) ) {
- $out .= Xml::tags( 'td', array( 'class' => 'mw-label mw-' . $name . '-label' ), $optionRow[0] );
- $out .= Xml::tags( 'td', array( 'class' => 'mw-input' ), $optionRow[1] . $addSubmit );
+ $out .= Xml::tags(
+ 'td',
+ array( 'class' => 'mw-label mw-' . $name . '-label' ),
+ $optionRow[0]
+ );
+ $out .= Xml::tags(
+ 'td',
+ array( 'class' => 'mw-input' ),
+ $optionRow[1] . $addSubmit
+ );
} else {
- $out .= Xml::tags( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ), $optionRow . $addSubmit );
+ $out .= Xml::tags(
+ 'td',
+ array( 'class' => 'mw-input', 'colspan' => 2 ),
+ $optionRow . $addSubmit
+ );
}
$out .= Xml::closeElement( 'tr' );
}
$panelString = implode( "\n", $panel );
$this->getOutput()->addHTML(
- Xml::fieldset( $this->msg( 'recentchanges-legend' )->text(), $panelString, array( 'class' => 'rcoptions' ) )
+ Xml::fieldset(
+ $this->msg( 'recentchanges-legend' )->text(),
+ $panelString,
+ array( 'class' => 'rcoptions' )
+ )
);
$this->setBottomText( $opts );
}
wfRunHooks( 'SpecialRecentChangesPanel', array( &$extraOpts, $opts ) );
+
return $extraOpts;
}
*
* @param FormOptions $opts
*/
- function setBottomText( FormOptions $opts ) {}
+ function setBottomText( FormOptions $opts ) {
+ }
/**
* Creates the choose namespace selection
$opts['associated'],
array( 'title' => $this->msg( 'tooltip-namespace_association' )->text() )
);
+
return array( $nsLabel, "$nsSelect $invert $associated" );
}
if ( $active ) {
$text = '<strong>' . $text . '</strong>';
}
+
return Linker::linkKnown( $this->getTitle(), $text, array(), $params );
}
$now, array( 'from' => $timestamp ), $nondefaults
);
- $rclinks = $this->msg( 'rclinks' )->rawParams( $cl, $dl, $lang->pipeList( $links ) )->parse();
+ $rclinks = $this->msg( 'rclinks' )->rawParams( $cl, $dl, $lang->pipeList( $links ) )
+ ->parse();
$rclistfrom = $this->msg( 'rclistfrom' )->rawParams( $tl )->parse();
+
return "{$note}$rclinks<br />$rclistfrom";
}
/**
- * add javascript specific to the [[Special:RecentChanges]] page
+ * Add JavaScript to the page
*/
function addRecentChangesJS() {
$this->getOutput()->addModules( array(