Go to the documentation of this file.
62 $conds =
array(), $year =
false, $month =
false, $tagFilter =
'' ) {
63 parent::__construct( $list->getContext() );
64 $this->mConds = $conds;
66 $this->mLogEventsList = $list;
72 $this->mTagFilter = $tagFilter;
78 $query = parent::getDefaultQuery();
91 if ( count( $this->types ) ) {
94 foreach ( $wgFilterLogTypes
as $type => $default ) {
96 if (
$type !==
'patrol' || $this->
getUser()->useNPPatrol() ) {
97 $hide = $this->
getRequest()->getInt(
"hide_{$type}_log", $default );
98 $filters[
$type] = $hide;
100 $this->mConds[] =
'log_type != ' . $this->mDb->addQuotes(
$type );
116 global $wgLogRestrictions;
122 $needReindex =
false;
124 if ( isset( $wgLogRestrictions[
$type] )
125 && !
$user->isAllowed( $wgLogRestrictions[
$type] )
131 if ( $needReindex ) {
139 $audience =
$types ?
'user' :
'public';
141 if ( $hideLogs !==
false ) {
142 $this->mConds[] = $hideLogs;
145 $this->mConds[
'log_type'] =
$types;
147 if ( count(
$types ) == 1 ) {
148 $this->typeCGI =
$types[0];
164 if ( is_null( $usertitle ) ) {
172 $this->mConds[
'log_user'] = $userid;
176 if ( !
$user->isAllowed(
'deletedhistory' ) ) {
178 } elseif ( !
$user->isAllowed(
'suppressrevision' ) ) {
183 $this->performer = $usertitle->getText();
197 if ( $page instanceof
Title ) {
201 if ( strlen( $page ) == 0 || !
$title instanceof
Title ) {
210 # Using the (log_namespace, log_title, log_timestamp) index with a
211 # range scan (LIKE) on the first two parts, instead of simple equality,
212 # makes it unusable for sorting. Sorted retrieval using another index
213 # would be possible, but then we might have to scan arbitrarily many
214 # nodes of that index. Therefore, we need to avoid this if $wgMiserMode
217 # This is not a problem with simple title matches, because then we can
218 # use the page_time index. That should have no more than a few hundred
219 # log entries for even the busiest pages, so it can be safely scanned
220 # in full to satisfy an impossible condition on user or similar.
222 $this->mConds[
'log_namespace'] = $ns;
223 $this->mConds[] =
'log_title ' . $db->buildLike(
$title->
getDBkey(), $db->anyString() );
226 $this->mConds[
'log_namespace'] = $ns;
231 if ( !
$user->isAllowed(
'deletedhistory' ) ) {
233 } elseif ( !
$user->isAllowed(
'suppressrevision' ) ) {
248 $fields = $basic[
'fields'];
249 $conds = $basic[
'conds'];
251 $joins = $basic[
'join_conds'];
254 # Add log_search table if there are conditions on it.
255 # This filters the results to only include log rows that have
256 # log_search records with the specified ls_field and ls_value values.
257 if ( array_key_exists(
'ls_field', $this->mConds ) ) {
259 $index[
'log_search'] =
'ls_field_val';
260 $index[
'logging'] =
'PRIMARY';
264 # Since (ls_field,ls_value,ls_logid) is unique, if the condition is
265 # to match a specific (ls_field,ls_value) tuple, then there will be
266 # no duplicate log rows. Otherwise, we need to remove the duplicates.
270 if ( count( $index ) ) {
273 # Don't show duplicate rows when using log_search
274 $joins[
'log_search'] =
array(
'INNER JOIN',
'ls_log_id=log_id' );
279 'conds' => array_merge( $conds, $this->mConds ),
281 'join_conds' => $joins,
283 # Add ChangeTags filter query
285 $info[
'join_conds'], $info[
'options'], $this->mTagFilter );
297 array_key_exists( $field, $this->mConds ) &&
298 ( !is_array( $this->mConds[$field] ) || count( $this->mConds[$field] ) == 1 )
303 return 'log_timestamp';
308 # Do a link batch query
311 foreach ( $this->mResult
as $row ) {
312 $lb->add( $row->log_namespace, $row->log_title );
316 foreach ( $formatter->getPreloadTitles()
as $title ) {
321 $this->mResult->seek( 0 );
329 return $this->mLogEventsList->logLine( $row );
363 return $this->mTagFilter;
368 $this->mDb->setBigSelects();
370 $this->mDb->setBigSelects(
'default' );
static newFromText( $text, $defaultNamespace=NS_MAIN)
Create a new Title from text, such as what one would find in a link.
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Class representing a list of titles The execute() method checks them all for existence and adds them ...
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist & $tables
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
static getSelectQueryData()
Returns array of information that is needed for querying log entries.
wfProfileIn( $functionname)
Begin profiling of a function.
getPrefixedText()
Get the prefixed title with spaces.
getRequest()
Get the WebRequest object.
getUser()
Get the User object.
to move a page</td >< td > &*You are moving the page across *A non empty talk page already exists under the new or *You uncheck the box below In those you will have to move or merge the page manually if desired</td >< td > be sure to &You are responsible for making sure that links continue to point where they are supposed to go Note that the page will &a page at the new title
if( $wgAPIRequestLog) $lb
getDBkey()
Get the main part with underscores.
getNamespace()
Get the namespace index, i.e.
wfProfileOut( $functionname='missing')
Stop profiling of a function.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
static makeTitleSafe( $ns, $title, $fragment='', $interwiki='')
Create a new Title from a namespace index and a DB key.
Allows to change the fields on the form that will be generated $name
static getExcludeClause( $db, $audience='public', User $user=null)
SQL clause to skip forbidden log types for this user.
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a account $user
static sanitizeIP( $ip)
Convert an IP into a verbose, uppercase, normalized form.
Represents a title within MediaWiki.
static idFromName( $name)
Get database id given a user name.
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
return true to allow those checks to and false if checking is done use this to change the tables headers temp or archived zone change it to an object instance and return false override the list derivative used the name of the old file when set the default code will be skipped add a value to it if you want to add a cookie that have to vary cache options can modify $query