Only consider article ID if A/B test enabled

The article ID shouldn't matter for display of table of contents
unless the A/B test is enabled.

This also has the added benefit of making the content provider
work with table of contents on articles again (content provider articles
always have a page id of 0)

Change-Id: I6af5e1476827828d0974ecbb110476ac1e5dc0c9
This commit is contained in:
Jon Robson 2022-04-08 09:36:35 -07:00 committed by Jdlrobson
parent 193b33d85e
commit 3432cf2c80
1 changed files with 1 additions and 2 deletions

View File

@ -64,14 +64,13 @@ class SkinVector22 extends SkinVector {
if (
!$title ||
$title->getArticleID() === 0 ||
$title->isMainPage()
) {
return false;
}
if ( $this->isTOCABTestEnabled() ) {
return true;
return $title->getArticleID() !== 0;
}
return $this->isTOCEnabled();