MediaWiki  1.23.0
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  ) {
73  $user->clearAllNotifications();
74  $output->redirect( $this->getPageTitle()->getFullURL( $opts->getChangedValues() ) );
75 
76  return;
77  }
78 
79  parent::execute( $subpage );
80  }
81 
87  public function getDefaultOptions() {
88  $opts = parent::getDefaultOptions();
89  $user = $this->getUser();
90 
91  $opts->add( 'days', $user->getOption( 'watchlistdays' ), FormOptions::FLOAT );
92 
93  $opts->add( 'hideminor', $user->getBoolOption( 'watchlisthideminor' ) );
94  $opts->add( 'hidebots', $user->getBoolOption( 'watchlisthidebots' ) );
95  $opts->add( 'hideanons', $user->getBoolOption( 'watchlisthideanons' ) );
96  $opts->add( 'hideliu', $user->getBoolOption( 'watchlisthideliu' ) );
97  $opts->add( 'hidepatrolled', $user->getBoolOption( 'watchlisthidepatrolled' ) );
98  $opts->add( 'hidemyself', $user->getBoolOption( 'watchlisthideown' ) );
99 
100  $opts->add( 'extended', $user->getBoolOption( 'extendwatchlist' ) );
101 
102  return $opts;
103  }
104 
110  protected function getCustomFilters() {
111  if ( $this->customFilters === null ) {
112  $this->customFilters = parent::getCustomFilters();
113  wfRunHooks( 'SpecialWatchlistFilters', array( $this, &$this->customFilters ), '1.23' );
114  }
115 
116  return $this->customFilters;
117  }
118 
128  protected function fetchOptionsFromRequest( $opts ) {
129  static $compatibilityMap = array(
130  'hideMinor' => 'hideminor',
131  'hideBots' => 'hidebots',
132  'hideAnons' => 'hideanons',
133  'hideLiu' => 'hideliu',
134  'hidePatrolled' => 'hidepatrolled',
135  'hideOwn' => 'hidemyself',
136  );
137 
138  $params = $this->getRequest()->getValues();
139  foreach ( $compatibilityMap as $from => $to ) {
140  if ( isset( $params[$from] ) ) {
141  $params[$to] = $params[$from];
142  unset( $params[$from] );
143  }
144  }
145 
146  // Not the prettiest way to achieve this… FormOptions internally depends on data sanitization
147  // methods defined on WebRequest and removing this dependency would cause some code duplication.
148  $request = new DerivativeRequest( $this->getRequest(), $params );
149  $opts->fetchValuesFromRequest( $request );
150 
151  return $opts;
152  }
153 
160  public function buildMainQueryConds( FormOptions $opts ) {
161  $dbr = $this->getDB();
162  $conds = parent::buildMainQueryConds( $opts );
163 
164  // Calculate cutoff
165  if ( $opts['days'] > 0 ) {
166  $conds[] = 'rc_timestamp > ' .
167  $dbr->addQuotes( $dbr->timestamp( time() - intval( $opts['days'] * 86400 ) ) );
168  }
169 
170  return $conds;
171  }
172 
180  public function doMainQuery( $conds, $opts ) {
181  global $wgShowUpdatedMarker;
182 
183  $dbr = $this->getDB();
184  $user = $this->getUser();
185 
186  # Toggle watchlist content (all recent edits or just the latest)
187  if ( $opts['extended'] ) {
188  $limitWatchlist = $user->getIntOption( 'wllimit' );
189  $usePage = false;
190  } else {
191  # Top log Ids for a page are not stored
192  $nonRevisionTypes = array( RC_LOG );
193  wfRunHooks( 'SpecialWatchlistGetNonRevisionTypes', array( &$nonRevisionTypes ) );
194  if ( $nonRevisionTypes ) {
195  $conds[] = $dbr->makeList(
196  array(
197  'rc_this_oldid=page_latest',
198  'rc_type' => $nonRevisionTypes,
199  ),
200  LIST_OR
201  );
202  }
203  $limitWatchlist = 0;
204  $usePage = true;
205  }
206 
207  $tables = array( 'recentchanges', 'watchlist' );
208  $fields = RecentChange::selectFields();
209  $query_options = array( 'ORDER BY' => 'rc_timestamp DESC' );
210  $join_conds = array(
211  'watchlist' => array(
212  'INNER JOIN',
213  array(
214  'wl_user' => $user->getId(),
215  'wl_namespace=rc_namespace',
216  'wl_title=rc_title'
217  ),
218  ),
219  );
220 
221  if ( $wgShowUpdatedMarker ) {
222  $fields[] = 'wl_notificationtimestamp';
223  }
224  if ( $limitWatchlist ) {
225  $query_options['LIMIT'] = $limitWatchlist;
226  }
227 
228  $rollbacker = $user->isAllowed( 'rollback' );
229  if ( $usePage || $rollbacker ) {
230  $tables[] = 'page';
231  $join_conds['page'] = array( 'LEFT JOIN', 'rc_cur_id=page_id' );
232  if ( $rollbacker ) {
233  $fields[] = 'page_latest';
234  }
235  }
236 
237  // Log entries with DELETED_ACTION must not show up unless the user has
238  // the necessary rights.
239  if ( !$user->isAllowed( 'deletedhistory' ) ) {
240  $bitmask = LogPage::DELETED_ACTION;
241  } elseif ( !$user->isAllowed( 'suppressrevision' ) ) {
243  } else {
244  $bitmask = 0;
245  }
246  if ( $bitmask ) {
247  $conds[] = $dbr->makeList( array(
248  'rc_type != ' . RC_LOG,
249  $dbr->bitAnd( 'rc_deleted', $bitmask ) . " != $bitmask",
250  ), LIST_OR );
251  }
252 
254  $tables,
255  $fields,
256  $conds,
257  $join_conds,
258  $query_options,
259  ''
260  );
261 
262  wfRunHooks( 'SpecialWatchlistQuery',
263  array( &$conds, &$tables, &$join_conds, &$fields, $opts ),
264  '1.23' );
265 
266  return $dbr->select(
267  $tables,
268  $fields,
269  $conds,
270  __METHOD__,
271  $query_options,
272  $join_conds
273  );
274  }
275 
281  protected function getDB() {
282  return wfGetDB( DB_SLAVE, 'watchlist' );
283  }
284 
288  public function outputFeedLinks() {
289  $user = $this->getUser();
290  $wlToken = $user->getTokenFromOption( 'watchlisttoken' );
291  if ( $wlToken ) {
292  $this->addFeedLinks( array(
293  'action' => 'feedwatchlist',
294  'allrev' => 1,
295  'wlowner' => $user->getName(),
296  'wltoken' => $wlToken,
297  ) );
298  }
299  }
300 
307  public function outputChangesList( $rows, $opts ) {
308  global $wgShowUpdatedMarker, $wgRCShowWatchingUsers;
309 
310  $dbr = $this->getDB();
311  $user = $this->getUser();
312  $output = $this->getOutput();
313 
314  # Show a message about slave lag, if applicable
315  $lag = wfGetLB()->safeGetLag( $dbr );
316  if ( $lag > 0 ) {
317  $output->showLagWarning( $lag );
318  }
319 
320  $dbr->dataSeek( $rows, 0 );
321 
322  $list = ChangesList::newFromContext( $this->getContext() );
323  $list->setWatchlistDivs();
324  $list->initChangesListRows( $rows );
325  $dbr->dataSeek( $rows, 0 );
326 
327  $s = $list->beginRecentChangesList();
328  $counter = 1;
329  foreach ( $rows as $obj ) {
330  # Make RC entry
331  $rc = RecentChange::newFromRow( $obj );
332  $rc->counter = $counter++;
333 
334  if ( $wgShowUpdatedMarker ) {
335  $updated = $obj->wl_notificationtimestamp;
336  } else {
337  $updated = false;
338  }
339 
340  if ( $wgRCShowWatchingUsers && $user->getOption( 'shownumberswatching' ) ) {
341  $rc->numberofWatchingusers = $dbr->selectField( 'watchlist',
342  'COUNT(*)',
343  array(
344  'wl_namespace' => $obj->rc_namespace,
345  'wl_title' => $obj->rc_title,
346  ),
347  __METHOD__ );
348  } else {
349  $rc->numberofWatchingusers = 0;
350  }
351 
352  $changeLine = $list->recentChangesLine( $rc, $updated, $counter );
353  if ( $changeLine !== false ) {
354  $s .= $changeLine;
355  }
356  }
357  $s .= $list->endRecentChangesList();
358 
359  if ( $rows->numRows() == 0 ) {
360  $output->wrapWikiMsg(
361  "<div class='mw-changeslist-empty'>\n$1\n</div>", 'recentchanges-noresult'
362  );
363  } else {
364  $output->addHTML( $s );
365  }
366  }
367 
374  public function doHeader( $opts ) {
375  $user = $this->getUser();
376 
377  $this->getOutput()->addSubtitle(
378  $this->msg( 'watchlistfor2', $user->getName() )
379  ->rawParams( SpecialEditWatchlist::buildTools( null ) )
380  );
381 
382  $this->setTopText( $opts );
383 
384  $lang = $this->getLanguage();
385  $wlInfo = '';
386  if ( $opts['days'] > 0 ) {
388  $wlInfo = $this->msg( 'wlnote2' )->numParams( round( $opts['days'] * 24 ) )->params(
389  $lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user )
390  )->parse() . "<br />\n";
391  }
392 
393  $nondefaults = $opts->getChangedValues();
394  $cutofflinks = $this->cutoffLinks( $opts['days'], $nondefaults ) . "<br />\n";
395 
396  # Spit out some control panel links
397  $filters = array(
398  'hideminor' => 'rcshowhideminor',
399  'hidebots' => 'rcshowhidebots',
400  'hideanons' => 'rcshowhideanons',
401  'hideliu' => 'rcshowhideliu',
402  'hidemyself' => 'rcshowhidemine',
403  'hidepatrolled' => 'rcshowhidepatr'
404  );
405  foreach ( $this->getCustomFilters() as $key => $params ) {
406  $filters[$key] = $params['msg'];
407  }
408  // Disable some if needed
409  if ( !$user->useNPPatrol() ) {
410  unset( $filters['hidepatrolled'] );
411  }
412 
413  $links = array();
414  foreach ( $filters as $name => $msg ) {
415  $links[] = $this->showHideLink( $nondefaults, $msg, $name, $opts[$name] );
416  }
417 
418  $hiddenFields = $nondefaults;
419  unset( $hiddenFields['namespace'] );
420  unset( $hiddenFields['invert'] );
421  unset( $hiddenFields['associated'] );
422 
423  # Create output
424  $form = '';
425 
426  # Namespace filter and put the whole form together.
427  $form .= $wlInfo;
428  $form .= $cutofflinks;
429  $form .= $lang->pipeList( $links ) . "\n";
430  $form .= "<hr />\n<p>";
432  array(
433  'selected' => $opts['namespace'],
434  'all' => '',
435  'label' => $this->msg( 'namespace' )->text()
436  ), array(
437  'name' => 'namespace',
438  'id' => 'namespace',
439  'class' => 'namespaceselector',
440  )
441  ) . '&#160;';
443  $this->msg( 'invert' )->text(),
444  'invert',
445  'nsinvert',
446  $opts['invert'],
447  array( 'title' => $this->msg( 'tooltip-invert' )->text() )
448  ) . '&#160;';
450  $this->msg( 'namespace_association' )->text(),
451  'associated',
452  'nsassociated',
453  $opts['associated'],
454  array( 'title' => $this->msg( 'tooltip-namespace_association' )->text() )
455  ) . '&#160;';
456  $form .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "</p>\n";
457  foreach ( $hiddenFields as $key => $value ) {
458  $form .= Html::hidden( $key, $value ) . "\n";
459  }
460  $form .= Xml::closeElement( 'fieldset' ) . "\n";
461  $form .= Xml::closeElement( 'form' ) . "\n";
462  $this->getOutput()->addHTML( $form );
463 
464  $this->setBottomText( $opts );
465  }
466 
467  function setTopText( FormOptions $opts ) {
468  global $wgEnotifWatchlist, $wgShowUpdatedMarker;
469 
470  $nondefaults = $opts->getChangedValues();
471  $form = "";
472  $user = $this->getUser();
473 
474  $dbr = $this->getDB();
475  $numItems = $this->countItems( $dbr );
476 
477  // Show watchlist header
478  $form .= "<p>";
479  if ( $numItems == 0 ) {
480  $form .= $this->msg( 'nowatchlist' )->parse() . "\n";
481  } else {
482  $form .= $this->msg( 'watchlist-details' )->numParams( $numItems )->parse() . "\n";
483  if ( $wgEnotifWatchlist && $user->getOption( 'enotifwatchlistpages' ) ) {
484  $form .= $this->msg( 'wlheader-enotif' )->parse() . "\n";
485  }
486  if ( $wgShowUpdatedMarker ) {
487  $form .= $this->msg( 'wlheader-showupdated' )->parse() . "\n";
488  }
489  }
490  $form .= "</p>";
491 
492  if ( $numItems > 0 && $wgShowUpdatedMarker ) {
493  $form .= Xml::openElement( 'form', array( 'method' => 'post',
494  'action' => $this->getPageTitle()->getLocalURL(),
495  'id' => 'mw-watchlist-resetbutton' ) ) . "\n" .
496  Xml::submitButton( $this->msg( 'enotif_reset' )->text(), array( 'name' => 'dummy' ) ) . "\n" .
497  Html::hidden( 'reset', 'all' ) . "\n";
498  foreach ( $nondefaults as $key => $value ) {
499  $form .= Html::hidden( $key, $value ) . "\n";
500  }
501  $form .= Xml::closeElement( 'form' ) . "\n";
502  }
503 
504  $form .= Xml::openElement( 'form', array(
505  'method' => 'post',
506  'action' => $this->getPageTitle()->getLocalURL(),
507  'id' => 'mw-watchlist-form'
508  ) );
509  $form .= Xml::fieldset(
510  $this->msg( 'watchlist-options' )->text(),
511  false,
512  array( 'id' => 'mw-watchlist-options' )
513  );
514 
516 
517  $this->getOutput()->addHTML( $form );
518  }
519 
520  protected function showHideLink( $options, $message, $name, $value ) {
521  $label = $this->msg( $value ? 'show' : 'hide' )->escaped();
522  $options[$name] = 1 - (int)$value;
523 
524  return $this->msg( $message )
525  ->rawParams( Linker::linkKnown( $this->getPageTitle(), $label, array(), $options ) )
526  ->escaped();
527  }
528 
529  protected function hoursLink( $h, $options = array() ) {
530  $options['days'] = ( $h / 24.0 );
531 
532  return Linker::linkKnown(
533  $this->getPageTitle(),
534  $this->getLanguage()->formatNum( $h ),
535  array(),
536  $options
537  );
538  }
539 
540  protected function daysLink( $d, $options = array() ) {
541  $options['days'] = $d;
542  $message = $d ? $this->getLanguage()->formatNum( $d )
543  : $this->msg( 'watchlistall2' )->escaped();
544 
545  return Linker::linkKnown(
546  $this->getPageTitle(),
547  $message,
548  array(),
549  $options
550  );
551  }
552 
560  protected function cutoffLinks( $days, $options = array() ) {
561  $hours = array( 1, 2, 6, 12 );
562  $days = array( 1, 3, 7 );
563  $i = 0;
564  foreach ( $hours as $h ) {
565  $hours[$i++] = $this->hoursLink( $h, $options );
566  }
567  $i = 0;
568  foreach ( $days as $d ) {
569  $days[$i++] = $this->daysLink( $d, $options );
570  }
571 
572  return $this->msg( 'wlshowlast' )->rawParams(
573  $this->getLanguage()->pipeList( $hours ),
574  $this->getLanguage()->pipeList( $days ),
575  $this->daysLink( 0, $options ) )->parse();
576  }
577 
584  protected function countItems( $dbr ) {
585  # Fetch the raw count
586  $rows = $dbr->select( 'watchlist', array( 'count' => 'COUNT(*)' ),
587  array( 'wl_user' => $this->getUser()->getId() ), __METHOD__ );
588  $row = $dbr->fetchObject( $rows );
589  $count = $row->count;
590 
591  return floor( $count / 2 );
592  }
593 }
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:1455
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
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:180
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:3660
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3650
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:2573
SpecialWatchlist\getDB
getDB()
Return a DatabaseBase object for reading.
Definition: SpecialWatchlist.php:281
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:662
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:87
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
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:4001
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:2514
SpecialWatchlist\doHeader
doHeader( $opts)
Return the text to be displayed above the changes.
Definition: SpecialWatchlist.php:374
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:288
$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:584
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:307
SpecialWatchlist\hoursLink
hoursLink( $h, $options=array())
Definition: SpecialWatchlist.php:529
SpecialWatchlist\daysLink
daysLink( $d, $options=array())
Definition: SpecialWatchlist.php:540
SpecialWatchlist\buildMainQueryConds
buildMainQueryConds(FormOptions $opts)
Return an array of conditions depending of options set in $opts.
Definition: SpecialWatchlist.php:160
$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:707
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:110
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:467
SpecialWatchlist\fetchOptionsFromRequest
fetchOptionsFromRequest( $opts)
Fetch values for a FormOptions object from the WebRequest associated with this instance.
Definition: SpecialWatchlist.php:128
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:520
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:560