static function splitTrail( $trail ) {
$regex = MediaWikiServices::getInstance()->getContentLanguage()->linkTrail();
$inside = '';
- if ( $trail !== '' ) {
- $m = [];
- if ( preg_match( $regex, $trail, $m ) ) {
- $inside = $m[1];
- $trail = $m[2];
- }
+ if ( $trail !== '' && preg_match( $regex, $trail, $m ) ) {
+ list( , $inside, $trail ) = $m;
}
return [ $inside, $trail ];
}
$attrs = [
'data-mw' => 'interface',
- 'title' => $context->msg( 'tooltip-rollback' )->text(),
- 'data-rollback-count' => (int)$editCount
+ 'title' => $context->msg( 'tooltip-rollback' )->text()
];
$options = [ 'known', 'noclasses' ];