MediaWiki
1.30.0
|
Public Member Functions | |
__construct ( $options=[]) | |
Create a new block with specified parameters on a user, IP or IP range. More... | |
delete () | |
Delete the row from the IP blocks table. More... | |
deleteIfExpired () | |
Check if a block has expired. More... | |
doAutoblock ( $autoblockIP) | |
Autoblocks the given IP, referring to this Block. More... | |
equals (Block $block) | |
Check if two blocks are effectively equal. More... | |
fromMaster ( $x=null) | |
Get/set a flag determining whether the master is used for reads. More... | |
getBlocker () | |
Get the user who implemented this block. More... | |
getBy () | |
Get the user id of the blocking sysop. More... | |
getByName () | |
Get the username of the blocking sysop. More... | |
getCookieValue () | |
Get the BlockID cookie's value for this block. More... | |
getExpiry () | |
getId () | |
Get the block ID. More... | |
getPermissionsError (IContextSource $context) | |
Get the key and parameters for the corresponding error message. More... | |
getRangeEnd () | |
Get the IP address at the end of the range in Hex form. More... | |
getRangeStart () | |
Get the IP address at the start of the range in Hex form. More... | |
getRedactedName () | |
Get the block name, but with autoblocked IPs hidden as per standard privacy policy. More... | |
getSystemBlockType () | |
Get the system block type, if any. More... | |
getTarget () | |
Get the target for this particular Block. More... | |
getTargetAndType () | |
Get the target and target type for this particular Block. More... | |
getType () | |
Get the type of target for this particular block. More... | |
insert ( $dbw=null) | |
Insert a block into the block table. More... | |
isAutoblocking ( $x=null) | |
isExpired () | |
Has the block expired? More... | |
isHardblock ( $x=null) | |
Get/set whether the Block is a hardblock (affects logged-in users on a given IP/range) More... | |
isValid () | |
Is the block address valid (i.e. More... | |
prevents ( $action, $x=null) | |
Get/set whether the Block prevents a given action. More... | |
setBlocker ( $user) | |
Set the user who implemented (or will implement) this block. More... | |
setCookie (WebResponse $response) | |
Set the 'BlockID' cookie to this block's ID and expiry time. More... | |
setTarget ( $target) | |
Set the target for this block, and update $this->type accordingly. More... | |
update () | |
Update a block in the DB with new parameters. More... | |
updateTimestamp () | |
Update the timestamp on autoblocks. More... | |
Static Public Member Functions | |
static | chooseBlock (array $blocks, array $ipChain) |
From a list of multiple blocks, find the most exact and strongest Block. More... | |
static | clearCookie (WebResponse $response) |
Unset the 'BlockID' cookie. More... | |
static | getAutoblockExpiry ( $timestamp) |
Get a timestamp of the expiry for autoblocks. More... | |
static | getBlocksForIPList (array $ipChain, $isAnon, $fromMaster=false) |
Get all blocks that match any IP from an array of IP addresses. More... | |
static | getIdFromCookieValue ( $cookieValue) |
Get the stored ID from the 'BlockID' cookie. More... | |
static | getRangeCond ( $start, $end=null) |
Get a set of SQL conditions which will select rangeblocks encompassing a given range. More... | |
static | isWhitelistedFromAutoblocks ( $ip) |
Checks whether a given IP is on the autoblock whitelist. More... | |
static | newFromID ( $id) |
Load a blocked user from their block id. More... | |
static | newFromRow ( $row) |
Create a new Block object from a database row. More... | |
static | newFromTarget ( $specificTarget, $vagueTarget=null, $fromMaster=false) |
Given a target and the target's type, get an existing Block object if possible. More... | |
static | parseTarget ( $target) |
From an existing Block, get the target and the type of target. More... | |
static | purgeExpired () |
Purge expired blocks from the ipblocks table. More... | |
static | selectFields () |
Return the list of ipblocks fields that should be selected to create a new block. More... | |
Public Attributes | |
bool | $mAuto |
string | $mExpiry |
bool | $mHideName |
int | $mParentBlockId |
string | $mReason |
string | $mTimestamp |
const | TYPE_AUTO = 4 |
const | TYPE_ID = 5 |
const | TYPE_IP = 2 |
const | TYPE_RANGE = 3 |
const | TYPE_USER = 1 |
Protected Member Functions | |
doRetroactiveAutoblock () | |
Retroactively autoblocks the last IP used by the user (if it is a user) blocked by this Block. More... | |
getAutoblockUpdateArray (IDatabase $dbw) | |
getDatabaseArray (IDatabase $dbw) | |
Get an array suitable for passing to $dbw->insert() or $dbw->update() More... | |
initFromRow ( $row) | |
Given a database row from the ipblocks table, initialize member variables. More... | |
newLoad ( $vagueTarget=null) | |
Load a block from the database which affects the already-set $this->target: 1) A block directly on the given user or IP 2) A rangeblock encompassing the given IP (smallest first) 3) An autoblock on the given IP. More... | |
Static Protected Member Functions | |
static | defaultRetroactiveAutoblock (Block $block, array &$blockIds) |
Retroactively autoblocks the last IP used by the user (if it is a user) blocked by this Block. More... | |
static | getIpFragment ( $hex) |
Get the component of an IP address which is certain to be the same between an IP address and a rangeblock containing that IP address. More... | |
Private Attributes | |
User | $blocker |
int | $forcedTargetID |
Hack for foreign blocking (CentralAuth) More... | |
bool | $isAutoblocking |
bool | $isHardblock |
bool | $mBlockEmail |
bool | $mCreateAccount |
bool | $mDisableUsertalk |
bool | $mFromMaster |
int | $mId |
string null | $systemBlockType |
User string | $target |
int | $type |
Block::TYPE_ constant. More... | |
Block::__construct | ( | $options = [] | ) |
Create a new block with specified parameters on a user, IP or IP range.
array | $options | Parameters of the block: address string|User Target user name, User object, IP address or IP range user int Override target user ID (for foreign users) by int User ID of the blocker reason string Reason of the block timestamp string The time at which the block comes into effect auto bool Is this an automatic block? expiry string Timestamp of expiration of the block or 'infinity' anonOnly bool Only disallow anonymous actions createAccount bool Disallow creation of new accounts enableAutoblock bool Enable automatic blocking hideName bool Hide the target user name blockEmail bool Disallow sending emails allowUsertalk bool Allow the target to edit its own talk page byText string Username of the blocker (for foreign users) systemBlock string Indicate that this block is automatically created by MediaWiki rather than being stored in the database. Value is a string to return from self::getSystemBlockType(). |
Definition at line 115 of file Block.php.
References $options, DB_REPLICA, isAutoblocking(), isHardblock(), User\newFromId(), prevents(), setBlocker(), setTarget(), wfDeprecated(), wfGetDB(), and wfTimestamp().
From a list of multiple blocks, find the most exact and strongest Block.
The logic for finding the "best" block is:
array | $blocks | Array of Block objects |
array | $ipChain | List of IPs (strings). This is used to determine how "close" a block is to the server, and if a block matches exactly, or is in a range. The order is furthest from the server to nearest e.g., (Browser, proxy1, proxy2, local-squid, ...) |
MWException |
Definition at line 1232 of file Block.php.
References as, captcha-old\count, false, isHardblock(), prevents(), and IP\toHex().
Referenced by User\getBlockedStatus(), and BlockTest\testBlocksOnXff().
|
static |
Unset the 'BlockID' cookie.
WebResponse | $response | The response on which to unset the cookie. |
Definition at line 1481 of file Block.php.
References $response.
Referenced by User\getBlockFromCookieValue().
Retroactively autoblocks the last IP used by the user (if it is a user) blocked by this Block.
This will use the recentchanges table.
Block | $block | |
array | &$blockIds |
Definition at line 666 of file Block.php.
References $dbr, $options, $res, $wgPutIPinRC, as, DB_REPLICA, doAutoblock(), getTarget(), global, string, wfDebug(), and wfGetDB().
Referenced by doRetroactiveAutoblock().
Block::delete | ( | ) |
Delete the row from the IP blocks table.
MWException |
Definition at line 453 of file Block.php.
References DB_MASTER, getId(), wfGetDB(), and wfReadOnly().
Block::deleteIfExpired | ( | ) |
Check if a block has expired.
Delete it if it is.
Definition at line 830 of file Block.php.
References isExpired(), and wfDebug().
Block::doAutoblock | ( | $autoblockIP | ) |
Autoblocks the given IP, referring to this Block.
string | $autoblockIP | The IP to autoblock. |
Definition at line 753 of file Block.php.
References $mHideName, $mId, getAutoblockExpiry(), getBlocker(), getSystemBlockType(), getTarget(), isAutoblocking(), newFromTarget(), prevents(), Hooks\run(), wfDebug(), wfMessage(), and wfTimestampNow().
Referenced by defaultRetroactiveAutoblock(), and BlockTest\testSystemBlocks().
|
protected |
Retroactively autoblocks the last IP used by the user (if it is a user) blocked by this Block.
Definition at line 643 of file Block.php.
References defaultRetroactiveAutoblock(), getTarget(), getType(), isAutoblocking(), Hooks\run(), and wfDebug().
Block::equals | ( | Block | $block | ) |
Check if two blocks are effectively equal.
Doesn't check irrelevant things like the blocking user or the block timestamp, only things which affect the blocked user
Block | $block |
Definition at line 233 of file Block.php.
References isAutoblocking(), isHardblock(), and prevents().
Block::fromMaster | ( | $x = null | ) |
Get/set a flag determining whether the master is used for reads.
bool | null | $x |
Definition at line 973 of file Block.php.
References wfSetVar().
|
static |
Get a timestamp of the expiry for autoblocks.
string | int | $timestamp |
Definition at line 1065 of file Block.php.
References $wgAutoblockExpiry, global, and wfTimestamp().
Referenced by doAutoblock(), and updateTimestamp().
|
protected |
IDatabase | $dbw |
Definition at line 627 of file Block.php.
References getBy(), getByName(), CommentStore\newKey(), and prevents().
Referenced by update().
Block::getBlocker | ( | ) |
Get the user who implemented this block.
Definition at line 1437 of file Block.php.
References $blocker.
Referenced by doAutoblock(), getBy(), getByName(), getPermissionsError(), and BlockTest\testCrappyCrossWikiBlocks().
Get all blocks that match any IP from an array of IP addresses.
array | $ipChain | List of IPs (strings), usually retrieved from the X-Forwarded-For header of the request |
bool | $isAnon | Exclude anonymous-only blocks if false |
bool | $fromMaster | Whether to query the master or replica DB |
Definition at line 1151 of file Block.php.
References $rows, as, captcha-old\count, DB_MASTER, DB_REPLICA, getRangeCond(), IP\isValid(), LIST_OR, newFromRow(), IP\toHex(), and wfGetDB().
Referenced by User\getBlockedStatus(), and BlockTest\testBlocksOnXff().
Block::getBy | ( | ) |
Get the user id of the blocking sysop.
Definition at line 931 of file Block.php.
References $blocker, getBlocker(), and User\getId().
Referenced by getAutoblockUpdateArray(), ApiQueryUserInfo\getBlockInfo(), getDatabaseArray(), and BlockTest\testCrappyCrossWikiBlocks().
Block::getByName | ( | ) |
Get the username of the blocking sysop.
Definition at line 943 of file Block.php.
References $blocker, getBlocker(), User\getName(), and string.
Referenced by getAutoblockUpdateArray(), ApiQueryUserInfo\getBlockInfo(), getDatabaseArray(), getPermissionsError(), and BlockTest\testCrappyCrossWikiBlocks().
Block::getCookieValue | ( | ) |
Get the BlockID cookie's value for this block.
This is usually the block ID concatenated with an HMAC in order to avoid spoofing (T152951), but if wgSecretKey is not set will just be the block ID.
Definition at line 1494 of file Block.php.
References getId(), RequestContext\getMain(), and MWCryptHash\hmac().
Referenced by setCookie().
|
protected |
Get an array suitable for passing to $dbw->insert() or $dbw->update()
IDatabase | $dbw |
Definition at line 592 of file Block.php.
References $forcedTargetID, $mAuto, $mParentBlockId, Wikimedia\Rdbms\IDatabase\encodeExpiry(), getBy(), getByName(), User\getId(), getRangeEnd(), getRangeStart(), isAutoblocking(), isHardblock(), CommentStore\newKey(), prevents(), string, and Wikimedia\Rdbms\IDatabase\timestamp().
Block::getExpiry | ( | ) |
Definition at line 1421 of file Block.php.
References $mExpiry.
Referenced by ApiQueryUserInfo\getBlockInfo(), and setCookie().
Block::getId | ( | ) |
Get the block ID.
Definition at line 954 of file Block.php.
References $mId.
Referenced by delete(), ApiQueryUserInfo\getBlockInfo(), getCookieValue(), getPermissionsError(), update(), and updateTimestamp().
|
static |
Get the stored ID from the 'BlockID' cookie.
The cookie's value is usually a combination of the ID and a HMAC (see Block::setCookie), but will sometimes only be the ID.
string | $cookieValue | The string in which to find the ID. |
Definition at line 1517 of file Block.php.
References false, RequestContext\getMain(), and MWCryptHash\hmac().
Referenced by User\getBlockFromCookieValue(), and UserTest\testAutoblockCookies().
|
staticprotected |
Get the component of an IP address which is certain to be the same between an IP address and a rangeblock containing that IP address.
string | $hex | Hexadecimal IP representation |
Definition at line 393 of file Block.php.
References $wgBlockCIDRLimit, and global.
Referenced by getRangeCond().
Block::getPermissionsError | ( | IContextSource | $context | ) |
Get the key and parameters for the corresponding error message.
IContextSource | $context |
Definition at line 1544 of file Block.php.
References $blocker, $context, $lang, $link, $mReason, $systemBlockType, getBlocker(), getByName(), getId(), IContextSource\getLanguage(), getSystemBlockType(), getTarget(), User\getUserPage(), and string.
Referenced by UserBlockedError\__construct().
|
static |
Get a set of SQL conditions which will select rangeblocks encompassing a given range.
string | $start | Hexadecimal IP representation |
string | $end | Hexadecimal IP representation, or null to use $start = $end |
Definition at line 360 of file Block.php.
References $dbr, DB_REPLICA, getIpFragment(), LIST_AND, and wfGetDB().
Referenced by SpecialBlockList\getBlockListPager(), getBlocksForIPList(), and newLoad().
Block::getRangeEnd | ( | ) |
Get the IP address at the end of the range in Hex form.
MWException |
Definition at line 912 of file Block.php.
References list, IP\parseRange(), IP\toHex(), type, TYPE_IP, TYPE_RANGE, and TYPE_USER.
Referenced by getDatabaseArray().
Block::getRangeStart | ( | ) |
Get the IP address at the start of the range in Hex form.
MWException |
Definition at line 893 of file Block.php.
References list, IP\parseRange(), IP\toHex(), type, TYPE_IP, TYPE_RANGE, and TYPE_USER.
Referenced by getDatabaseArray().
Block::getRedactedName | ( | ) |
Get the block name, but with autoblocked IPs hidden as per standard privacy policy.
Definition at line 1047 of file Block.php.
References getTarget(), Html\rawElement(), and wfMessage().
Block::getSystemBlockType | ( | ) |
Get the system block type, if any.
Definition at line 963 of file Block.php.
References $systemBlockType.
Referenced by doAutoblock(), ApiQueryUserInfo\getBlockInfo(), getPermissionsError(), insert(), and BlockTest\testSystemBlocks().
Block::getTarget | ( | ) |
Get the target for this particular Block.
Note that for autoblocks, this returns the unredacted name; frontend functions need to call $block->getRedactedName() in this situation.
Definition at line 1412 of file Block.php.
References $target.
Referenced by defaultRetroactiveAutoblock(), doAutoblock(), doRetroactiveAutoblock(), getPermissionsError(), getRedactedName(), getTargetAndType(), isValid(), BlockTest\testCrappyCrossWikiBlocks(), and BlockTest\testDeprecatedConstructor().
Block::getTargetAndType | ( | ) |
Get the target and target type for this particular Block.
Note that for autoblocks, this returns the unredacted name; frontend functions need to call $block->getRedactedName() in this situation.
Definition at line 1402 of file Block.php.
References getTarget(), and getType().
Block::getType | ( | ) |
Get the type of target for this particular block.
Definition at line 1389 of file Block.php.
References $type, and TYPE_AUTO.
Referenced by ApiBase\dieBlocked(), doRetroactiveAutoblock(), getTargetAndType(), isAutoblocking(), and isHardblock().
|
protected |
Given a database row from the ipblocks table, initialize member variables.
stdClass | $row | A row from the ipblocks table |
Definition at line 407 of file Block.php.
References DB_REPLICA, isAutoblocking(), isHardblock(), User\newFromId(), CommentStore\newKey(), prevents(), setBlocker(), setTarget(), wfGetDB(), and wfTimestamp().
Referenced by newFromRow(), and newLoad().
Block::insert | ( | $dbw = null | ) |
Insert a block into the block table.
Will fail if there is a conflicting block (same name and options) already in the database.
IDatabase | $dbw | If you have one available |
Definition at line 477 of file Block.php.
References $mId, $wgBlockDisablesLogin, DB_MASTER, doRetroactiveAutoblock(), getDatabaseArray(), getSystemBlockType(), global, purgeExpired(), wfDebug(), and wfGetDB().
Referenced by LocalIdLookupTest\addDBData(), BlockTest\addXffBlocks(), BlockTest\testBlockedUserCanNotCreateAccount(), BlockTest\testCrappyCrossWikiBlocks(), BlockTest\testDeprecatedConstructor(), and BlockTest\testSystemBlocks().
Block::isAutoblocking | ( | $x = null | ) |
null | bool | $x |
Definition at line 995 of file Block.php.
References getType(), and wfSetVar().
Referenced by __construct(), BlockTest\addXffBlocks(), doAutoblock(), doRetroactiveAutoblock(), equals(), getDatabaseArray(), initFromRow(), and update().
Block::isExpired | ( | ) |
Has the block expired?
Definition at line 847 of file Block.php.
References $mExpiry, wfDebug(), and wfTimestampNow().
Referenced by deleteIfExpired().
Block::isHardblock | ( | $x = null | ) |
Get/set whether the Block is a hardblock (affects logged-in users on a given IP/range)
bool | null | $x |
Definition at line 982 of file Block.php.
References $isHardblock, getType(), true, and wfSetVar().
Referenced by __construct(), BlockTest\addXffBlocks(), chooseBlock(), equals(), getDatabaseArray(), and initFromRow().
Block::isValid | ( | ) |
Is the block address valid (i.e.
not a null string?)
Definition at line 862 of file Block.php.
References getTarget().
|
static |
Checks whether a given IP is on the autoblock whitelist.
TODO: this probably belongs somewhere else, but not sure where...
string | $ip | The IP to check |
Definition at line 707 of file Block.php.
References $cache, $line, $lines, array(), as, DB_REPLICA, IP\isInRange(), plain, wfDebug(), wfGetDB(), and wfMessage().
|
static |
Load a blocked user from their block id.
int | $id | Block id to search for |
Definition at line 184 of file Block.php.
References $dbr, $res, DB_REPLICA, newFromRow(), and wfGetDB().
Referenced by User\getBlockFromCookieValue(), newFromTarget(), BlockTest\testCrappyCrossWikiBlocks(), and BlockTest\testINewFromIDReturnsCorrectBlock().
|
static |
Create a new Block object from a database row.
stdClass | $row | Row from the ipblocks table |
Definition at line 441 of file Block.php.
References initFromRow().
Referenced by CleanupBlocks\execute(), getBlocksForIPList(), newFromID(), and newLoad().
|
static |
Given a target and the target's type, get an existing Block object if possible.
string | User | int | $specificTarget | A block target, which may be one of several types:
|
string | User | int | $vagueTarget | As above, but we will search for any block which affects that target (so for an IP address, get ranges containing that IP; and also get any relevant autoblocks). Leave empty or blank to skip IP-based lookups. |
bool | $fromMaster | Whether to use the DB_MASTER database |
Definition at line 1112 of file Block.php.
References $target, $type, list, newFromID(), and parseTarget().
Referenced by BlockTest\addDBData(), SpecialContributions\contributionsSub(), doAutoblock(), ApiUnblock\execute(), ApiBlock\execute(), SpecialUnblock\execute(), User\getBlockedStatus(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProviderTest\getBlockedUser(), Article\getRobotPolicy(), DeletedContributionsPage\getSubTitle(), User\isBlockedFromCreateAccount(), SpecialBlock\maybeAlterFormDefaults(), SpecialBlock\processForm(), SpecialUnblock\processUnblock(), EditPage\showIntro(), Article\showMissingArticle(), User\spreadBlock(), ApiBlockTest\tearDown(), BlockTest\testBlockedUserCanNotCreateAccount(), BlockTest\testBug29116NewFromTargetWithEmptyIp(), MediaWiki\Auth\AuthManagerTest\testCheckAccountCreatePermissions(), BlockTest\testCrappyCrossWikiBlocks(), BlockTest\testDeprecatedConstructor(), BlockTest\testINewFromTargetReturnsCorrectBlock(), ApiBlockTest\testMakeNormalBlock(), and ApiBlockTest\testMakeNormalBlockId().
|
protected |
Load a block from the database which affects the already-set $this->target: 1) A block directly on the given user or IP 2) A rangeblock encompassing the given IP (smallest first) 3) An autoblock on the given IP.
User | string | $vagueTarget | Also search for blocks affecting this target. Doesn't make any sense to use TYPE_AUTO / TYPE_ID here. Leave blank to skip IP lookups. |
MWException |
Definition at line 259 of file Block.php.
References $res, $target, $type, as, DB_MASTER, DB_REPLICA, getRangeCond(), initFromRow(), list, LIST_OR, newFromRow(), IP\parseRange(), parseTarget(), prevents(), string, IP\toHex(), type, TYPE_IP, TYPE_RANGE, TYPE_USER, and wfGetDB().
|
static |
From an existing Block, get the target and the type of target.
Note that, except for null, it is always safe to treat the target as a string; for User objects this will return User::__toString() which in turn gives User::getName().
string | int | User | null | $target |
Definition at line 1334 of file Block.php.
References $target, User\getName(), IP\isValid(), IP\isValidRange(), User\newFromName(), IP\sanitizeIP(), IP\sanitizeRange(), TYPE_AUTO, TYPE_IP, TYPE_RANGE, and TYPE_USER.
Referenced by BlockListPager\formatValue(), SpecialBlockList\getBlockListPager(), SpecialBlock\getTargetAndType(), newFromTarget(), newLoad(), SpecialBlock\setParameter(), and setTarget().
Block::prevents | ( | $action, | |
$x = null |
|||
) |
Get/set whether the Block prevents a given action.
string | $action | Action to check |
bool | null | $x | Value for set, or null to just get value |
Definition at line 1012 of file Block.php.
References $res, $wgBlockDisablesLogin, global, User, and wfSetVar().
Referenced by __construct(), BlockTest\addXffBlocks(), chooseBlock(), doAutoblock(), equals(), getAutoblockUpdateArray(), getDatabaseArray(), initFromRow(), User\isBlockedFromCreateAccount(), newLoad(), BlockTest\testBlockedUserCanNotCreateAccount(), and BlockTest\testDeprecatedConstructor().
|
static |
Purge expired blocks from the ipblocks table.
Definition at line 1074 of file Block.php.
References $fname, Wikimedia\Rdbms\IDatabase\addQuotes(), DeferredUpdates\addUpdate(), DB_MASTER, Wikimedia\Rdbms\IDatabase\delete(), Wikimedia\Rdbms\IDatabase\timestamp(), wfGetDB(), and wfReadOnly().
Referenced by insert().
|
static |
Return the list of ipblocks fields that should be selected to create a new block.
Definition at line 206 of file Block.php.
References CommentStore\newKey().
Block::setBlocker | ( | $user | ) |
Set the user who implemented (or will implement) this block.
Definition at line 1445 of file Block.php.
References $user.
Referenced by __construct(), BlockTest\addXffBlocks(), and initFromRow().
Block::setCookie | ( | WebResponse | $response | ) |
Set the 'BlockID' cookie to this block's ID and expiry time.
The cookie's expiry will be the same as the block's, to a maximum of 24 hours.
WebResponse | $response | The response on which to set the cookie. |
Definition at line 1457 of file Block.php.
References $expiryTime, false, getCookieValue(), getExpiry(), WebResponse\setCookie(), and wfTimestamp().
Block::setTarget | ( | $target | ) |
Set the target for this block, and update $this->type accordingly.
mixed | $target |
Definition at line 1429 of file Block.php.
References list, parseTarget(), and type.
Referenced by __construct(), BlockTest\addXffBlocks(), and initFromRow().
Block::update | ( | ) |
Update a block in the DB with new parameters.
The ID field needs to be loaded first.
Definition at line 545 of file Block.php.
References $mId, DB_MASTER, doRetroactiveAutoblock(), getAutoblockUpdateArray(), getDatabaseArray(), getId(), isAutoblocking(), wfDebug(), and wfGetDB().
Block::updateTimestamp | ( | ) |
Update the timestamp on autoblocks.
Definition at line 869 of file Block.php.
References DB_MASTER, getAutoblockExpiry(), getId(), wfGetDB(), and wfTimestamp().
|
private |
Definition at line 71 of file Block.php.
Referenced by getBlocker(), getBy(), getByName(), and getPermissionsError().
|
private |
Hack for foreign blocking (CentralAuth)
Definition at line 65 of file Block.php.
Referenced by getDatabaseArray().
|
private |
Definition at line 74 of file Block.php.
Referenced by isHardblock().
bool Block::$mAuto |
Definition at line 35 of file Block.php.
Referenced by getDatabaseArray().
string Block::$mExpiry |
Definition at line 38 of file Block.php.
Referenced by getExpiry(), and isExpired().
bool Block::$mHideName |
Definition at line 41 of file Block.php.
Referenced by doAutoblock().
|
private |
int Block::$mParentBlockId |
Definition at line 44 of file Block.php.
Referenced by getDatabaseArray().
string Block::$mReason |
Definition at line 29 of file Block.php.
Referenced by getPermissionsError().
|
private |
Definition at line 80 of file Block.php.
Referenced by getPermissionsError(), and getSystemBlockType().
Definition at line 62 of file Block.php.
Referenced by getTarget(), newFromTarget(), newLoad(), and parseTarget().
|
private |
const Block::TYPE_AUTO = 4 |
Definition at line 86 of file Block.php.
Referenced by SpecialContributions\contributionsSub(), ApiBase\dieBlocked(), ApiUnblock\execute(), SpecialUnblock\execute(), SpecialBlockList\getBlockListPager(), SpecialUnblock\getFields(), DeletedContributionsPage\getSubTitle(), getType(), parseTarget(), SpecialUnblock\processUnblock(), EditPage\showIntro(), and Article\showMissingArticle().
const Block::TYPE_ID = 5 |
Definition at line 87 of file Block.php.
Referenced by SpecialUnblock\execute(), and SpecialBlockList\getBlockListPager().
const Block::TYPE_IP = 2 |
Definition at line 84 of file Block.php.
Referenced by BlockTest\addXffBlocks(), SpecialUnblock\execute(), BlockListPager\formatValue(), SpecialBlockList\getBlockListPager(), SpecialUnblock\getFields(), getRangeEnd(), getRangeStart(), newLoad(), parseTarget(), SpecialBlock\processForm(), SpecialUnblock\processUnblock(), and SpecialBlock\validateTarget().
const Block::TYPE_RANGE = 3 |
Definition at line 85 of file Block.php.
Referenced by BlockTest\addXffBlocks(), MediaWiki\Auth\AuthManager\checkAccountCreatePermissions(), SpecialContributions\contributionsSub(), SpecialUnblock\execute(), BlockListPager\formatValue(), SpecialBlockList\getBlockListPager(), SpecialUnblock\getFields(), getRangeEnd(), getRangeStart(), DeletedContributionsPage\getSubTitle(), newLoad(), parseTarget(), SpecialBlock\processForm(), SpecialUnblock\processUnblock(), MediaWiki\Auth\CheckBlocksSecondaryAuthenticationProvider\testUserForCreation(), and SpecialBlock\validateTarget().
const Block::TYPE_USER = 1 |
Definition at line 83 of file Block.php.
Referenced by SpecialBlock\blockLogFlags(), SpecialUnblock\execute(), BlockListPager\formatValue(), User\getBlockFromCookieValue(), SpecialBlockList\getBlockListPager(), SpecialUnblock\getFields(), getRangeEnd(), getRangeStart(), User\loadFromSession(), newLoad(), parseTarget(), SpecialBlock\processForm(), UserTest\testAutoblockCookieInfiniteExpiry(), UserTest\testAutoblockCookies(), UserTest\testAutoblockCookiesDisabled(), and SpecialBlock\validateTarget().