Changeset 4062
- Timestamp:
- 07/06/2012 12:04:06 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/plugin/bbp-includes/bbp-reply-functions.php
r4061 r4062 1389 1389 return $where; 1390 1390 1391 global $wpdb; 1392 1393 // Table name for posts 1394 $table_name = $wpdb->prefix . 'posts'; 1395 1391 1396 // Get the topic ID 1392 $topic_id = bbp_get_topic_id();1397 $topic_id = bbp_get_topic_id(); 1393 1398 1394 1399 // The text we're searching for 1395 $search = 'WHERE 1=1 AND wp_posts.post_parent = ' . $topic_id;1400 $search = "WHERE 1=1 AND {$table_name}.post_parent = {$topic_id}"; 1396 1401 1397 1402 // The text to replace it with 1398 $replace = 'FORCE INDEX (PRIMARY, post_parent) WHERE 1=1 AND (wp_posts.ID = ' . $topic_id . ' OR wp_posts.post_parent = ' . $topic_id . ')';1403 $replace = "FORCE INDEX (PRIMARY, post_parent) WHERE 1=1 AND ({$table_name}.ID = {$topic_id} OR wp_posts.post_parent = {$topic_id})"; 1399 1404 1400 1405 // Try to replace the search text with the replacement
Note: See TracChangeset
for help on using the changeset viewer.