Hotfix for issue #553

This is a hotfix for issue #553 (Backend Pages tab doesn't show pages with status != published).

The first commit rewinds commit decc9f3cc8c3f642ff90d00d74dc543a04fbdd5f but at the same time improves the method (by replacing a vulnerable `where` statement with one that includes a named parameter), making it more secure against SQL injection.

In the second commit I added some documentation to the method (to avoid confusion in the future) and renamed the (internal) `$id` parameter into `$parent_id`.