Last active
December 21, 2015 00:59
-
-
Save larcher/6224446 to your computer and use it in GitHub Desktop.
Patch for WPMUDEV Forums plugin, v 2.0.1.7 -- fixes the search results page so that each result links to the containing topic.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- forums-original.php 2013-08-13 13:51:00.000000000 -0500 | |
+++ forums.php 2013-08-13 13:47:15.000000000 -0500 | |
@@ -917,7 +917,7 @@ | |
} else { | |
$content = $content . '<tr style="background-color:' . $tmp_forum_color_two . '">'; | |
} | |
- $tmp_forum = forum_get_details($_POST['tid']); | |
+ $tmp_forum = forum_get_details($tmp_result['post_topic_ID']); | |
$tmp_topic_title = $tmp_forum['topic_title']; | |
$tmp_topic_post_count = $wpdb->get_var( $wpdb->prepare("SELECT COUNT(*) FROM " . $db_prefix . "forums_posts WHERE post_topic_ID = %d", $tmp_result['post_topic_ID']) ); | |
@@ -2399,7 +2399,7 @@ | |
$db_prefix = $wpdb->prefix; | |
} | |
- $forum = $wpdb->get_row( $wpdb->prepare("SELECT * FROM " . $db_prefix . "forums_topics WHERE topic_ID = %d", $_GET['topic']), ARRAY_A); | |
+ $forum = $wpdb->get_row( $wpdb->prepare("SELECT * FROM " . $db_prefix . "forums_topics WHERE topic_ID = %d", $topic_id), ARRAY_A); | |
if ($forum) { | |
$forum['topic_title'] = stripslashes($forum['topic_title']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment