Skip to:
Content

bbPress.org

Changeset 53


Ignore:
Timestamp:
02/28/2005 11:41:48 PM (20 years ago)
Author:
matt
Message:

Fix for #30

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-admin/delete-post.php

    r36 r53  
    1414bb_delete_post( $post_id );
    1515
    16 header( 'Location: ' . $_SERVER['HTTP_REFERER'] );
     16$topic = get_topic( $post->topic_id );
     17
     18if ( $topic->topic_posts == 1 )
     19    $sendto = get_forum_link( $topic->forum_id );
     20else
     21    $sendto = $_SERVER['HTTP_REFERER'];
     22
     23header( "Location: $sendto" );
     24exit;
    1725
    1826?>
  • trunk/bb-includes/template-functions.php

    r51 r53  
    8383
    8484function forum_link() {
     85    global $forum;
     86    echo bb_apply_filters('forum_link', get_forum_link() );
     87}
     88
     89function get_forum_link( $id = 0 ) {
    8590    global $forum, $bb;
     91    if ( $id )
     92        $forum = get_forum( $id );
    8693    if ( $bb->mod_rewrite )
    8794        $link = $bb->path . $forum->nice_name;
     
    8996        $link = $bb->path . "forum.php?id=$forum->forum_id";
    9097
    91     echo bb_apply_filters('forum_link', $link);
     98    return bb_apply_filters('get_forum_link', $link);
    9299}
    93100
Note: See TracChangeset for help on using the changeset viewer.