aboutsummaryrefslogtreecommitdiffstats
path: root/includes/filerepo
diff options
context:
space:
mode:
authorReedy <reedy@wikimedia.org>2021-11-19 23:19:42 +0000
committerReedy <reedy@wikimedia.org>2021-11-19 23:19:42 +0000
commit7bf779524ab1fd8e1d74f79ea4840564d48eea4d (patch)
treeaa7bf9869017aac069d1cfaf6ab81288e0787553 /includes/filerepo
parent5ebda60e40619921dd8185cd67ea6495ceb7dec0 (diff)
downloadmediawikicore-7bf779524ab1fd8e1d74f79ea4840564d48eea4d.tar.gz
mediawikicore-7bf779524ab1fd8e1d74f79ea4840564d48eea4d.zip
Remove or replace usages of "sanity"
Bug: T254646 Change-Id: I2b120f0b9c9e1dc1a6c216bfefa3f2463efe1001
Diffstat (limited to 'includes/filerepo')
-rw-r--r--includes/filerepo/FileRepo.php2
-rw-r--r--includes/filerepo/RepoGroup.php2
-rw-r--r--includes/filerepo/file/File.php2
-rw-r--r--includes/filerepo/file/LocalFile.php6
-rw-r--r--includes/filerepo/file/OldLocalFile.php2
5 files changed, 7 insertions, 7 deletions
diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php
index 5a80be73391e..dee3bc674380 100644
--- a/includes/filerepo/FileRepo.php
+++ b/includes/filerepo/FileRepo.php
@@ -1335,7 +1335,7 @@ class FileRepo {
// Archive destination file if it exists.
// This will check if the archive file also exists and fail if does.
- // This is a sanity check to avoid data loss. On Windows and Linux,
+ // This is a check to avoid data loss. On Windows and Linux,
// copy() will overwrite, so the existence check is vulnerable to
// race conditions unless a functioning LockManager is used.
// LocalFile also uses SELECT FOR UPDATE for synchronization.
diff --git a/includes/filerepo/RepoGroup.php b/includes/filerepo/RepoGroup.php
index 92cfba85a086..06b50ef9cf54 100644
--- a/includes/filerepo/RepoGroup.php
+++ b/includes/filerepo/RepoGroup.php
@@ -147,7 +147,7 @@ class RepoGroup {
}
}
- $image = $image instanceof File ? $image : false; // type sanity
+ $image = $image instanceof File ? $image : false; // type check
# Cache file existence or non-existence
if ( $useCache && ( !$image || $image->isCacheable() ) ) {
$this->cache->setField( $dbkey, $timeKey, $image );
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index e94975ed4eb0..bb5b8e2f1ad9 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -218,7 +218,7 @@ abstract class File implements IDBAccessObject, MediaHandlerState {
# Normalize NS_MEDIA -> NS_FILE
if ( $ret->getNamespace() === NS_MEDIA ) {
$ret = Title::makeTitleSafe( NS_FILE, $ret->getDBkey() );
- # Sanity check the title namespace
+ # Double check the titles namespace
} elseif ( $ret->getNamespace() !== NS_FILE ) {
$ret = null;
}
diff --git a/includes/filerepo/file/LocalFile.php b/includes/filerepo/file/LocalFile.php
index d39f886d0fde..a2cf4d841d17 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -619,7 +619,7 @@ class LocalFile extends File {
$array = (array)$row;
$prefixLength = strlen( $prefix );
- // Sanity check prefix once
+ // Double check prefix once
if ( substr( key( $array ), 0, $prefixLength ) !== $prefix ) {
throw new MWException( __METHOD__ . ': incorrect $prefix parameter' );
}
@@ -826,7 +826,7 @@ class LocalFile extends File {
$dbw->update( 'image',
[
- 'img_size' => $this->size, // sanity
+ 'img_size' => $this->size,
'img_width' => $this->width,
'img_height' => $this->height,
'img_bits' => $this->bits,
@@ -1578,7 +1578,7 @@ class LocalFile extends File {
$purgeList = [];
foreach ( $files as $file ) {
# Check that the reference (filename or sha1) is part of the thumb name
- # This is a basic sanity check to avoid erasing unrelated directories
+ # This is a basic check to avoid erasing unrelated directories
if ( strpos( $file, $reference ) !== false
|| strpos( $file, "-thumbnail" ) !== false // "short" thumb name
) {
diff --git a/includes/filerepo/file/OldLocalFile.php b/includes/filerepo/file/OldLocalFile.php
index 7883bcc03dfe..7e6123faa46b 100644
--- a/includes/filerepo/file/OldLocalFile.php
+++ b/includes/filerepo/file/OldLocalFile.php
@@ -361,7 +361,7 @@ class OldLocalFile extends LocalFile {
wfDebug( __METHOD__ . ': upgrading ' . $this->archive_name . " to the current schema" );
$dbw->update( 'oldimage',
[
- 'oi_size' => $this->size, // sanity
+ 'oi_size' => $this->size,
'oi_width' => $this->width,
'oi_height' => $this->height,
'oi_bits' => $this->bits,