Get all tree data from database

This is a temporary measure. This function can be removed if/when the
core phpBB tree functionality is fixed. Until then, this function will
get all
tree data for us.