gallery/gallery3 — pull request #366 by shadlaws (2013-05-14 11:46:46+00:00)
Title: #2069 - Change "Fix your Gallery" task go faster and be more comprehensive.

- optimize MPTT pointer rebuilding for leaf nodes (i.e. non-albums).
- reverse order_by to try and preserve existing tree ordering.
- reset item level while we're here.
- use "$stack[] = 123" instead of array_push($stack, 123) since it's faster.