concrete5/concrete5 — pull request #1567 by mlocati (2014-01-13 11:05:13+00:00)
Title: Fix Page::getCollectionPathFromID

getCollectionPathFromID should return the canonical path of a page.

This fix will fix this, by ordering by ppIsCanonical in descendant order, so that the first row (ie the returned one) is the one with ppIsCanonical = 1

Bug-tracker: http://www.concrete5.org/developers/bugs/5-6-2-1/pagegetcollectionpathfromid-returns-wrong-url/