I did exactly the same approach you did before I stumbled across your module. But while doing some refactoring I found a more simple solution. Currently your approach works because it comments out the 'expanded' part of the tree parameter. But what also works is using `null` as that value.
This is the approach I went about. It retains all other inherited functionality which is nice.
/**
* {@inheritDoc}
*/
public function bookTreeAllData($bid, $link = NULL, $max_depth = NULL) {
$this->loadAllData = TRUE;
$data = parent::bookTreeAllData($bid, $link, $max_depth);
$this->loadAllData = FALSE;
return $data;
}
/**
* {@inheritdoc}
*/
public function getActiveTrailIds($bid, $link) {
return $this->loadAllData ? NULL : parent::getActiveTrailIds($bid, $link);
}
This way the getActiveTrailIds method isn't modified unless called from the bookTreeAllData method.
Postponed
2.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.