MediaWiki REL1_41
|
This is not intended to be a long-term part of MediaWiki; it will be deprecated and removed once actor migration is complete. More...
Inherits MediaWiki\User\ActorMigrationBase.
Public Member Functions | |||||||||||||
__construct ( $stage, ActorStoreFactory $actorStoreFactory) | |||||||||||||
getInsertValues (IDatabase $dbw, $key, UserIdentity $user) | |||||||||||||
Get UPDATE fields for the actor.
| |||||||||||||
getInsertValuesWithTempTable (IDatabase $dbw, $key, UserIdentity $user) | |||||||||||||
Get UPDATE fields for the actor.
| |||||||||||||
getJoin ( $key) | |||||||||||||
Get SELECT fields and joins for the actor key.
| |||||||||||||
getWhere (IReadableDatabase $db, $key, $users, $useId=true) | |||||||||||||
Get WHERE condition for the actor.
| |||||||||||||
Public Member Functions inherited from MediaWiki\User\ActorMigrationBase | |||||||||||||
__construct ( $fieldInfos, $stage, ActorStoreFactory $actorStoreFactory, $options=[]) | |||||||||||||
isAnon ( $field) | |||||||||||||
Return an SQL condition to test if a user field is anonymous. | |||||||||||||
isNotAnon ( $field) | |||||||||||||
Return an SQL condition to test if a user field is non-anonymous. | |||||||||||||
Static Public Member Functions | |
static | newMigration () |
Static constructor. | |
Public Attributes | |
const | FIELD_INFOS |
Field information. | |
const | MIGRATION_STAGE_SCHEMA_COMPAT = 1 |
Constant for extensions to feature-test whether $wgActorTableSchemaMigrationStage (in MW <1.34) expects MIGRATION_* or SCHEMA_COMPAT_*. | |
Additional Inherited Members | |
Protected Member Functions inherited from MediaWiki\User\ActorMigrationBase | |
checkDeprecation ( $key) | |
Issue deprecation warning/error as appropriate. | |
getFieldInfo ( $key) | |
Get config information about a field. | |
getInstanceName () | |
Get a name for this instance to use in error messages. | |
This is not intended to be a long-term part of MediaWiki; it will be deprecated and removed once actor migration is complete.
Definition at line 20 of file ActorMigration.php.
MediaWiki\User\ActorMigration::__construct | ( | $stage, | |
ActorStoreFactory | $actorStoreFactory ) |
int | $stage | |
ActorStoreFactory | $actorStoreFactory |
Definition at line 92 of file ActorMigration.php.
References SCHEMA_COMPAT_OLD.
MediaWiki\User\ActorMigration::getInsertValues | ( | IDatabase | $dbw, |
$key, | |||
UserIdentity | $user ) |
Get UPDATE fields for the actor.
IDatabase | $dbw | Database to use for creating an actor ID, if necessary |
string | $key | A key such as "rev_user" identifying the actor field being fetched. |
UserIdentity | $user | User to set in the update |
$values
to IDatabase->update()
or $a
to IDatabase->insert()
E.g. for key=log_user, use
[ 'log_actor' => ... ]` Reimplemented from MediaWiki\User\ActorMigrationBase.
Definition at line 134 of file ActorMigration.php.
MediaWiki\User\ActorMigration::getInsertValuesWithTempTable | ( | IDatabase | $dbw, |
$key, | |||
UserIdentity | $user ) |
Get UPDATE fields for the actor.
IDatabase | $dbw | Database to use for creating an actor ID, if necessary |
string | $key | A key such as "rev_user" identifying the actor field being fetched. |
UserIdentity | $user | User to set in the update |
$values
to IDatabase->update()
or $a
to IDatabase->insert()
Reimplemented from MediaWiki\User\ActorMigrationBase.
Definition at line 142 of file ActorMigration.php.
MediaWiki\User\ActorMigration::getJoin | ( | $key | ) |
Get SELECT fields and joins for the actor key.
string | $key | A key such as "rev_user" identifying the actor field being fetched. |
$table
to IDatabase->select()
or SelectQueryBuilder::tables
$vars
to IDatabase->select()
or SelectQueryBuilder::fields
$join_conds
to IDatabase->select()
or SelectQueryBuilder::joinConds
All tables, fields, and joins are aliased, so +
is safe to use.{table} JOIN actor ON {table_prefix}_actor = actor_id
E.g. for key=rev_user, use revision JOIN actor ON rev_actor = actor_id
Reimplemented from MediaWiki\User\ActorMigrationBase.
Definition at line 113 of file ActorMigration.php.
MediaWiki\User\ActorMigration::getWhere | ( | IReadableDatabase | $db, |
$key, | |||
$users, | |||
$useId = true ) |
Get WHERE condition for the actor.
IReadableDatabase | $db | Database to use for quoting and list-making |
string | $key | A key such as "rev_user" identifying the actor field being fetched. |
UserIdentity | UserIdentity[] | null | false | $users | Users to test for. Passing null, false, or the empty array will return 'conds' that never match, and an empty array for 'orconds'. |
bool | $useId | If false, don't try to query by the user ID. Intended for use with rc_user since it has an index on (rc_user_text,rc_timestamp) but not (rc_user,rc_timestamp). |
$table
to IDatabase->select()
or SelectQueryBuilder::tables
$cond
to IDatabase->select()
or SelectQueryBuilder::conds
$join_conds
to IDatabase->select()
or SelectQueryBuilder::joinConds
All tables and joins are aliased, so +
is safe to use.{table_prefix}_actor IN ({list of actor IDs})
. E.g. for key=rev_user, use rev_actor IN ({list of actor IDs})
. Use MediaWikiServices::getInstance()->getActorNormalization() ->findActorId( $user, $db )
to get the actor ID for a given user. Reimplemented from MediaWiki\User\ActorMigrationBase.
Definition at line 124 of file ActorMigration.php.
|
static |
Static constructor.
Definition at line 82 of file ActorMigration.php.
References MediaWiki\MediaWikiServices\getInstance().
const MediaWiki\User\ActorMigration::FIELD_INFOS |
Field information.
Definition at line 31 of file ActorMigration.php.
const MediaWiki\User\ActorMigration::MIGRATION_STAGE_SCHEMA_COMPAT = 1 |
Constant for extensions to feature-test whether $wgActorTableSchemaMigrationStage (in MW <1.34) expects MIGRATION_* or SCHEMA_COMPAT_*.
Definition at line 25 of file ActorMigration.php.