Do recently updated test only if show_updated. Avoids slow query.

git-svn-id: http://svn.automattic.com/wordpress/trunk@12306 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-12-01 19:35:21 +00:00
parent 711994ba4b
commit 2d10b58caf
1 changed files with 1 additions and 1 deletions

View File

@ -218,7 +218,7 @@ function get_bookmarks($args = '') {
$join = " INNER JOIN $wpdb->term_relationships AS tr ON ($wpdb->links.link_id = tr.object_id) INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_taxonomy_id = tr.term_taxonomy_id";
}
if (get_option('links_recently_updated_time')) {
if ( $show_updated && get_option('links_recently_updated_time') ) {
$recently_updated_test = ", IF (DATE_ADD(link_updated, INTERVAL " . get_option('links_recently_updated_time') . " MINUTE) >= NOW(), 1,0) as recently_updated ";
} else {
$recently_updated_test = '';