X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fcache%2FLinkBatch.php;h=d773fff3b7c0f174300fd7f7a7f4594e50e293ae;hb=53779578b44575ef91feb3fad488f09b52f737d7;hp=ec37dd61c3b3e1ae4fc63668fae9ba4967f1aa2b;hpb=6cc415a26e219af87661f8a1de7e758a065a1060;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/cache/LinkBatch.php b/includes/cache/LinkBatch.php index ec37dd61c3..d773fff3b7 100644 --- a/includes/cache/LinkBatch.php +++ b/includes/cache/LinkBatch.php @@ -40,7 +40,11 @@ class LinkBatch { */ protected $caller; - function __construct( $arr = [] ) { + /** + * LinkBatch constructor. + * @param LinkTarget[] $arr Initial items to be added to the batch + */ + public function __construct( $arr = [] ) { foreach ( $arr as $item ) { $this->addObj( $item ); } @@ -188,7 +192,7 @@ class LinkBatch { } // This is similar to LinkHolderArray::replaceInternal - $dbr = wfGetDB( DB_SLAVE ); + $dbr = wfGetDB( DB_REPLICA ); $table = 'page'; $fields = array_merge( LinkCache::getSelectFields(), @@ -232,7 +236,7 @@ class LinkBatch { * Construct a WHERE clause which will match all the given titles. * * @param string $prefix The appropriate table's field name prefix ('page', 'pl', etc) - * @param IDatabase $db DatabaseBase object to use + * @param IDatabase $db DB object to use * @return string|bool String with SQL where clause fragment, or false if no items. */ public function constructSet( $prefix, $db ) {