Merge "Drop support for building sidebar portal with non-standard format"

This commit is contained in:
jenkins-bot 2020-08-03 20:00:00 +00:00 committed by Gerrit Code Review
commit 391d0caa27
1 changed files with 1 additions and 18 deletions

View File

@ -306,26 +306,9 @@ class SkinVector extends SkinMustache {
}
break;
default:
// Historically some portals have been defined using HTML rather than arrays.
// Let's move away from that to a uniform definition.
if ( !is_array( $content ) ) {
$html = $content;
$content = [];
wfDeprecated(
"`content` field in portal $name must be array."
. "Previously it could be a string but this is no longer supported.",
'1.35.0'
);
} else {
$html = false;
}
$portal = $this->getMenuData(
$props[] = $this->getMenuData(
$name, $content, self::MENU_TYPE_PORTAL
);
if ( $html ) {
$portal['html-items'] .= $html;
}
$props[] = $portal;
break;
}
}