Do recently updated test only if show_updated. Avoids slow query.
git-svn-id: https://develop.svn.wordpress.org/trunk@12306 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3f21c3ea5c
commit
af737032df
@ -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 = '';
|
||||
|
Loading…
Reference in New Issue
Block a user