ojsde/ojs — comment on commit 5f776919316b1877b0ee7e5b5c8cdca5062b075b
File: classes/article/DoiHelper.inc.php line 54
By asmecher:

For Articles and Issues, there's a specific check to ensure that $request->getJournal()->getId() == $pubObject->getJournalId().
For Galleys and Supplementary Files, it's assumed that $request->getJournal()->getId() will be appropriate.

If the check is deemed necessary for any of the entities, it should be coded for all of them. We've never had performance problems in this area before; if that's old code, it's probably a mistake.