MediaWiki  1.23.16
SpecialWatchlist.php
Go to the documentation of this file.
1 <?php
31  public function __construct( $page = 'Watchlist', $restriction = 'viewmywatchlist' ) {
32  parent::__construct( $page, $restriction );
33  }
34 
40  function execute( $subpage ) {
41  global $wgEnotifWatchlist, $wgShowUpdatedMarker;
42 
43  // Anons don't get a watchlist
44  $this->requireLogin( 'watchlistanontext' );
45 
46  $output = $this->getOutput();
47  $request = $this->getRequest();
48 
49  $mode = SpecialEditWatchlist::getMode( $request, $subpage );
50  if ( $mode !== false ) {
51  if ( $mode === SpecialEditWatchlist::EDIT_RAW ) {
52  $title = SpecialPage::getTitleFor( 'EditWatchlist', 'raw' );
53  } elseif ( $mode === SpecialEditWatchlist::EDIT_CLEAR ) {
54  $title = SpecialPage::getTitleFor( 'EditWatchlist', 'clear' );
55  } else {
56  $title = SpecialPage::getTitleFor( 'EditWatchlist' );
57  }
58 
59  $output->redirect( $title->getLocalURL() );
60 
61  return;
62  }
63 
64  $this->checkPermissions();
65 
66  $user = $this->getUser();
67  $opts = $this->getOptions();
68 
69  if ( ( $wgEnotifWatchlist || $wgShowUpdatedMarker )
70  && $request->getVal( 'reset' )
71  && $request->wasPosted()
72  && $user->matchEditToken( $request->getVal( 'token' ) )
73  ) {
74  $user->clearAllNotifications();
75  $output->redirect( $this->getPageTitle()->getFullURL( $opts->getChangedValues() ) );
76 
77  return;
78  }
79 
80  parent::execute( $subpage );
81  }
82 
88  public function getDefaultOptions() {
89  $opts = parent::getDefaultOptions();
90  $user = $this->getUser();
91 
92  $opts->add( 'days', $user->getOption( 'watchlistdays' ), FormOptions::FLOAT );
93 
94  $opts->add( 'hideminor', $user->getBoolOption( 'watchlisthideminor' ) );
95  $opts->add( 'hidebots', $user->getBoolOption( 'watchlisthidebots' ) );
96  $opts->add( 'hideanons', $user->getBoolOption( 'watchlisthideanons' ) );
97  $opts->add( 'hideliu', $user->getBoolOption( 'watchlisthideliu' ) );
98  $opts->add( 'hidepatrolled', $user->getBoolOption( 'watchlisthidepatrolled' ) );
99  $opts->add( 'hidemyself', $user->getBoolOption( 'watchlisthideown' ) );
100 
101  $opts->add( 'extended', $user->getBoolOption( 'extendwatchlist' ) );
102 
103  return $opts;
104  }
105 
111  protected function getCustomFilters() {
112  if ( $this->customFilters === null ) {
113  $this->customFilters = parent::getCustomFilters();
114  wfRunHooks( 'SpecialWatchlistFilters', array( $this, &$this->customFilters ), '1.23' );
115  }
116 
117  return $this->customFilters;
118  }
119 
129  protected function fetchOptionsFromRequest( $opts ) {
130  static $compatibilityMap = array(
131  'hideMinor' => 'hideminor',
132  'hideBots' => 'hidebots',
133  'hideAnons' => 'hideanons',
134  'hideLiu' => 'hideliu',
135  'hidePatrolled' => 'hidepatrolled',
136  'hideOwn' => 'hidemyself',
137  );
138 
139  $params = $this->getRequest()->getValues();
140  foreach ( $compatibilityMap as $from => $to ) {
141  if ( isset( $params[$from] ) ) {
142  $params[$to] = $params[$from];
143  unset( $params[$from] );
144  }
145  }
146 
147  // Not the prettiest way to achieve this… FormOptions internally depends on data sanitization
148  // methods defined on WebRequest and removing this dependency would cause some code duplication.
149  $request = new DerivativeRequest( $this->getRequest(), $params );
150  $opts->fetchValuesFromRequest( $request );
151 
152  return $opts;
153  }
154 
161  public function buildMainQueryConds( FormOptions $opts ) {
162  $dbr = $this->getDB();
163  $conds = parent::buildMainQueryConds( $opts );
164 
165  // Calculate cutoff
166  if ( $opts['days'] > 0 ) {
167  $conds[] = 'rc_timestamp > ' .
168  $dbr->addQuotes( $dbr->timestamp( time() - intval( $opts['days'] * 86400 ) ) );
169  }
170 
171  return $conds;
172  }
173 
181  public function doMainQuery( $conds, $opts ) {
182  global $wgShowUpdatedMarker;
183 
184  $dbr = $this->getDB();
185  $user = $this->getUser();
186 
187  # Toggle watchlist content (all recent edits or just the latest)
188  if ( $opts['extended'] ) {
189  $limitWatchlist = $user->getIntOption( 'wllimit' );
190  $usePage = false;
191  } else {
192  # Top log Ids for a page are not stored
193  $nonRevisionTypes = array( RC_LOG );
194  wfRunHooks( 'SpecialWatchlistGetNonRevisionTypes', array( &$nonRevisionTypes ) );
195  if ( $nonRevisionTypes ) {
196  $conds[] = $dbr->makeList(
197  array(
198  'rc_this_oldid=page_latest',
199  'rc_type' => $nonRevisionTypes,
200  ),
201  LIST_OR
202  );
203  }
204  $limitWatchlist = 0;
205  $usePage = true;
206  }
207 
208  $tables = array( 'recentchanges', 'watchlist' );
209  $fields = RecentChange::selectFields();
210  $query_options = array( 'ORDER BY' => 'rc_timestamp DESC' );
211  $join_conds = array(
212  'watchlist' => array(
213  'INNER JOIN',
214  array(
215  'wl_user' => $user->getId(),
216  'wl_namespace=rc_namespace',
217  'wl_title=rc_title'
218  ),
219  ),
220  );
221 
222  if ( $wgShowUpdatedMarker ) {
223  $fields[] = 'wl_notificationtimestamp';
224  }
225  if ( $limitWatchlist ) {
226  $query_options['LIMIT'] = $limitWatchlist;
227  }
228 
229  $rollbacker = $user->isAllowed( 'rollback' );
230  if ( $usePage || $rollbacker ) {
231  $tables[] = 'page';
232  $join_conds['page'] = array( 'LEFT JOIN', 'rc_cur_id=page_id' );
233  if ( $rollbacker ) {
234  $fields[] = 'page_latest';
235  }
236  }
237 
238  // Log entries with DELETED_ACTION must not show up unless the user has
239  // the necessary rights.
240  if ( !$user->isAllowed( 'deletedhistory' ) ) {
241  $bitmask = LogPage::DELETED_ACTION;
242  } elseif ( !$user->isAllowed( 'suppressrevision' ) ) {
244  } else {
245  $bitmask = 0;
246  }
247  if ( $bitmask ) {
248  $conds[] = $dbr->makeList( array(
249  'rc_type != ' . RC_LOG,
250  $dbr->bitAnd( 'rc_deleted', $bitmask ) . " != $bitmask",
251  ), LIST_OR );
252  }
253 
255  $tables,
256  $fields,
257  $conds,
258  $join_conds,
259  $query_options,
260  ''
261  );
262 
263  wfRunHooks( 'SpecialWatchlistQuery',
264  array( &$conds, &$tables, &$join_conds, &$fields, $opts ),
265  '1.23' );
266 
267  return $dbr->select(
268  $tables,
269  $fields,
270  $conds,
271  __METHOD__,
272  $query_options,
273  $join_conds
274  );
275  }
276 
282  protected function getDB() {
283  return wfGetDB( DB_SLAVE, 'watchlist' );
284  }
285 
289  public function outputFeedLinks() {
290  $user = $this->getUser();
291  $wlToken = $user->getTokenFromOption( 'watchlisttoken' );
292  if ( $wlToken ) {
293  $this->addFeedLinks( array(
294  'action' => 'feedwatchlist',
295  'allrev' => 1,
296  'wlowner' => $user->getName(),
297  'wltoken' => $wlToken,
298  ) );
299  }
300  }
301 
308  public function outputChangesList( $rows, $opts ) {
309  global $wgShowUpdatedMarker, $wgRCShowWatchingUsers;
310 
311  $dbr = $this->getDB();
312  $user = $this->getUser();
313  $output = $this->getOutput();
314 
315  # Show a message about slave lag, if applicable
316  $lag = wfGetLB()->safeGetLag( $dbr );
317  if ( $lag > 0 ) {
318  $output->showLagWarning( $lag );
319  }
320 
321  # If no rows to display, show message before try to render the list
322  if ( $rows->numRows() == 0 ) {
323  $output->wrapWikiMsg(
324  "<div class='mw-changeslist-empty'>\n$1\n</div>", 'recentchanges-noresult'
325  );
326  return;
327  }
328 
329  $dbr->dataSeek( $rows, 0 );
330 
331  $list = ChangesList::newFromContext( $this->getContext() );
332  $list->setWatchlistDivs();
333  $list->initChangesListRows( $rows );
334  $dbr->dataSeek( $rows, 0 );
335 
336  $s = $list->beginRecentChangesList();
337  $counter = 1;
338  foreach ( $rows as $obj ) {
339  # Make RC entry
340  $rc = RecentChange::newFromRow( $obj );
341  $rc->counter = $counter++;
342 
343  if ( $wgShowUpdatedMarker ) {
344  $updated = $obj->wl_notificationtimestamp;
345  } else {
346  $updated = false;
347  }
348 
349  if ( $wgRCShowWatchingUsers && $user->getOption( 'shownumberswatching' ) ) {
350  $rc->numberofWatchingusers = $dbr->selectField( 'watchlist',
351  'COUNT(*)',
352  array(
353  'wl_namespace' => $obj->rc_namespace,
354  'wl_title' => $obj->rc_title,
355  ),
356  __METHOD__ );
357  } else {
358  $rc->numberofWatchingusers = 0;
359  }
360 
361  $changeLine = $list->recentChangesLine( $rc, $updated, $counter );
362  if ( $changeLine !== false ) {
363  $s .= $changeLine;
364  }
365  }
366  $s .= $list->endRecentChangesList();
367 
368  $output->addHTML( $s );
369  }
370 
377  public function doHeader( $opts, $numRows ) {
378  $user = $this->getUser();
379 
380  $this->getOutput()->addSubtitle(
381  $this->msg( 'watchlistfor2', $user->getName() )
382  ->rawParams( SpecialEditWatchlist::buildTools( null ) )
383  );
384 
385  $this->setTopText( $opts );
386 
387  $lang = $this->getLanguage();
388  $wlInfo = '';
389  if ( $opts['days'] > 0 ) {
391  $wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, round( $opts['days'] * 24 ) )->params(
392  $lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user )
393  )->parse() . "<br />\n";
394  }
395 
396  $nondefaults = $opts->getChangedValues();
397  $cutofflinks = $this->cutoffLinks( $opts['days'], $nondefaults ) . "<br />\n";
398 
399  # Spit out some control panel links
400  $filters = array(
401  'hideminor' => 'rcshowhideminor',
402  'hidebots' => 'rcshowhidebots',
403  'hideanons' => 'rcshowhideanons',
404  'hideliu' => 'rcshowhideliu',
405  'hidemyself' => 'rcshowhidemine',
406  'hidepatrolled' => 'rcshowhidepatr'
407  );
408  foreach ( $this->getCustomFilters() as $key => $params ) {
409  $filters[$key] = $params['msg'];
410  }
411  // Disable some if needed
412  if ( !$user->useNPPatrol() ) {
413  unset( $filters['hidepatrolled'] );
414  }
415 
416  $links = array();
417  foreach ( $filters as $name => $msg ) {
418  $links[] = $this->showHideLink( $nondefaults, $msg, $name, $opts[$name] );
419  }
420 
421  $hiddenFields = $nondefaults;
422  unset( $hiddenFields['namespace'] );
423  unset( $hiddenFields['invert'] );
424  unset( $hiddenFields['associated'] );
425 
426  # Create output
427  $form = '';
428 
429  # Namespace filter and put the whole form together.
430  $form .= $wlInfo;
431  $form .= $cutofflinks;
432  $form .= $lang->pipeList( $links ) . "\n";
433  $form .= "<hr />\n<p>";
435  array(
436  'selected' => $opts['namespace'],
437  'all' => '',
438  'label' => $this->msg( 'namespace' )->text()
439  ), array(
440  'name' => 'namespace',
441  'id' => 'namespace',
442  'class' => 'namespaceselector',
443  )
444  ) . '&#160;';
446  $this->msg( 'invert' )->text(),
447  'invert',
448  'nsinvert',
449  $opts['invert'],
450  array( 'title' => $this->msg( 'tooltip-invert' )->text() )
451  ) . '&#160;';
453  $this->msg( 'namespace_association' )->text(),
454  'associated',
455  'nsassociated',
456  $opts['associated'],
457  array( 'title' => $this->msg( 'tooltip-namespace_association' )->text() )
458  ) . '&#160;';
459  $form .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "</p>\n";
460  foreach ( $hiddenFields as $key => $value ) {
461  $form .= Html::hidden( $key, $value ) . "\n";
462  }
463  $form .= Xml::closeElement( 'fieldset' ) . "\n";
464  $form .= Xml::closeElement( 'form' ) . "\n";
465  $this->getOutput()->addHTML( $form );
466 
467  $this->setBottomText( $opts );
468  }
469 
470  function setTopText( FormOptions $opts ) {
471  global $wgEnotifWatchlist, $wgShowUpdatedMarker;
472 
473  $nondefaults = $opts->getChangedValues();
474  $form = "";
475  $user = $this->getUser();
476 
477  $dbr = $this->getDB();
478  $numItems = $this->countItems( $dbr );
479 
480  // Show watchlist header
481  $form .= "<p>";
482  if ( $numItems == 0 ) {
483  $form .= $this->msg( 'nowatchlist' )->parse() . "\n";
484  } else {
485  $form .= $this->msg( 'watchlist-details' )->numParams( $numItems )->parse() . "\n";
486  if ( $wgEnotifWatchlist && $user->getOption( 'enotifwatchlistpages' ) ) {
487  $form .= $this->msg( 'wlheader-enotif' )->parse() . "\n";
488  }
489  if ( $wgShowUpdatedMarker ) {
490  $form .= $this->msg( 'wlheader-showupdated' )->parse() . "\n";
491  }
492  }
493  $form .= "</p>";
494 
495  if ( $numItems > 0 && $wgShowUpdatedMarker ) {
496  $form .= Xml::openElement( 'form', array( 'method' => 'post',
497  'action' => $this->getPageTitle()->getLocalURL(),
498  'id' => 'mw-watchlist-resetbutton' ) ) . "\n" .
499  Xml::submitButton( $this->msg( 'enotif_reset' )->text(), array( 'name' => 'dummy' ) ) . "\n" .
500  Html::hidden( 'token', $user->getEditToken() ) . "\n" .
501  Html::hidden( 'reset', 'all' ) . "\n";
502  foreach ( $nondefaults as $key => $value ) {
503  $form .= Html::hidden( $key, $value ) . "\n";
504  }
505  $form .= Xml::closeElement( 'form' ) . "\n";
506  }
507 
508  $form .= Xml::openElement( 'form', array(
509  'method' => 'post',
510  'action' => $this->getPageTitle()->getLocalURL(),
511  'id' => 'mw-watchlist-form'
512  ) );
513  $form .= Xml::fieldset(
514  $this->msg( 'watchlist-options' )->text(),
515  false,
516  array( 'id' => 'mw-watchlist-options' )
517  );
518 
520 
521  $this->getOutput()->addHTML( $form );
522  }
523 
524  protected function showHideLink( $options, $message, $name, $value ) {
525  $label = $this->msg( $value ? 'show' : 'hide' )->escaped();
526  $options[$name] = 1 - (int)$value;
527 
528  return $this->msg( $message )
529  ->rawParams( Linker::linkKnown( $this->getPageTitle(), $label, array(), $options ) )
530  ->escaped();
531  }
532 
533  protected function hoursLink( $h, $options = array() ) {
534  $options['days'] = ( $h / 24.0 );
535 
536  return Linker::linkKnown(
537  $this->getPageTitle(),
538  $this->getLanguage()->formatNum( $h ),
539  array(),
540  $options
541  );
542  }
543 
544  protected function daysLink( $d, $options = array() ) {
545  $options['days'] = $d;
546  $message = $d ? $this->getLanguage()->formatNum( $d )
547  : $this->msg( 'watchlistall2' )->escaped();
548 
549  return Linker::linkKnown(
550  $this->getPageTitle(),
551  $message,
552  array(),
553  $options
554  );
555  }
556 
564  protected function cutoffLinks( $days, $options = array() ) {
565  $hours = array( 1, 2, 6, 12 );
566  $days = array( 1, 3, 7 );
567  $i = 0;
568  foreach ( $hours as $h ) {
569  $hours[$i++] = $this->hoursLink( $h, $options );
570  }
571  $i = 0;
572  foreach ( $days as $d ) {
573  $days[$i++] = $this->daysLink( $d, $options );
574  }
575 
576  return $this->msg( 'wlshowlast' )->rawParams(
577  $this->getLanguage()->pipeList( $hours ),
578  $this->getLanguage()->pipeList( $days ),
579  $this->daysLink( 0, $options ) )->parse();
580  }
581 
588  protected function countItems( $dbr ) {
589  # Fetch the raw count
590  $rows = $dbr->select( 'watchlist', array( 'count' => 'COUNT(*)' ),
591  array( 'wl_user' => $this->getUser()->getId() ), __METHOD__ );
592  $row = $dbr->fetchObject( $rows );
593  $count = $row->count;
594 
595  return floor( $count / 2 );
596  }
597 }
Xml\checkLabel
static checkLabel( $label, $name, $id, $checked=false, $attribs=array())
Convenience function to build an HTML checkbox with a label.
Definition: Xml.php:433
DerivativeRequest
Similar to FauxRequest, but only fakes URL parameters and method (POST or GET) and use the base reque...
Definition: WebRequest.php:1463
SpecialPage\getPageTitle
getPageTitle( $subpage=false)
Get a self-referential title object.
Definition: SpecialPage.php:488
SpecialEditWatchlist\EDIT_CLEAR
const EDIT_CLEAR
Editing modes.
Definition: SpecialEditWatchlist.php:42
$request
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled also a ContextSource error or success you ll probably need to make sure the header is varied on WebRequest $request
Definition: hooks.txt:1961
SpecialEditWatchlist\EDIT_RAW
const EDIT_RAW
Definition: SpecialEditWatchlist.php:43
ChangesList\newFromContext
static newFromContext(IContextSource $context)
Fetch an appropriate changes list class for the specified context Some users might want to use an enh...
Definition: ChangesList.php:61
SpecialWatchlist\doMainQuery
doMainQuery( $conds, $opts)
Process the query.
Definition: SpecialWatchlist.php:181
php
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
Definition: skin.txt:62
$tables
namespace and then decline to actually register it RecentChangesLinked and Watchlist RecentChangesLinked and Watchlist e g Watchlist & $tables
Definition: hooks.txt:815
FormOptions\FLOAT
const FLOAT
Float type, maps guessType() to WebRequest::getFloat()
Definition: FormOptions.php:48
SpecialPage\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition: SpecialPage.php:535
wfGetLB
wfGetLB( $wiki=false)
Get a load balancer object.
Definition: GlobalFunctions.php:3724
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3714
text
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
Definition: design.txt:12
$timestamp
if( $limit) $timestamp
Definition: importImages.php:104
$form
usually copyright or history_copyright This message must be in HTML not wikitext $subpages will be ignored and the rest of subPageSubtitle() will run. 'SkinTemplateBuildNavUrlsNav_urlsAfterPermalink' whether MediaWiki currently thinks this is a CSS JS page Hooks may change this value to override the return value of Title::isCssOrJsPage(). 'TitleIsAlwaysKnown' whether MediaWiki currently thinks this page is known isMovable() always returns false. $title whether MediaWiki currently thinks this page is movable Hooks may change this value to override the return value of Title::isMovable(). 'TitleIsWikitextPage' whether MediaWiki currently thinks this is a wikitext page Hooks may change this value to override the return value of Title::isWikitextPage() 'TitleMove' use UploadVerification and UploadVerifyFile instead $form
Definition: hooks.txt:2584
SpecialWatchlist\getDB
getDB()
Return a DatabaseBase object for reading.
Definition: SpecialWatchlist.php:282
RC_LOG
const RC_LOG
Definition: Defines.php:181
$from
$from
Definition: importImages.php:90
ChangesListSpecialPage
Special page which uses a ChangesList to show query results.
Definition: ChangesListSpecialPage.php:30
SpecialPage\checkPermissions
checkPermissions()
Checks if userCanExecute, and if not throws a PermissionsError.
Definition: SpecialPage.php:287
$params
$params
Definition: styleTest.css.php:40
SpecialEditWatchlist\buildTools
static buildTools( $unused)
Build a set of links for convenient navigation between watchlist viewing and editing modes.
Definition: SpecialEditWatchlist.php:689
$s
$s
Definition: mergeMessageFileList.php:156
SpecialPage\getTitleFor
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
Definition: SpecialPage.php:74
Html\hidden
static hidden( $name, $value, $attribs=array())
Convenience function to produce an input element with type=hidden.
Definition: Html.php:607
SpecialWatchlist\__construct
__construct( $page='Watchlist', $restriction='viewmywatchlist')
Definition: SpecialWatchlist.php:31
SpecialWatchlist\getDefaultOptions
getDefaultOptions()
Get a FormOptions object containing the default options.
Definition: SpecialWatchlist.php:88
SpecialPage\getLanguage
getLanguage()
Shortcut to get user's language.
Definition: SpecialPage.php:578
SpecialPage\requireLogin
requireLogin( $reasonMsg=null, $titleMsg=null)
If the user is not logged in, throws UserNotLoggedIn error.
Definition: SpecialPage.php:321
SpecialWatchlist\doHeader
doHeader( $opts, $numRows)
Set the text to be displayed above the changes.
Definition: SpecialWatchlist.php:377
Xml\openElement
static openElement( $element, $attribs=null)
This opens an XML element.
Definition: Xml.php:109
Linker\linkKnown
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
Definition: Linker.php:264
ChangesListSpecialPage\makeLegend
static makeLegend(IContextSource $context)
Return the legend displayed within the fieldset.
Definition: ChangesListSpecialPage.php:401
$dbr
$dbr
Definition: testCompression.php:48
LIST_OR
const LIST_OR
Definition: Defines.php:206
SpecialPage\addFeedLinks
addFeedLinks( $params)
Adds RSS/atom links.
Definition: SpecialPage.php:630
ChangeTags\modifyDisplayQuery
static modifyDisplayQuery(&$tables, &$fields, &$conds, &$join_conds, &$options, $filter_tag=false)
Applies all tags-related changes to a query.
Definition: ChangeTags.php:202
RecentChange\newFromRow
static newFromRow( $row)
Definition: RecentChange.php:95
wfRunHooks
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
Definition: GlobalFunctions.php:4066
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
SpecialPage\getUser
getUser()
Shortcut to get the User executing this instance.
Definition: SpecialPage.php:545
global
when a variable name is used in a it is silently declared as a new masking the global
Definition: design.txt:93
wfTimestampNow
wfTimestampNow()
Convenience function; returns MediaWiki timestamp for the present time.
Definition: GlobalFunctions.php:2561
LogPage\DELETED_ACTION
const DELETED_ACTION
Definition: LogPage.php:33
SpecialPage\getContext
getContext()
Gets the context this SpecialPage is executed in.
Definition: SpecialPage.php:508
SpecialWatchlist
A special page that lists last changes made to the wiki, limited to user-defined list of titles.
Definition: SpecialWatchlist.php:30
$options
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
Definition: hooks.txt:1530
execute
$batch execute()
$title
presenting them properly to the user as errors is done by the caller $title
Definition: hooks.txt:1324
SpecialWatchlist\execute
execute( $subpage)
Main execution point.
Definition: SpecialWatchlist.php:40
$name
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:336
SpecialEditWatchlist\getMode
static getMode( $request, $par)
Determine whether we are editing the watchlist, and if so, what kind of editing operation.
Definition: SpecialEditWatchlist.php:664
$value
$value
Definition: styleTest.css.php:45
SpecialPage\msg
msg()
Wrapper around wfMessage that sets the current context.
Definition: SpecialPage.php:609
SpecialPage\getRequest
getRequest()
Get the WebRequest being used for this instance.
Definition: SpecialPage.php:525
$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
Definition: hooks.txt:237
SpecialWatchlist\outputFeedLinks
outputFeedLinks()
Output feed links.
Definition: SpecialWatchlist.php:289
$count
$count
Definition: UtfNormalTest2.php:96
DB_SLAVE
const DB_SLAVE
Definition: Defines.php:55
SpecialWatchlist\countItems
countItems( $dbr)
Count the number of items on a user's watchlist.
Definition: SpecialWatchlist.php:588
RecentChange\selectFields
static selectFields()
Return the list of recentchanges fields that should be selected to create a new recentchanges object.
Definition: RecentChange.php:151
Xml\closeElement
static closeElement( $element)
Shortcut to close an XML element.
Definition: Xml.php:118
SpecialWatchlist\outputChangesList
outputChangesList( $rows, $opts)
Build and output the actual changes list.
Definition: SpecialWatchlist.php:308
SpecialWatchlist\hoursLink
hoursLink( $h, $options=array())
Definition: SpecialWatchlist.php:533
SpecialWatchlist\daysLink
daysLink( $d, $options=array())
Definition: SpecialWatchlist.php:544
SpecialWatchlist\buildMainQueryConds
buildMainQueryConds(FormOptions $opts)
Return an array of conditions depending of options set in $opts.
Definition: SpecialWatchlist.php:161
$output
& $output
Definition: hooks.txt:375
as
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
Definition: distributors.txt:9
Html\namespaceSelector
static namespaceSelector(array $params=array(), array $selectAttribs=array())
Build a drop-down box for selecting a namespace.
Definition: Html.php:652
Xml\submitButton
static submitButton( $value, $attribs=array())
Convenience function to build an HTML submit button.
Definition: Xml.php:463
LogPage\DELETED_RESTRICTED
const DELETED_RESTRICTED
Definition: LogPage.php:36
SpecialWatchlist\getCustomFilters
getCustomFilters()
Get custom show/hide filters.
Definition: SpecialWatchlist.php:111
FormOptions
Helper class to keep track of options when mixing links and form elements.
Definition: FormOptions.php:35
FormOptions\getChangedValues
getChangedValues()
Return options modified as an array ( name => value )
Definition: FormOptions.php:298
SpecialWatchlist\setTopText
setTopText(FormOptions $opts)
Send the text to be displayed before the options.
Definition: SpecialWatchlist.php:470
SpecialWatchlist\fetchOptionsFromRequest
fetchOptionsFromRequest( $opts)
Fetch values for a FormOptions object from the WebRequest associated with this instance.
Definition: SpecialWatchlist.php:129
ChangesListSpecialPage\setBottomText
setBottomText(FormOptions $opts)
Send the text to be displayed after the options.
Definition: ChangesListSpecialPage.php:377
ChangesListSpecialPage\getOptions
getOptions()
Get the current FormOptions for this request.
Definition: ChangesListSpecialPage.php:89
SpecialWatchlist\showHideLink
showHideLink( $options, $message, $name, $value)
Definition: SpecialWatchlist.php:524
ChangesListSpecialPage\$customFilters
array $customFilters
Definition: ChangesListSpecialPage.php:35
Xml\fieldset
static fieldset( $legend=false, $content=false, $attribs=array())
Shortcut for creating fieldsets.
Definition: Xml.php:563
SpecialWatchlist\cutoffLinks
cutoffLinks( $days, $options=array())
Returns html.
Definition: SpecialWatchlist.php:564