nette/nette — pull request #606 by xpavp03 (2012-03-27 11:51:51+00:00)
Title: Find the topmost @layout even if your module is within an additional sub-directory

Here's my directory structure:
apps/AdminModule/SuperModule
apps/AdminModule/EditorModule
...

class Super_AdminUserPresenter extends Admin_BasePresenter

@layout.latte is only found if in
apps/AdminModule/SuperModule/template
apps/AdminModule/template
but not if it's in
apps/template

This pull request fixes it.

A better fix would probably traverse all directories, my solution works sort of as a safety net if locating the layout in "the usual places" fails.

Also, I realize that I could name my presenter Super_Admin_AdminUserPresenter which would make the existing code find the template even in apps/template. I believe however, that my directory structure is legit so why not have this method work with it too.