Fix typos in comments (I-J)
Change-Id: Icaea2b6665cfc3b811d94f70c93452237f5e72bf
This commit is contained in:
parent
a46be96d84
commit
60faebb725
17 changed files with 38 additions and 38 deletions
|
|
@ -220,7 +220,7 @@ class InfoAction extends FormlessAction {
|
|||
$content .= $this->msg( 'pageinfo-header' )->parse();
|
||||
}
|
||||
|
||||
// TODO we shouldn't be adding styles manually like thes
|
||||
// TODO we shouldn't be adding styles manually like this
|
||||
// Hide "This page is a member of # hidden categories" explanation
|
||||
$content .= Html::element(
|
||||
'style',
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* The idea is that it's a Message that has some extra data for the API to use when interpreting it
|
||||
* as an error (or, in the future, as a warning). Internals of MediaWiki often use messages (or
|
||||
* message keys, or Status objects containing messages) to pass information about errors to the user
|
||||
* (see e.g. PermssionManager::getPermissionErrors()) and the API has to make do with that.
|
||||
* (see e.g. PermissionManager::getPermissionErrors()) and the API has to make do with that.
|
||||
*
|
||||
* @since 1.25
|
||||
* @note This interface exists to work around PHP's inheritance, so ApiMessage
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ use StatusValue;
|
|||
*/
|
||||
interface IEditConstraint extends IEditObject {
|
||||
|
||||
/** @var string - Constaint passed, no error */
|
||||
/** @var string - Constraint passed, no error */
|
||||
public const CONSTRAINT_PASSED = 'constraint-passed';
|
||||
|
||||
/** @var string - Constaint failed, use getLegacyStatus to see the failure */
|
||||
/** @var string - Constraint failed, use getLegacyStatus to see the failure */
|
||||
public const CONSTRAINT_FAILED = 'constraint-failed';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
/**
|
||||
* Used for importing XML dumps where the content of the dump is in a string.
|
||||
* This class is ineffecient, and should only be used for small dumps.
|
||||
* This class is inefficient, and should only be used for small dumps.
|
||||
* For larger dumps, ImportStreamSource should be used instead.
|
||||
*
|
||||
* @ingroup SpecialPage
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ interface ImportableUploadRevision {
|
|||
|
||||
/**
|
||||
* @since 1.31
|
||||
* @return string|bool sha1 of the revision, false if not set or errors occour.
|
||||
* @return string|bool sha1 of the revision, false if not set or errors occur.
|
||||
*/
|
||||
public function getSha1();
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ use MediaWiki\Page\PageReference;
|
|||
* Class to both describe a background job and handle jobs.
|
||||
* To push jobs onto queues, use JobQueueGroup::singleton()->push();
|
||||
*
|
||||
* Job objects are constructed by the job queue, and must have an approriate
|
||||
* Job objects are constructed by the job queue, and must have an appropriate
|
||||
* constructor signature; see IJobSpecification.
|
||||
*
|
||||
* @stable to extend
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ abstract class JobQueue {
|
|||
* by timestamp, allowing for some jobs to be popped off out of order.
|
||||
* If "random" is used, pop() will pick jobs in random order.
|
||||
* Note that it may only be weakly random (e.g. a lottery of the oldest X).
|
||||
* If "any" is choosen, the queue will use whatever order is the fastest.
|
||||
* If "any" is chosen, the queue will use whatever order is the fastest.
|
||||
* This might be useful for improving concurrency for job acquisition.
|
||||
* - claimTTL : If supported, the queue will recycle jobs that have been popped
|
||||
* but not acknowledged as completed after this many seconds. Recycling
|
||||
|
|
@ -530,7 +530,7 @@ abstract class JobQueue {
|
|||
protected function doIsRootJobOldDuplicate( IJobSpecification $job ) {
|
||||
$params = $job->hasRootJobParams() ? $job->getRootJobParams() : null;
|
||||
if ( !$params ) {
|
||||
return false; // job has no de-deplication info
|
||||
return false; // job has no de-duplication info
|
||||
}
|
||||
|
||||
$key = $this->getRootJobCacheKey( $params['rootJobSignature'], $job->getType() );
|
||||
|
|
|
|||
|
|
@ -837,7 +837,7 @@ class JobQueueDB extends JobQueue {
|
|||
// However, SQLite has the opposite behavior due to DB-level locking.
|
||||
$flags = $lb::CONN_TRX_AUTOCOMMIT;
|
||||
} else {
|
||||
// Jobs insertion will be defered until the PRESEND stage to reduce contention.
|
||||
// Jobs insertion will be deferred until the PRESEND stage to reduce contention.
|
||||
$flags = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ class JobQueueFederated extends JobQueue {
|
|||
// Local ring variable that may be changed to point to a new ring on failure
|
||||
$partitionRing = $this->partitionRing;
|
||||
// Try to insert the jobs and update $partitionsTry on any failures.
|
||||
// Retry to insert any remaning jobs again, ignoring the bad partitions.
|
||||
// Retry to insert any remaining jobs again, ignoring the bad partitions.
|
||||
$jobsLeft = $jobs;
|
||||
for ( $i = $this->maxPartitionsTry; $i > 0 && count( $jobsLeft ); --$i ) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ class JobQueueRedis extends JobQueue {
|
|||
* - compression : The type of compression to use; one of (none,gzip).
|
||||
* - daemonized : Set to true if the redisJobRunnerService runs in the background.
|
||||
* This will disable job recycling/undelaying from the MediaWiki side
|
||||
* to avoid redundance and out-of-sync configuration.
|
||||
* to avoid redundancy and out-of-sync configuration.
|
||||
* @throws InvalidArgumentException
|
||||
*/
|
||||
public function __construct( array $params ) {
|
||||
|
|
@ -330,7 +330,7 @@ LUA;
|
|||
continue;
|
||||
}
|
||||
|
||||
// If $item is invalid, the runner loop recyling will cleanup as needed
|
||||
// If $item is invalid, the runner loop recycling will cleanup as needed
|
||||
$job = $this->getJobFromFields( $item ); // may be false
|
||||
} while ( !$job ); // job may be false if invalid
|
||||
} catch ( RedisException $e ) {
|
||||
|
|
@ -471,7 +471,7 @@ LUA;
|
|||
*/
|
||||
protected function doIsRootJobOldDuplicate( IJobSpecification $job ) {
|
||||
if ( !$job->hasRootJobParams() ) {
|
||||
return false; // job has no de-deplication info
|
||||
return false; // job has no de-duplication info
|
||||
}
|
||||
$params = $job->getRootJobParams();
|
||||
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ interface IDatabase {
|
|||
/** @var string Estimate time to apply (scanning, applying) */
|
||||
public const ESTIMATE_DB_APPLY = 'apply';
|
||||
|
||||
/** @var int Combine list with comma delimeters */
|
||||
/** @var int Combine list with comma delimiters */
|
||||
public const LIST_COMMA = 0;
|
||||
/** @var int Combine list with AND clauses */
|
||||
public const LIST_AND = 1;
|
||||
|
|
@ -132,7 +132,7 @@ interface IDatabase {
|
|||
/** @var int Query is known to be a Data Definition Language command */
|
||||
public const QUERY_CHANGE_SCHEMA = 256 | self::QUERY_IGNORE_DBO_TRX;
|
||||
|
||||
/** Flag to return the lock acquision timestamp (null if not acquired) */
|
||||
/** Flag to return the lock acquisition timestamp (null if not acquired) */
|
||||
public const LOCK_TIMESTAMP = 1;
|
||||
|
||||
/** @var bool Parameter to unionQueries() for UNION ALL */
|
||||
|
|
@ -1431,7 +1431,7 @@ interface IDatabase {
|
|||
* @param string|array $conds Array of conditions. See $conds in IDatabase::select()
|
||||
* In order to prevent possible performance or replication issues or damaging a data
|
||||
* accidentally, an empty condition for 'delete' queries isn't allowed.
|
||||
* IDatabase::ALL_ROWS should be passed explicitely in order to delete all rows.
|
||||
* IDatabase::ALL_ROWS should be passed explicitly in order to delete all rows.
|
||||
* @param string $fname Name of the calling function
|
||||
* @return bool Return true if no exception was thrown (deprecated since 1.33)
|
||||
* @throws DBError If an error occurs, {@see query}
|
||||
|
|
@ -1655,7 +1655,7 @@ interface IDatabase {
|
|||
*
|
||||
* Use this method only for the following purposes:
|
||||
* - (a) Release of cooperative locks on resources
|
||||
* - (b) Cancellation of in-proccess deferred tasks
|
||||
* - (b) Cancellation of in-process deferred tasks
|
||||
*
|
||||
* The callback takes the following arguments:
|
||||
* - How the current atomic section (if any) or overall transaction (otherwise) ended
|
||||
|
|
@ -1902,7 +1902,7 @@ interface IDatabase {
|
|||
public function cancelAtomic( $fname = __METHOD__, AtomicSectionIdentifier $sectionId = null );
|
||||
|
||||
/**
|
||||
* Perform an atomic section of reversable SQL statements from a callback
|
||||
* Perform an atomic section of reversible SQL statements from a callback
|
||||
*
|
||||
* The $callback takes the following arguments:
|
||||
* - This database object
|
||||
|
|
@ -1931,7 +1931,7 @@ interface IDatabase {
|
|||
* // Figure out where to store the data based on the new row's ID
|
||||
* $path = $this->recordDirectory . '/' . $dbw->insertId();
|
||||
* // Write the record data to the storage system;
|
||||
* // blob store throughs StoreFailureException on failure
|
||||
* // blob store throws StoreFailureException on failure
|
||||
* $this->blobStore->create( $path, $record->getJSON() );
|
||||
* // Try to cleanup files orphaned by transaction rollback
|
||||
* $dbw->onTransactionResolution(
|
||||
|
|
@ -2191,7 +2191,7 @@ interface IDatabase {
|
|||
*
|
||||
* Named locks are not related to transactions
|
||||
*
|
||||
* @param string $lockName Name of lock to aquire
|
||||
* @param string $lockName Name of lock to acquire
|
||||
* @param string $method Name of the calling method
|
||||
* @param int $timeout Acquisition timeout in seconds (0 means non-blocking)
|
||||
* @param int $flags Bit field of IDatabase::LOCK_* constants
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ interface IMaintainableDatabase extends IDatabase {
|
|||
* doing all row updates within that transaction. It will not be possible to update
|
||||
* rows in batches; this might result in high replication lag.
|
||||
* - b) Forgo table locks entirely and avoid calling this method. Careful use of hints like
|
||||
* LOCK IN SHARE MODE and FOR UPDATE and the use of query batching may be preferrable
|
||||
* LOCK IN SHARE MODE and FOR UPDATE and the use of query batching may be preferable
|
||||
* to using table locks with a potentially large transaction. Use of MySQL and Postges
|
||||
* style REPEATABLE-READ (Snapshot Isolation with or without First-Committer-Rule) can
|
||||
* also be considered for certain tasks that require a consistent view of entire tables.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ use InvalidArgumentException;
|
|||
* @since 1.28
|
||||
*/
|
||||
interface ILBFactory {
|
||||
/** Idion for "no special shutdown flags" */
|
||||
/** Idiom for "no special shutdown flags" */
|
||||
public const SHUTDOWN_NORMAL = 0;
|
||||
/** Do not save "session consistency" DB replication positions */
|
||||
public const SHUTDOWN_NO_CHRONPROT = 1;
|
||||
|
|
@ -306,7 +306,7 @@ interface ILBFactory {
|
|||
/**
|
||||
* Check if transaction rounds can be started, committed, or rolled back right now
|
||||
*
|
||||
* This can be used as a recusion guard to avoid exceptions in transaction callbacks.
|
||||
* This can be used as a recursion guard to avoid exceptions in transaction callbacks.
|
||||
*
|
||||
* @return bool
|
||||
* @since 1.32
|
||||
|
|
@ -330,7 +330,7 @@ interface ILBFactory {
|
|||
public function hasMasterChanges();
|
||||
|
||||
/**
|
||||
* Detemine if any lagged replica DB connection was used
|
||||
* Determine if any lagged replica DB connection was used
|
||||
*
|
||||
* This only applies to the instantiated tracked load balancer instances.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ use LogicException;
|
|||
* Every iteration of beginPrimaryChanges()/commitPrimaryChanges() is called a "transaction round".
|
||||
* Rounds are useful on the primary DB connections because they make single-DB (and by and large
|
||||
* multi-DB) updates in web requests all-or-nothing. Also, transactions on replica DBs are useful
|
||||
* when REPEATABLE-READ or SERIALIZABLE isolation is used because all foriegn keys and constraints
|
||||
* when REPEATABLE-READ or SERIALIZABLE isolation is used because all foreign keys and constraints
|
||||
* hold across separate queries in the DB transaction since the data appears within a consistent
|
||||
* point-in-time snapshot.
|
||||
*
|
||||
|
|
@ -204,7 +204,7 @@ interface ILoadBalancer {
|
|||
* This takes into account load ratios and lag times. It should return a consistent
|
||||
* index during the life time of the load balancer. This initially checks replica DBs
|
||||
* for connectivity to avoid returning an unusable server. This means that connections
|
||||
* might be attempted by calling this method (usally one at the most but possibly more).
|
||||
* might be attempted by calling this method (usually one at the most but possibly more).
|
||||
* Subsequent calls with the same $group will not need to make new connection attempts
|
||||
* since the acquired connection for each group is preserved.
|
||||
*
|
||||
|
|
@ -232,7 +232,7 @@ interface ILoadBalancer {
|
|||
/**
|
||||
* Set the primary wait position and wait for a generic replica DB to catch up to it
|
||||
*
|
||||
* This method is only intented for use a throttling mechanism for high-volume updates.
|
||||
* This method is only intended for use a throttling mechanism for high-volume updates.
|
||||
* Unlike waitFor(), failure does not effect getLaggedReplicaMode()/laggedReplicaUsed().
|
||||
*
|
||||
* This can be used a faster proxy for waitForAll()
|
||||
|
|
@ -246,7 +246,7 @@ interface ILoadBalancer {
|
|||
/**
|
||||
* Set the primary wait position and wait for ALL replica DBs to catch up to it
|
||||
*
|
||||
* This method is only intented for use a throttling mechanism for high-volume updates.
|
||||
* This method is only intended for use a throttling mechanism for high-volume updates.
|
||||
* Unlike waitFor(), failure does not effect getLaggedReplicaMode()/laggedReplicaUsed().
|
||||
*
|
||||
* @param DBPrimaryPos|bool $pos Primary position or false
|
||||
|
|
@ -539,7 +539,7 @@ interface ILoadBalancer {
|
|||
* at least as up-to-date as queries (prior to this method call) on the old connections.
|
||||
*
|
||||
* This can be useful for implementing session consistency, where the session
|
||||
* will be resumed accross multiple HTTP requests or CLI script instances.
|
||||
* will be resumed across multiple HTTP requests or CLI script instances.
|
||||
*
|
||||
* @return DBPrimaryPos|bool Replication position or false if not applicable
|
||||
* @since 1.34
|
||||
|
|
@ -585,7 +585,7 @@ interface ILoadBalancer {
|
|||
/**
|
||||
* Run pre-commit callbacks and defer execution of post-commit callbacks
|
||||
*
|
||||
* Use this only for mutli-database commits
|
||||
* Use this only for multi-database commits
|
||||
*
|
||||
* @param string $fname Caller name
|
||||
* @param int|null $owner ID of the calling instance (e.g. the LBFactory ID)
|
||||
|
|
@ -605,7 +605,7 @@ interface ILoadBalancer {
|
|||
/**
|
||||
* Perform all pre-commit checks for things like replication safety
|
||||
*
|
||||
* Use this only for mutli-database commits
|
||||
* Use this only for multi-database commits
|
||||
*
|
||||
* @param array $options Includes:
|
||||
* - maxWriteDuration : max write query duration time in seconds
|
||||
|
|
@ -824,7 +824,7 @@ interface ILoadBalancer {
|
|||
|
||||
/**
|
||||
* Checks whether the database for generic connections this request was both:
|
||||
* - a) Already choosen due to a prior connection attempt
|
||||
* - a) Already chosen due to a prior connection attempt
|
||||
* - b) Considered highly "lagged"
|
||||
*
|
||||
* @note This method will never cause a new DB connection
|
||||
|
|
|
|||
|
|
@ -206,14 +206,14 @@ class JpegHandler extends ExifBitmapHandler {
|
|||
* (other profiles will be left untouched)
|
||||
* * without color space or profile, in which case browsers
|
||||
* should assume sRGB, but don't always do (e.g. on wide-gamut
|
||||
* monitors (unless it's meant for low bandwith)
|
||||
* monitors (unless it's meant for low bandwidth)
|
||||
* @see https://phabricator.wikimedia.org/T134498
|
||||
*/
|
||||
$colorSpaces = [ self::SRGB_EXIF_COLOR_SPACE, '-' ];
|
||||
$profiles = [ self::SRGB_ICC_PROFILE_DESCRIPTION ];
|
||||
|
||||
// we'll also add TinyRGB profile to images lacking a profile, but
|
||||
// only if they're not low quality (which are meant to save bandwith
|
||||
// only if they're not low quality (which are meant to save bandwidth
|
||||
// and we don't want to increase the filesize by adding a profile)
|
||||
if ( isset( $params['quality'] ) && $params['quality'] > 30 ) {
|
||||
$profiles[] = '-';
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ class ImagePage extends Article {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns language code to be used for dispaying the image, based on request context and
|
||||
* Returns language code to be used for displaying the image, based on request context and
|
||||
* languages available in the file.
|
||||
*
|
||||
* @param WebRequest $request
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ class ImageListPager extends TablePager {
|
|||
private $userCache;
|
||||
|
||||
/**
|
||||
* The unique sort fields for the sort options for unique pagniate
|
||||
* The unique sort fields for the sort options for unique paginate
|
||||
*/
|
||||
private const INDEX_FIELDS = [
|
||||
'img_timestamp' => [ 'img_timestamp', 'img_name' ],
|
||||
|
|
@ -239,7 +239,7 @@ class ImageListPager extends TablePager {
|
|||
return false;
|
||||
}
|
||||
$sortable = array_keys( self::INDEX_FIELDS );
|
||||
/* For reference, the indicies we can use for sorting are:
|
||||
/* For reference, the indices we can use for sorting are:
|
||||
* On the image table: img_actor_timestamp, img_size, img_timestamp
|
||||
* On oldimage: oi_actor_timestamp, oi_name_timestamp
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue