Skip to:
Content

bbPress.org

Ticket #1274: 2436-fixes.diff

File 2436-fixes.diff, 2.8 KB (added by GautamGupta, 13 years ago)

Fixes the bugs that went into [2436]

  • bb-templates/kakumei/search.php

     
    1414<?php foreach ( $recent as $bb_post ) : ?>
    1515                <li<?php alt_class( 'recent' ); ?>>
    1616                        <a class="result" href="<?php post_link(); ?>"><?php echo bb_show_topic_context( $q, get_topic_title( $bb_post->topic_id ) ); ?></a>
    17                         <span class="freshness"><?php printf( __( 'Posted by <a href="%1$s">%2$s</a> on %3$s'), get_user_profile_link( $bb_post->poster_id ), get_post_author(), bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ) ); ?></span>
     17                        <span class="freshness"><?php printf( __( 'By <a href="%1$s">%2$s</a> on %3$s'), get_user_profile_link( $bb_post->poster_id ), get_post_author(), bb_datetime_format_i18n( bb_get_post_time( array( 'format' => 'timestamp' ) ) ) ); ?></span>
    1818                        <p><?php echo bb_show_context( $q, $bb_post->post_text ); ?></p>
    1919                </li>
    2020<?php endforeach; ?>
     
    2727        <h4><?php _e( 'Relevant Topics' )?></h4>
    2828        <ol>
    2929<?php foreach ( $relevant as $topic ) : ?>
     30<?php $bb_post = bb_get_first_post( $topic ); ?>
    3031                <li<?php alt_class( 'relevant' ); ?>>
    31                         <a class="result" href="<?php post_link( $topic->post_id ); ?>"><?php echo bb_show_topic_context( $q, get_topic_title() ); ?></a>
    32                         <span class="freshness"><?php printf( __( 'Posted by <a href="%1$s">%2$s</a> on %3$s' ), get_user_profile_link( $topic->topic_id ), get_topic_author(), bb_datetime_format_i18n( get_topic_start_time( array( 'format' => 'timestamp' ) ) ) ); ?></span>
    33                         <p><?php echo bb_show_context( $q, $topic->post_text ); ?></p>
     32                        <a class="result" href="<?php post_link(); ?>"><?php echo bb_show_topic_context( $q, get_topic_title() ); ?></a>
     33                        <span class="freshness"><?php printf( __( 'By <a href="%1$s">%2$s</a> on %3$s' ), get_user_profile_link( $topic->topic_poster ), get_topic_author(), bb_datetime_format_i18n( get_topic_start_time( array( 'format' => 'timestamp' ) ) ) ); ?></span>
     34                        <p><?php echo bb_show_context( $q, $bb_post->post_text ); ?></p>
    3435                </li>
    3536<?php endforeach; ?>
    3637        </ol>
  • search.php

     
    2828        /* Relevant */
    2929        $bb_query_form->BB_Query_Form( 'topic', array( 'search' => $q ), array( 'page' => 1, 'post_status' => 0, 'topic_status' => 0, 'search', 'forum_id', 'tag', 'topic_author', 'post_author' ), 'bb_relevant_search' );
    3030        $relevant = $bb_query_form->results;
    31         if ( $recent ) {
     31        if ( $relevant ) {
    3232                $relevant_count = isset( $bb_query_form->count ) ? $bb_query_form->count : count( $relevant );
    3333                $relevant = array_slice( $relevant, $search_start, $search_stop );
    3434        } else {