Skip to content

Commit

Permalink
refs #5987 I think this should make sure we always get an array if Mu…
Browse files Browse the repository at this point in the history
…ltiSites.getAll finds only one site
  • Loading branch information
tsteur committed Aug 12, 2014
1 parent 45528f5 commit 8929743
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions plugins/MultiSites/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,13 @@ function ($value) {
);
}

if ($multipleWebsitesRequested && $dataTable->getRowsCount() === 1 && $dataTable instanceof DataTable\Simple) {
$simpleTable = $dataTable;
$dataTable = $simpleTable->getEmptyClone();
$dataTable->addRow($simpleTable->getFirstRow());
unset($simpleTable);
}

return $dataTable;
}

Expand Down

0 comments on commit 8929743

Please sign in to comment.