Merge "Add @since tags to new public methods related to partial blocks"
This commit is contained in:
commit
36bbdfb8ad
6 changed files with 27 additions and 1 deletions
|
|
@ -1132,6 +1132,7 @@ class Block {
|
|||
* prohibited from editing any page on the site (other than their own talk
|
||||
* page).
|
||||
*
|
||||
* @since 1.33
|
||||
* @param null|bool $x
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -1728,6 +1729,7 @@ class Block {
|
|||
/**
|
||||
* Get block information used in different block error messages
|
||||
*
|
||||
* @since 1.33
|
||||
* @param IContextSource $context
|
||||
* @return array
|
||||
*/
|
||||
|
|
@ -1769,6 +1771,7 @@ class Block {
|
|||
* Getting the restrictions will perform a database query if the restrictions
|
||||
* are not already loaded.
|
||||
*
|
||||
* @since 1.33
|
||||
* @return Restriction[]
|
||||
*/
|
||||
public function getRestrictions() {
|
||||
|
|
@ -1787,8 +1790,8 @@ class Block {
|
|||
/**
|
||||
* Set Restrictions.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param Restriction[] $restrictions
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setRestrictions( array $restrictions ) {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class BlockRestriction {
|
|||
/**
|
||||
* Retrieves the restrictions from the database by block id.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param int|array $blockId
|
||||
* @param IDatabase|null $db
|
||||
* @return Restriction[]
|
||||
|
|
@ -58,6 +59,7 @@ class BlockRestriction {
|
|||
/**
|
||||
* Inserts the restrictions into the database.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param Restriction[] $restrictions
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -92,6 +94,7 @@ class BlockRestriction {
|
|||
* Updates the list of restrictions. This method does not allow removing all
|
||||
* of the restrictions. To do that, use ::deleteByBlockId().
|
||||
*
|
||||
* @since 1.33
|
||||
* @param Restriction[] $restrictions
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -156,6 +159,7 @@ class BlockRestriction {
|
|||
/**
|
||||
* Updates the list of restrictions by parent id.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param int $parentBlockId
|
||||
* @param Restriction[] $restrictions
|
||||
* @return bool
|
||||
|
|
@ -195,6 +199,7 @@ class BlockRestriction {
|
|||
/**
|
||||
* Delete the restrictions.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param Restriction[]|null $restrictions
|
||||
* @throws MWException
|
||||
* @return bool
|
||||
|
|
@ -224,6 +229,7 @@ class BlockRestriction {
|
|||
/**
|
||||
* Delete the restrictions by Block ID.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param int|array $blockId
|
||||
* @throws MWException
|
||||
* @return bool
|
||||
|
|
@ -240,6 +246,7 @@ class BlockRestriction {
|
|||
/**
|
||||
* Delete the restrictions by Parent Block ID.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param int|array $parentBlockId
|
||||
* @throws MWException
|
||||
* @return bool
|
||||
|
|
@ -261,6 +268,7 @@ class BlockRestriction {
|
|||
* equality check as the restrictions do not have to contain the same block
|
||||
* ids.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param Restriction[] $a
|
||||
* @param Restriction[] $b
|
||||
* @return bool
|
||||
|
|
@ -305,6 +313,7 @@ class BlockRestriction {
|
|||
/**
|
||||
* Set the blockId on a set of restrictions and return a new set.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param int $blockId
|
||||
* @param Restriction[] $restrictions
|
||||
* @return Restriction[]
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ abstract class AbstractRestriction implements Restriction {
|
|||
/**
|
||||
* Create Restriction.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param int $blockId
|
||||
* @param int $value
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ class PageRestriction extends AbstractRestriction {
|
|||
/**
|
||||
* Set the title.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param \Title $title
|
||||
* @return self
|
||||
*/
|
||||
|
|
@ -68,6 +69,7 @@ class PageRestriction extends AbstractRestriction {
|
|||
/**
|
||||
* Get Title.
|
||||
*
|
||||
* @since 1.33
|
||||
* @return \Title|null
|
||||
*/
|
||||
public function getTitle() {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ interface Restriction {
|
|||
/**
|
||||
* Gets the id of the block.
|
||||
*
|
||||
* @since 1.33
|
||||
* @return int
|
||||
*/
|
||||
public function getBlockId();
|
||||
|
|
@ -34,6 +35,7 @@ interface Restriction {
|
|||
/**
|
||||
* Sets the id of the block.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param int $blockId
|
||||
* @return self
|
||||
*/
|
||||
|
|
@ -42,6 +44,7 @@ interface Restriction {
|
|||
/**
|
||||
* Gets the value of the restriction.
|
||||
*
|
||||
* @since 1.33
|
||||
* @return int
|
||||
*/
|
||||
public function getValue();
|
||||
|
|
@ -49,6 +52,7 @@ interface Restriction {
|
|||
/**
|
||||
* Gets the type of restriction
|
||||
*
|
||||
* @since 1.33
|
||||
* @return string
|
||||
*/
|
||||
public function getType();
|
||||
|
|
@ -56,6 +60,7 @@ interface Restriction {
|
|||
/**
|
||||
* Gets the id of the type of restriction. This id is used in the database.
|
||||
*
|
||||
* @since 1.33
|
||||
* @return string
|
||||
*/
|
||||
public function getTypeId();
|
||||
|
|
@ -63,6 +68,7 @@ interface Restriction {
|
|||
/**
|
||||
* Creates a new Restriction from a database row.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param \stdClass $row
|
||||
* @return self
|
||||
*/
|
||||
|
|
@ -71,6 +77,7 @@ interface Restriction {
|
|||
/**
|
||||
* Convert a restriction object into a row array for insertion.
|
||||
*
|
||||
* @since 1.33
|
||||
* @return array
|
||||
*/
|
||||
public function toRow();
|
||||
|
|
@ -78,6 +85,7 @@ interface Restriction {
|
|||
/**
|
||||
* Determine if a restriction matches a given title.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param \Title $title
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -86,6 +94,7 @@ interface Restriction {
|
|||
/**
|
||||
* Determine if a restriction equals another restriction.
|
||||
*
|
||||
* @since 1.33
|
||||
* @param Restriction $other
|
||||
* @return bool
|
||||
*/
|
||||
|
|
@ -94,6 +103,7 @@ interface Restriction {
|
|||
/**
|
||||
* Create a unique hash of the block restriction based on the type and value.
|
||||
*
|
||||
* @since 1.33
|
||||
* @return string
|
||||
*/
|
||||
public function getHash();
|
||||
|
|
|
|||
|
|
@ -4545,6 +4545,7 @@ class User implements IDBAccessObject, UserIdentity {
|
|||
/**
|
||||
* Get whether the user is blocked from using Special:Upload
|
||||
*
|
||||
* @since 1.33
|
||||
* @return bool
|
||||
*/
|
||||
public function isBlockedFromUpload() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue