Skip to:
Content
Pages
Categories
Search
Top
Bottom

possible error in topic_link() function

  • @bogdancismariu

    Member

    i think that the following line:

    echo apply_filters( 'topic_link', get_topic_link( $id ), $id, $context );

    should be replaced with this line:

    echo apply_filters( 'topic_link', get_topic_link( $id, $page, $context) );

    this is inside the topic_link() function, in functions.bb-template.php file

    i use version1.0-alpha-6 and this line is number 855.

    please correct me if i’m wrong.

Viewing 3 replies - 1 through 3 (of 3 total)
  • @chrishajer

    Participant

    Can you explain what problems this line is causing, and what changing the line does to fix it? How did you find this problem?

    @bogdancismariu

    Member

    i wanted to modify my template, in order to send the user to the last page of the selected topic. (this was before i discovered the topic_last_post_link() function).

    in order to do this, i manually computed the last page number and send it to topic_link() through the $page parameter. nothing happened so i looked at the code and found the error i’ve mentioned. after replacing that line with the one i’ve suggested, everything seemed ok.

    any thoughts?

    @chrishajer

    Participant

    I think you should file a bug and a patch at https://trac.bbpress.org/ . They will decide there if it’s valid or not.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Skip to toolbar