42 parent::__construct( $form->getContext() );
48 $rcQuery = RecentChange::getQueryInfo();
53 $namespace = $this->opts->getValue(
'namespace' );
54 $namespace = ( $namespace ===
'all' ) ?
false : intval( $namespace );
56 $username = $this->opts->getValue(
'username' );
59 $size = abs( intval( $this->opts->getValue(
'size' ) ) );
61 if ( $this->opts->getValue(
'size-mode' ) ===
'max' ) {
62 $conds[] =
'page_len <= ' . $size;
64 $conds[] =
'page_len >= ' . $size;
68 if ( $namespace !==
false ) {
69 if ( $this->opts->getValue(
'invert' ) ) {
70 $conds[] =
'rc_namespace != ' . $this->mDb->addQuotes( $namespace );
72 $conds[
'rc_namespace'] = $namespace;
77 $conds[] = ActorMigration::newMigration()->getWhere(
81 $this->opts->getValue(
'hideliu' )
83 # If anons cannot make new pages, don't "exclude logged in users"!
84 $conds[] = ActorMigration::newMigration()->isAnon( $rcQuery[
'fields'][
'rc_user'] );
87 # If this user cannot see patrolled edits or they are off, don't do dumb queries!
88 if ( $this->opts->getValue(
'hidepatrolled' ) && $this->getUser()->useNPPatrol() ) {
89 $conds[
'rc_patrolled'] = RecentChange::PRC_UNPATROLLED;
92 if ( $this->opts->getValue(
'hidebots' ) ) {
96 if ( $this->opts->getValue(
'hideredirs' ) ) {
97 $conds[
'page_is_redirect'] = 0;
101 $tables = array_merge( $rcQuery[
'tables'], [
'page' ] );
102 $fields = array_merge( $rcQuery[
'fields'], [
103 'length' =>
'page_len',
'rev_id' =>
'page_latest',
'page_namespace',
'page_title'
105 $join_conds = [
'page' => [
'JOIN',
'page_id=rc_cur_id' ] ] + $rcQuery[
'joins'];
109 Hooks::run(
'SpecialNewpagesConditions',
110 [ &$pager, $this->opts, &$conds, &
$tables, &$fields, &$join_conds ] );
117 'join_conds' => $join_conds
127 $this->opts[
'tagfilter']
134 return 'rc_timestamp';
138 return $this->mForm->formatRow( $row );
142 # Do a batch existence check on pages
144 foreach ( $this->mResult
as $row ) {
145 $linkBatch->add(
NS_USER, $row->rc_user_text );
147 $linkBatch->add( $row->page_namespace, $row->page_title );
149 $linkBatch->execute();
Class representing a list of titles The execute() method checks them all for existence and adds them ...
A special page that list newly created pages.
static newFromName( $name, $validate='valid')
Static factory method for creation from username.
static groupHasPermission( $group, $role)
Check, if the given group has the given permission.
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
this hook is for auditing only RecentChangesLinked and Watchlist Do not use this to implement individual filters if they are compatible with the ChangesListFilter and ChangesListFilterGroup structure use sub classes of those in conjunction with the ChangesListSpecialPageStructuredFilters hook This hook can be used to implement filters that do not implement that or custom behavior that is not an individual filter e g Watchlist & $tables
this hook is for auditing only or null if authentication failed before getting that far $username
return true to allow those checks to and false if checking is done & $user
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php