#25230 closed defect (bug) (fixed)
In get_pages, don't require hierarchical => false for parent arg
| Reported by: | wonderboymusic | Owned by: | wonderboymusic |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.7 |
| Component: | Query | Version: | 1.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
parent requires hierarchical => false, which defaults to true. Should set to false automatically.
Attachments (2)
Change History (9)
#2
@
13 years ago
- Resolution fixed
- Status closed → reopened
Can this be simplified along the lines of the first change in [23599]? See 25230.diff.
#5
@
13 years ago
- Cc added
- Resolution fixed
- Status closed → reopened
Added a new patch for this issue as the original one introduced a bug that causes the hierarchical argument, which is enabled by default, to be disabled when -1 is supplied for the parent argument, it is -1 by default.
The problem seems to be that in simplifying the conditional, the "> 0" portion of the conditional was removed. Since -1 is truthy, the conditional incorrectly applied when -1 was supplied for parent.
My supplied patch, 25230.1.diff, fixes this issue.
#6
@
13 years ago
- Resolution → fixed
- Status reopened → closed
25230.1.diff looks good, please open a new ticket and upload the patch there. This one was closed on a completed milestone.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 25245: