Skip to:
Content

bbPress.org

Changes between Initial Version and Version 2 of Ticket #3125


Ignore:
Timestamp:
07/05/2017 09:20:37 PM (4 years ago)
Author:
netweb
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #3125

    • Property Cc contato@… added
    • Property Keywords needs-patch needs-unit-tests added
    • Property Summary changed from bbp_get_topic_id might incorrectly give back a reply_id or forum_id to `bbp_get_topic_id()` might incorrectly return a reply_id or forum_id
  • Ticket #3125 – Description

    initial v2  
    1 Calling the bbp_get_topic_id($id) function will check if $id is a valid number by using ( ! empty( $topic_id ) && is_numeric( $topic_id ) ).
    2 If function bbp_get_topic_id is called with a forum_id or a reply_id, it will still accept the value.
     1Calling the `bbp_get_topic_id()` function will check if $id is a valid number by using `( ! empty( $topic_id ) && is_numeric( $topic_id ) )`.
     2If function `bbp_get_topic_id()` is called with a `forum_id` or a `reply_id`, it will still accept the value.
    33
    44This behaviour should be changed, but there might be 2 ways:
     
    772) if $id is an ID for a reply, return the corresponding ID for the topic this reply is part of (ID crawling)
    88
    9 Regardless of chosing 1) or 2) apply the same logic to bbp_get_forum_id and bbp_get_reply_id.
     9Regardless of choosing 1) or 2) apply the same logic to `bbp_get_forum_id()` and `bbp_get_reply_id()`.