MediaWiki  REL1_24
RawAction Class Reference

A simple method to retrieve the plain source of an article, using "action=raw" in the GET request string. More...

Inheritance diagram for RawAction:
Collaboration diagram for RawAction:

List of all members.

Public Member Functions

 getContentType ()
 Get the content type to use for the response.
 getName ()
 Return the name of the action this object responds to.
 getOldId ()
 Get the ID of the revision that should used to get the text.
 getRawText ()
 Get the text that should be returned, or false if the page or revision was not found.
 onView ()
 Show something on GET request.
 requiresUnblock ()
 Whether this action can still be executed by a blocked user.
 requiresWrite ()
 Whether this action requires the wiki not to be locked.

Private Attributes

bool $gen = false
 Does the request include a gen=css|javascript parameter.

Detailed Description

A simple method to retrieve the plain source of an article, using "action=raw" in the GET request string.

Definition at line 35 of file RawAction.php.


Member Function Documentation

Get the content type to use for the response.

Returns:
string

Definition at line 238 of file RawAction.php.

Referenced by onView().

Return the name of the action this object responds to.

Since:
1.17
Returns:
string Lowercase name

Reimplemented from Action.

Definition at line 43 of file RawAction.php.

Get the ID of the revision that should used to get the text.

Returns:
int

Definition at line 205 of file RawAction.php.

Get the text that should be returned, or false if the page or revision was not found.

Returns:
string|bool

Definition at line 132 of file RawAction.php.

Referenced by onView().

Show something on GET request.

Returns:
string|null Will be added to the HTMLForm if present, or just added to the output if not. Return null to not add anything

Reimplemented from FormlessAction.

Definition at line 55 of file RawAction.php.

References $gen, $response, array(), getContentType(), Action\getOutput(), getRawText(), Action\getRequest(), Action\getUser(), User\isEveryoneAllowed(), page, wfDebug(), and wfRunHooks().

Whether this action can still be executed by a blocked user.

Since:
1.17
Returns:
bool

Reimplemented from Action.

Definition at line 51 of file RawAction.php.

Whether this action requires the wiki not to be locked.

Since:
1.17
Returns:
bool

Reimplemented from Action.

Definition at line 47 of file RawAction.php.


Member Data Documentation

bool RawAction::$gen = false [private]

Does the request include a gen=css|javascript parameter.

Deprecated:
This used to be a string for "css" or "javascript" but it is no longer used.

Setting this parameter results in empty content being served

Definition at line 41 of file RawAction.php.

Referenced by onView().


The documentation for this class was generated from the following file: