Opened 12 years ago
Closed 11 years ago
#2303 closed enhancement (fixed)
$check_ancestors Parameter Logic
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | normal | Version: | 2.2.3 |
Component: | Tools - Code Improvements | Keywords: | has-patch needs-testing early |
Cc: | nashwan.doaqan@… |
Description
Hi :), It seems that I used the "logic" word a lot in my last tickets :D
Anyway, This ticket is to enhance the functions that have the parameter $check_ancestors=true like:
bbp_is_forum_public()
bbp_is_forum_private()
bbp_is_forum_hidden()
bbp_is_forum_closed()
bbp_is_forum_open()
From my view, all the functions are different in their logical operator:
bbp_is_forum_public() and bbp_is_forum_open() : They must check all the forums in the tree to make
sure that all of them are match. which called "AND" operator.
So when you check if a forum is public, It must check all the ancestors too.
bbp_is_forum_private(),bbp_is_forum_hidden() and bbp_is_forum_closed() : They just need to check if
one forum from the tree is match, which called "OR" operator.
So, No need to check the ancestors status if the forum it self is private!
Attachments (5)
Change History (16)
#1
@
12 years ago
- Keywords needs-testing added
- Milestone changed from Awaiting Review to 2.4
This makes sense. Moving to 2.4 to check the patch and do some testing.
#2
@
12 years ago
Fixing bbp_is_forum_open() function , and have some notes:
1- Why bbPress doesn't have bbp_get_opened_status_id() function?
2- If bbPress forum status is only 'Opened','Closed' why we not make this a checkbox instead of a dropdown in the admin UI?
#4
@
12 years ago
In the third patch:
1- Remove not-needed bbp_is_forum_visibility_id and bbp_is_forum_status_id filters.
2- Make the patch index from the ROOT.
3- Remove the trailing spaces.
Give it a test and better docs :)
#5
@
12 years ago
- Keywords early added
- Milestone changed from 2.4 to 2.5
Good iteration here. Going to move this to 2.5 so it can get in earlier and have more time to test.
#7
@
11 years ago
forums-template-tags-4.patch is a refreshed patch of forums-template-tags-3.patch
First Draft Patch