* Add an option such as LIMIT or USE INDEX. If an option was set
* before, the old value will be overwritten
* @param string $name Option name
- * @param string|string[] $value Option value
+ * @param string|string[]|null $value Option value
*/
protected function addOption( $name, $value = null ) {
if ( is_null( $value ) ) {
}
/**
- * @param string $query
- * @param string $protocol
+ * @param string|null $query
+ * @param string|null $protocol
* @return null|string
*/
public function prepareUrlQuerySearchString( $query = null, $protocol = null ) {
if ( $showBlockInfo ) {
$this->addFields( [
'ipb_id',
- 'ipb_by',
- 'ipb_by_text',
'ipb_expiry',
'ipb_timestamp'
] );
+ $actorQuery = ActorMigration::newMigration()->getJoin( 'ipb_by' );
+ $this->addTables( $actorQuery['tables'] );
+ $this->addFields( $actorQuery['fields'] );
+ $this->addJoinConds( $actorQuery['joins'] );
$commentQuery = CommentStore::getStore()->getJoin( 'ipb_reason' );
$this->addTables( $commentQuery['tables'] );
$this->addFields( $commentQuery['fields'] );
* Same as addPageSubItems(), but one element of $data at a time
* @param int $pageId Page ID
* @param array $item Data array à la ApiResult
- * @param string $elemname XML element name. If null, getModuleName()
+ * @param string|null $elemname XML element name. If null, getModuleName()
* is used
* @return bool Whether the element fit in the result
*/