Go to the documentation of this file.
39 return $this->
msg(
'addwatch' )->escaped();
71 if (
$user->matchEditToken( $this->getRequest()->getVal(
'token' ), $salt ) ) {
76 if (
$form->show() ) {
84 if (
$user->isAnon() ) {
87 $this->
msg(
'loginreqlink' )->escaped(),
91 $reasonMsg = $this->
msg(
'watchlistanontext' )->rawParams( $loginreqlink );
95 return parent::checkCanExecute(
$user );
107 if (
$user->isLoggedIn() &&
134 !
$user->isAllowed(
'editmywatchlist' )
159 if ( !
$user->isAllowed(
'editmywatchlist' ) ) {
185 if ( $action !=
'unwatch' ) {
192 return $user->getEditToken( $salt );
209 $form->setSubmitTextMsg(
'confirm-watch-button' );
213 return $this->
msg(
'confirm-watch-top' )->parse();
217 $this->
getOutput()->addWikiMsg(
'addedwatchtext', $this->
getTitle()->getPrefixedText() );
233 return $this->
msg(
'removewatch' )->escaped();
245 $form->setSubmitTextMsg(
'confirm-unwatch-button' );
249 return $this->
msg(
'confirm-unwatch-top' )->parse();
253 $this->
getOutput()->addWikiMsg(
'removedwatchtext', $this->
getTitle()->getPrefixedText() );
show()
This can be either formed or formless depending on the session token given.
onSuccess()
Do something exciting on successful processing of the form.
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
preText()
Add pre- or post-text to the form.
getDescription()
Returns the description that goes below the <h1> tag.
alterForm(HTMLForm $form)
Play with the HTMLForm if you need to more substantially.
onSuccess()
Do something exciting on successful processing of the form.
setHeaders()
Set output headers for noindexing etc.
static newFatalPermissionDeniedStatus( $permission)
Factory function for fatal permission-denied errors.
requiresUnblock()
Whether this action can still be executed by a blocked user.
static doUnwatch(Title $title, User $user)
Unwatch a page.
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
alterForm(HTMLForm $form)
Play with the HTMLForm if you need to more substantially.
Shows a generic "user is not logged in" error page.
wfProfileIn( $functionname)
Begin profiling of a function.
static newGood( $value=null)
Factory function for good results.
static getTitleFor( $name, $subpage=false, $fragment='')
Get a localised Title object for a specified special page name.
getDescription()
Returns the description that goes below the <h1> tag.
Page addition to a user's watchlist.
Page removal from a user's watchlist.
onSubmit( $data)
Process the form on POST submission.
static linkKnown( $target, $html=null, $customAttribs=array(), $query=array(), $options=array( 'known', 'noclasses'))
Identical to link(), except $options defaults to 'known'.
getFormFields()
Just get an empty form with a single submit button.
static factory(Title $title)
Create a WikiPage object of the appropriate class for the given title.
checkCanExecute(User $user)
Checks if the given user (identified by an object) can perform this action.
getName()
Return the name of the action this object responds to.
onSubmit( $data)
Process the form on POST submission.
const IGNORE_USER_RIGHTS
Constant to specify that user rights 'editmywatchlist' and 'viewmywatchlist' should not be checked.
wfProfileOut( $functionname='missing')
Stop profiling of a function.
wfRunHooks( $event, array $args=array(), $deprecatedVersion=null)
Call hook functions defined in $wgHooks.
static doWatchOrUnwatch( $watch, Title $title, User $user)
Watch or unwatch a page.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
getUser()
Shortcut to get the User being used for this instance.
presenting them properly to the user as errors is done by the caller $title
const CHECK_USER_RIGHTS
Constant to specify that user rights 'editmywatchlist' and 'viewmywatchlist' should be checked.
getTitle()
Shortcut to get the Title object from the page.
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
getName()
Return the name of the action this object responds to.
msg()
Get a Message object with context set Parameters are the same as wfMessage()
Represents a title within MediaWiki.
WikiPage Article ImagePage CategoryPage Page $page
Page on which we're performing the action $page.
getPageTitle()
Returns the name that goes in the <h1> page title.
getOutput()
Get the OutputPage being used for this instance.
preText()
Add pre- or post-text to the form.
static getWatchToken(Title $title, User $user, $action='watch')
Get token to watch (or unwatch) a page for a user.
static doWatch(Title $title, User $user, $checkRights=WatchedItem::CHECK_USER_RIGHTS)
Watch a page.
The User object encapsulates all of the user-specific settings (user_id, name, rights,...
static getUnwatchToken(Title $title, User $user, $action='unwatch')
Get token to unwatch (or watch) a page for a user.
static newFatal( $message)
Factory function for fatal errors.