MediaWiki
fundraising/REL1_35
EditAction.php
Go to the documentation of this file.
1
<?php
29
class
EditAction
extends
FormlessAction
{
30
35
public
function
getName
() {
36
return
'edit'
;
37
}
38
43
public
function
onView
() {
44
return
null
;
45
}
46
50
public
function
show
() {
51
$this->
useTransactionalTimeLimit
();
52
53
$out = $this->
getOutput
();
54
$out->setRobotPolicy(
'noindex,nofollow'
);
55
56
// The editor should always see the latest content when starting their edit.
57
// Also to ensure cookie blocks can be set (T152462).
58
$out->enableClientCache(
false
);
59
60
if
( $this->
getContext
()->getConfig()->
get
(
'UseMediaWikiUIEverywhere'
) ) {
61
$out->addModuleStyles( [
62
'mediawiki.ui.input'
,
63
'mediawiki.ui.checkbox'
,
64
] );
65
}
66
67
$article
= $this->
getArticle
();
68
if
( $this->
getHookRunner
()->onCustomEditor(
$article
, $this->
getUser
() ) ) {
69
$editor =
new
EditPage
(
$article
);
70
$editor->setContextTitle( $this->
getTitle
() );
71
$editor->edit();
72
}
73
}
74
75
public
function
doesWrites
() {
76
return
true
;
77
}
78
}
Action\getHookRunner
getHookRunner()
Definition
Action.php:329
Action\$article
Article $article
Definition
Action.php:59
Action\getTitle
getTitle()
Shortcut to get the Title object from the page.
Definition
Action.php:299
Action\getContext
getContext()
Get the IContextSource in use here.
Definition
Action.php:215
Action\getOutput
getOutput()
Get the OutputPage being used for this instance.
Definition
Action.php:239
Action\getUser
getUser()
Shortcut to get the User being used for this instance.
Definition
Action.php:249
Action\getArticle
getArticle()
Get a Article object.
Definition
Action.php:289
Action\useTransactionalTimeLimit
useTransactionalTimeLimit()
Call wfTransactionalTimeLimit() if this request was POSTed.
Definition
Action.php:546
EditAction
Page edition handler (action=edit)
Definition
EditAction.php:29
EditAction\getName
getName()
Stable to override.
Definition
EditAction.php:35
EditAction\doesWrites
doesWrites()
Indicates whether this action may perform database writes.
Definition
EditAction.php:75
EditAction\show
show()
Stable to override.
Definition
EditAction.php:50
EditAction\onView
onView()
Stable to override.
Definition
EditAction.php:43
EditPage
The edit page/HTML interface (split from Article) The actual database and text munging is still in Ar...
Definition
EditPage.php:62
FormlessAction
An action which just does something, without showing a form first.
Definition
FormlessAction.php:30
includes
actions
EditAction.php
Generated on Mon Nov 25 2024 16:14:11 for MediaWiki by
1.10.0