}
} else {
foreach ( $titles as $title ) {
- $resultId = $title->getArticleId();
+ $resultId = $title->getArticleID();
if ( $resultId === 0 ) {
$resultId = $nextSpecialPageId;
$nextSpecialPageId -= 1;
'extract' => false,
'extract trimmed' => false,
'image' => false,
- 'url' => wfExpandUrl( $title->getFullUrl(), PROTO_CURRENT ),
+ 'url' => wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ),
];
}
}
return trim( $matches[1] );
} else {
// Just return the first line
- $lines = explode( "\n", $text );
- return trim( $lines[0] );
+ return trim( explode( "\n", $text )[0] );
}
}
$ns = implode( '|', SearchEngine::defaultNamespaces() );
if ( !$ns ) {
- $ns = "0";
+ $ns = '0';
}
switch ( $type ) {