Opened 19 years ago
Closed 19 years ago
#1456 closed defect (bug) (fixed)
wp_notify_moderator includes unnecessary DB query [patch]
Reported by: | skippy | Owned by: | markjaquith |
---|---|---|---|
Milestone: | Priority: | low | |
Severity: | normal | Version: | 1.5.1.2 |
Component: | Optimization | Keywords: | bg|commit bg|has-patch |
Focuses: | Cc: |
Description
wp_notify_moderator(), on line 243 of pluggable-functions.php:
$user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID='$post->post_author' LIMIT 1");
The $user variable is not used in this function, and is therefore unnecessary.
Attachments (1)
Change History (4)
#1
@
19 years ago
- Owner changed from anonymous to matt
- Summary changed from wp_notify_moderator includes unnecessary DB query to wp_notify_moderator includes unnecessary DB query [patch]
Looks like it was just copied from wp_notify_postauthor() where it is needed. Good catch!
Note: See
TracTickets for help on using
tickets.
patch for 1.6 SVN