MediaWiki  1.23.8
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  # If no rows to display, show message before try to render the list
321  if ( $rows->numRows() == 0 ) {
322  $output->wrapWikiMsg(
323  "<div class='mw-changeslist-empty'>\n$1\n</div>", 'recentchanges-noresult'
324  );
325  return;
326  }
327 
328  $dbr->dataSeek( $rows, 0 );
329 
330  $list = ChangesList::newFromContext( $this->getContext() );
331  $list->setWatchlistDivs();
332  $list->initChangesListRows( $rows );
333  $dbr->dataSeek( $rows, 0 );
334 
335  $s = $list->beginRecentChangesList();
336  $counter = 1;
337  foreach ( $rows as $obj ) {
338  # Make RC entry
339  $rc = RecentChange::newFromRow( $obj );
340  $rc->counter = $counter++;
341 
342  if ( $wgShowUpdatedMarker ) {
343  $updated = $obj->wl_notificationtimestamp;
344  } else {
345  $updated = false;
346  }
347 
348  if ( $wgRCShowWatchingUsers && $user->getOption( 'shownumberswatching' ) ) {
349  $rc->numberofWatchingusers = $dbr->selectField( 'watchlist',
350  'COUNT(*)',
351  array(
352  'wl_namespace' => $obj->rc_namespace,
353  'wl_title' => $obj->rc_title,
354  ),
355  __METHOD__ );
356  } else {
357  $rc->numberofWatchingusers = 0;
358  }
359 
360  $changeLine = $list->recentChangesLine( $rc, $updated, $counter );
361  if ( $changeLine !== false ) {
362  $s .= $changeLine;
363  }
364  }
365  $s .= $list->endRecentChangesList();
366 
367  $output->addHTML( $s );
368  }
369 
376  public function doHeader( $opts, $numRows ) {
377  $user = $this->getUser();
378 
379  $this->getOutput()->addSubtitle(
380  $this->msg( 'watchlistfor2', $user->getName() )
381  ->rawParams( SpecialEditWatchlist::buildTools( null ) )
382  );
383 
384  $this->setTopText( $opts );
385 
386  $lang = $this->getLanguage();
387  $wlInfo = '';
388  if ( $opts['days'] > 0 ) {
390  $wlInfo = $this->msg( 'wlnote' )->numParams( $numRows, round( $opts['days'] * 24 ) )->params(
391  $lang->userDate( $timestamp, $user ), $lang->userTime( $timestamp, $user )
392  )->parse() . "<br />\n";
393  }
394 
395  $nondefaults = $opts->getChangedValues();
396  $cutofflinks = $this->cutoffLinks( $opts['days'], $nondefaults ) . "<br />\n";
397 
398  # Spit out some control panel links
399  $filters = array(
400  'hideminor' => 'rcshowhideminor',
401  'hidebots' => 'rcshowhidebots',
402  'hideanons' => 'rcshowhideanons',
403  'hideliu' => 'rcshowhideliu',
404  'hidemyself' => 'rcshowhidemine',
405  'hidepatrolled' => 'rcshowhidepatr'
406  );
407  foreach ( $this->getCustomFilters() as $key => $params ) {
408  $filters[$key] = $params['msg'];
409  }
410  // Disable some if needed
411  if ( !$user->useNPPatrol() ) {
412  unset( $filters['hidepatrolled'] );
413  }
414 
415  $links = array();
416  foreach ( $filters as $name => $msg ) {
417  $links[] = $this->showHideLink( $nondefaults, $msg, $name, $opts[$name] );
418  }
419 
420  $hiddenFields = $nondefaults;
421  unset( $hiddenFields['namespace'] );
422  unset( $hiddenFields['invert'] );
423  unset( $hiddenFields['associated'] );
424 
425  # Create output
426  $form = '';
427 
428  # Namespace filter and put the whole form together.
429  $form .= $wlInfo;
430  $form .= $cutofflinks;
431  $form .= $lang->pipeList( $links ) . "\n";
432  $form .= "<hr />\n<p>";
434  array(
435  'selected' => $opts['namespace'],
436  'all' => '',
437  'label' => $this->msg( 'namespace' )->text()
438  ), array(
439  'name' => 'namespace',
440  'id' => 'namespace',
441  'class' => 'namespaceselector',
442  )
443  ) . '&#160;';
445  $this->msg( 'invert' )->text(),
446  'invert',
447  'nsinvert',
448  $opts['invert'],
449  array( 'title' => $this->msg( 'tooltip-invert' )->text() )
450  ) . '&#160;';
452  $this->msg( 'namespace_association' )->text(),
453  'associated',
454  'nsassociated',
455  $opts['associated'],
456  array( 'title' => $this->msg( 'tooltip-namespace_association' )->text() )
457  ) . '&#160;';
458  $form .= Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "</p>\n";
459  foreach ( $hiddenFields as $key => $value ) {
460  $form .= Html::hidden( $key, $value ) . "\n";
461  }
462  $form .= Xml::closeElement( 'fieldset' ) . "\n";
463  $form .= Xml::closeElement( 'form' ) . "\n";
464  $this->getOutput()->addHTML( $form );
465 
466  $this->setBottomText( $opts );
467  }
468 
469  function setTopText( FormOptions $opts ) {
470  global $wgEnotifWatchlist, $wgShowUpdatedMarker;
471 
472  $nondefaults = $opts->getChangedValues();
473  $form = "";
474  $user = $this->getUser();
475 
476  $dbr = $this->getDB();
477  $numItems = $this->countItems( $dbr );
478 
479  // Show watchlist header
480  $form .= "<p>";
481  if ( $numItems == 0 ) {
482  $form .= $this->msg( 'nowatchlist' )->parse() . "\n";
483  } else {
484  $form .= $this->msg( 'watchlist-details' )->numParams( $numItems )->parse() . "\n";
485  if ( $wgEnotifWatchlist && $user->getOption( 'enotifwatchlistpages' ) ) {
486  $form .= $this->msg( 'wlheader-enotif' )->parse() . "\n";
487  }
488  if ( $wgShowUpdatedMarker ) {
489  $form .= $this->msg( 'wlheader-showupdated' )->parse() . "\n";
490  }
491  }
492  $form .= "</p>";
493 
494  if ( $numItems > 0 && $wgShowUpdatedMarker ) {
495  $form .= Xml::openElement( 'form', array( 'method' => 'post',
496  'action' => $this->getPageTitle()->getLocalURL(),
497  'id' => 'mw-watchlist-resetbutton' ) ) . "\n" .
498  Xml::submitButton( $this->msg( 'enotif_reset' )->text(), array( 'name' => 'dummy' ) ) . "\n" .
499  Html::hidden( 'reset', 'all' ) . "\n";
500  foreach ( $nondefaults as $key => $value ) {
501  $form .= Html::hidden( $key, $value ) . "\n";
502  }
503  $form .= Xml::closeElement( 'form' ) . "\n";
504  }
505 
506  $form .= Xml::openElement( 'form', array(
507  'method' => 'post',
508  'action' => $this->getPageTitle()->getLocalURL(),
509  'id' => 'mw-watchlist-form'
510  ) );
511  $form .= Xml::fieldset(
512  $this->msg( 'watchlist-options' )->text(),
513  false,
514  array( 'id' => 'mw-watchlist-options' )
515  );
516 
518 
519  $this->getOutput()->addHTML( $form );
520  }
521 
522  protected function showHideLink( $options, $message, $name, $value ) {
523  $label = $this->msg( $value ? 'show' : 'hide' )->escaped();
524  $options[$name] = 1 - (int)$value;
525 
526  return $this->msg( $message )
527  ->rawParams( Linker::linkKnown( $this->getPageTitle(), $label, array(), $options ) )
528  ->escaped();
529  }
530 
531  protected function hoursLink( $h, $options = array() ) {
532  $options['days'] = ( $h / 24.0 );
533 
534  return Linker::linkKnown(
535  $this->getPageTitle(),
536  $this->getLanguage()->formatNum( $h ),
537  array(),
538  $options
539  );
540  }
541 
542  protected function daysLink( $d, $options = array() ) {
543  $options['days'] = $d;
544  $message = $d ? $this->getLanguage()->formatNum( $d )
545  : $this->msg( 'watchlistall2' )->escaped();
546 
547  return Linker::linkKnown(
548  $this->getPageTitle(),
549  $message,
550  array(),
551  $options
552  );
553  }
554 
562  protected function cutoffLinks( $days, $options = array() ) {
563  $hours = array( 1, 2, 6, 12 );
564  $days = array( 1, 3, 7 );
565  $i = 0;
566  foreach ( $hours as $h ) {
567  $hours[$i++] = $this->hoursLink( $h, $options );
568  }
569  $i = 0;
570  foreach ( $days as $d ) {
571  $days[$i++] = $this->daysLink( $d, $options );
572  }
573 
574  return $this->msg( 'wlshowlast' )->rawParams(
575  $this->getLanguage()->pipeList( $hours ),
576  $this->getLanguage()->pipeList( $days ),
577  $this->daysLink( 0, $options ) )->parse();
578  }
579 
586  protected function countItems( $dbr ) {
587  # Fetch the raw count
588  $rows = $dbr->select( 'watchlist', array( 'count' => 'COUNT(*)' ),
589  array( 'wl_user' => $this->getUser()->getId() ), __METHOD__ );
590  $row = $dbr->fetchObject( $rows );
591  $count = $row->count;
592 
593  return floor( $count / 2 );
594  }
595 }
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:3669
wfGetDB
& wfGetDB( $db, $groups=array(), $wiki=false)
Get a Database object.
Definition: GlobalFunctions.php:3659
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
SpecialWatchlist\doHeader
doHeader( $opts, $numRows)
Set the text to be displayed above the changes.
Definition: SpecialWatchlist.php:376
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:4010
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
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:586
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:531
SpecialWatchlist\daysLink
daysLink( $d, $options=array())
Definition: SpecialWatchlist.php:542
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:469
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:522
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:562