X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Factions%2FAction.php;h=8d11d901a20fb06d2455b5eccbf46ce9599d4386;hb=df96347d4761f2c9b9a522024c880b1fb520f04a;hp=7dd46161ac9f495e80df1bbb0099c466b70b3d1f;hpb=7eddc5caaaa92108836c8191b16520f862af94ce;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/actions/Action.php b/includes/actions/Action.php index 7dd46161ac..8d11d901a2 100644 --- a/includes/actions/Action.php +++ b/includes/actions/Action.php @@ -38,18 +38,21 @@ abstract class Action { /** * Page on which we're performing the action + * @since 1.17 * @var WikiPage|Article|ImagePage|CategoryPage|Page $page */ protected $page; /** * IContextSource if specified; otherwise we'll use the Context from the Page + * @since 1.17 * @var IContextSource $context */ protected $context; /** * The fields used to create the HTMLForm + * @since 1.17 * @var array $fields */ protected $fields; @@ -82,6 +85,7 @@ abstract class Action { /** * Get an appropriate Action subclass for the given action + * @since 1.17 * @param string $action * @param Page $page * @param IContextSource $context @@ -152,6 +156,7 @@ abstract class Action { /** * Check if a given action is recognised, even if it's disabled + * @since 1.17 * * @param string $name Name of an action * @return bool @@ -162,6 +167,7 @@ abstract class Action { /** * Get the IContextSource in use here + * @since 1.17 * @return IContextSource */ final public function getContext() { @@ -179,6 +185,7 @@ abstract class Action { /** * Get the WebRequest being used for this instance + * @since 1.17 * * @return WebRequest */ @@ -188,6 +195,7 @@ abstract class Action { /** * Get the OutputPage being used for this instance + * @since 1.17 * * @return OutputPage */ @@ -197,6 +205,7 @@ abstract class Action { /** * Shortcut to get the User being used for this instance + * @since 1.17 * * @return User */ @@ -206,6 +215,7 @@ abstract class Action { /** * Shortcut to get the Skin being used for this instance + * @since 1.17 * * @return Skin */ @@ -224,6 +234,8 @@ abstract class Action { /** * Shortcut to get the Title object from the page + * @since 1.17 + * * @return Title */ final public function getTitle() { @@ -262,6 +274,8 @@ abstract class Action { /** * Return the name of the action this object responds to + * @since 1.17 + * * @return string Lowercase name */ abstract public function getName(); @@ -269,6 +283,8 @@ abstract class Action { /** * Get the permission required to perform this action. Often, but not always, * the same as the action name + * @since 1.17 + * * @return string|null */ public function getRestriction() { @@ -279,6 +295,7 @@ abstract class Action { * Checks if the given user (identified by an object) can perform this action. Can be * overridden by sub-classes with more complicated permissions schemes. Failures here * must throw subclasses of ErrorPageError + * @since 1.17 * * @param User $user The user to check, or null to use the context user * @throws UserBlockedError|ReadOnlyError|PermissionsError @@ -307,6 +324,8 @@ abstract class Action { /** * Whether this action requires the wiki not to be locked + * @since 1.17 + * * @return bool */ public function requiresWrite() { @@ -315,6 +334,8 @@ abstract class Action { /** * Whether this action can still be executed by a blocked user + * @since 1.17 + * * @return bool */ public function requiresUnblock() { @@ -324,12 +345,13 @@ abstract class Action { /** * Set output headers for noindexing etc. This function will not be called through * the execute() entry point, so only put UI-related stuff in here. + * @since 1.17 */ protected function setHeaders() { $out = $this->getOutput(); $out->setRobotPolicy( "noindex,nofollow" ); $out->setPageTitle( $this->getPageTitle() ); - $this->getOutput()->setSubtitle( $this->getDescription() ); + $out->setSubtitle( $this->getDescription() ); $out->setArticleRelated( true ); } @@ -344,6 +366,7 @@ abstract class Action { /** * Returns the description that goes below the \ tag + * @since 1.17 * * @return string */ @@ -355,6 +378,8 @@ abstract class Action { * The main action entry point. Do all output for display and send it to the context * output. Do not use globals $wgOut, $wgRequest, etc, in implementations; use * $this->getOutput(), etc. + * @since 1.17 + * * @throws ErrorPageError */ abstract public function show();