Siebrand has uploaded a new change for review.
https://gerrit.wikimedia.org/r/97098
Change subject: Update formatting
......................................................................
Update formatting
Change-Id: Ie31c370ba497eedc7458973b704132cf4725cf1f
---
M includes/externalstore/ExternalStore.php
M includes/externalstore/ExternalStoreDB.php
M includes/externalstore/ExternalStoreMedium.php
M includes/externalstore/ExternalStoreMwstore.php
4 files changed, 18 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/98/97098/1
diff --git a/includes/externalstore/ExternalStore.php
b/includes/externalstore/ExternalStore.php
index 462b0b9..9e9d976 100644
--- a/includes/externalstore/ExternalStore.php
+++ b/includes/externalstore/ExternalStore.php
@@ -59,6 +59,7 @@
}
$class = 'ExternalStore' . ucfirst( $proto );
+
// Any custom modules should be added to $wgAutoLoadClasses for
on-demand loading
return class_exists( $class ) ? new $class( $params ) : false;
}
@@ -120,6 +121,7 @@
$retval[$url] = false;
}
}
+
return $retval;
}
diff --git a/includes/externalstore/ExternalStoreDB.php
b/includes/externalstore/ExternalStoreDB.php
index 46a8937..2b589da 100644
--- a/includes/externalstore/ExternalStoreDB.php
+++ b/includes/externalstore/ExternalStoreDB.php
@@ -42,6 +42,7 @@
if ( $itemID !== false && $ret !== false ) {
return $ret->getItem( $itemID );
}
+
return $ret;
}
@@ -72,11 +73,13 @@
if ( $itemID === false ) {
$ret[$url] = $blob;
} else {
+ /** @var HistoryBlob $blob */
$ret[$url] = $blob->getItem(
$itemID );
}
}
}
}
+
return $ret;
}
@@ -96,6 +99,7 @@
if ( $dbw->getFlag( DBO_TRX ) ) {
$dbw->commit( __METHOD__ );
}
+
return "DB://$cluster/$id";
}
@@ -142,6 +146,7 @@
function &getMaster( $cluster ) {
$wiki = isset( $this->params['wiki'] ) ? $this->params['wiki']
: false;
$lb =& $this->getLoadBalancer( $cluster );
+
return $lb->getConnection( DB_MASTER, array(), $wiki );
}
@@ -156,6 +161,7 @@
if ( is_null( $table ) ) {
$table = 'blobs';
}
+
return $table;
}
@@ -182,6 +188,7 @@
if ( isset( $externalBlobCache[$cacheID] ) ) {
wfDebugLog( 'ExternalStoreDB-cache',
"ExternalStoreDB::fetchBlob cache hit on
$cacheID\n" );
+
return $externalBlobCache[$cacheID];
}
@@ -209,6 +216,7 @@
}
$externalBlobCache = array( $cacheID => &$ret );
+
return $ret;
}
@@ -217,7 +225,8 @@
*
* @param string $cluster A cluster name valid for use with LBFactory
* @param array $ids A map from the blob_id's to look for to the
requested itemIDs in the blobs
- * @return array A map from the blob_id's requested to their content.
Unlocated ids are not represented
+ * @return array A map from the blob_id's requested to their content.
+ * Unlocated ids are not represented
*/
function batchFetchBlobs( $cluster, array $ids ) {
$dbr = $this->getSlave( $cluster );
@@ -248,6 +257,7 @@
" master on '$cluster' failed locating items: "
.
implode( ',', array_keys( $ids ) ) . "\n" );
}
+
return $ret;
}
@@ -274,6 +284,7 @@
protected function parseURL( $url ) {
$path = explode( '/', $url );
+
return array(
$path[2], // cluster
$path[3], // id
diff --git a/includes/externalstore/ExternalStoreMedium.php
b/includes/externalstore/ExternalStoreMedium.php
index 6ab1f8c..a526df6 100644
--- a/includes/externalstore/ExternalStoreMedium.php
+++ b/includes/externalstore/ExternalStoreMedium.php
@@ -64,6 +64,7 @@
$retval[$url] = $data;
}
}
+
return $retval;
}
diff --git a/includes/externalstore/ExternalStoreMwstore.php
b/includes/externalstore/ExternalStoreMwstore.php
index 1721007..f329b73 100644
--- a/includes/externalstore/ExternalStoreMwstore.php
+++ b/includes/externalstore/ExternalStoreMwstore.php
@@ -43,6 +43,7 @@
// backends should at least have "read-after-create"
consistency.
return $be->getFileContents( array( 'src' => $url ) );
}
+
return false;
}
@@ -66,6 +67,7 @@
$be = FileBackendGroup::singleton()->get( $backendName
);
$blobs = $blobs + $be->getFileContentsMulti( array(
'srcs' => $paths ) );
}
+
return $blobs;
}
@@ -90,6 +92,7 @@
return $url;
}
}
+
return false;
}
}
--
To view, visit https://gerrit.wikimedia.org/r/97098
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie31c370ba497eedc7458973b704132cf4725cf1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits