Aaron Schulz has submitted this change and it was merged.
Change subject: Cleaned up getScopedFileLocks() return value
......................................................................
Cleaned up getScopedFileLocks() return value
* Just return the ScopedLock itself without wrappig it in an array.
This also makes getScopedLocksForOps() actually return the correct
type according to the docs
Change-Id: Ic2d01d56c3fcb22af3adb5e5d4d1586d62316552
---
M includes/filebackend/FileBackend.php
M includes/filebackend/FileBackendMultiWrite.php
M includes/filebackend/FileBackendStore.php
3 files changed, 4 insertions(+), 6 deletions(-)
Approvals:
Gilles: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/filebackend/FileBackend.php
b/includes/filebackend/FileBackend.php
index ce0360f..cd82ab1 100644
--- a/includes/filebackend/FileBackend.php
+++ b/includes/filebackend/FileBackend.php
@@ -1302,7 +1302,7 @@
*
* @param array $ops List of file operations to
FileBackend::doOperations()
* @param Status $status Status to update on lock/unlock
- * @return array List of ScopedFileLocks or null values
+ * @return ScopedLock|null
* @since 1.20
*/
abstract public function getScopedLocksForOps( array $ops, Status
$status );
diff --git a/includes/filebackend/FileBackendMultiWrite.php
b/includes/filebackend/FileBackendMultiWrite.php
index d27d2c6..6c6a90b 100644
--- a/includes/filebackend/FileBackendMultiWrite.php
+++ b/includes/filebackend/FileBackendMultiWrite.php
@@ -40,9 +40,7 @@
* @since 1.19
*/
class FileBackendMultiWrite extends FileBackend {
- /** @var array Prioritized list of FileBackendStore objects.
- * array of (backend index => backends)
- */
+ /** @var FileBackendStore[] Prioritized list of FileBackendStore
objects */
protected $backends = array();
/** @var int Index of master backend */
@@ -688,6 +686,6 @@
);
// Actually acquire the locks
- return array( $this->getScopedFileLocks( $pbPaths, 'mixed',
$status ) );
+ return $this->getScopedFileLocks( $pbPaths, 'mixed', $status );
}
}
diff --git a/includes/filebackend/FileBackendStore.php
b/includes/filebackend/FileBackendStore.php
index e4b07b8..2562f52 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -1058,7 +1058,7 @@
public function getScopedLocksForOps( array $ops, Status $status ) {
$paths = $this->getPathsToLockForOpsInternal(
$this->getOperationsInternal( $ops ) );
- return array( $this->getScopedFileLocks( $paths, 'mixed',
$status ) );
+ return $this->getScopedFileLocks( $paths, 'mixed', $status );
}
final protected function doOperationsInternal( array $ops, array $opts
) {
--
To view, visit https://gerrit.wikimedia.org/r/239424
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2d01d56c3fcb22af3adb5e5d4d1586d62316552
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Gilles <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits