Opened 15 years ago
Closed 15 years ago
#13773 closed defect (bug) (fixed)
Warning and wrong blog prefix in get_most_active_blogs() and get_blog_list()
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | high |
Severity: | normal | Version: | 3.0 |
Component: | Multisite | Keywords: | has-patch |
Focuses: | Cc: |
Description
- In get_blog_list() and get_most_active_blogs() you get a warning:
Notice: Undefined index: time in \wp-includes\ms-blogs.php on line 548
The reason is, $blogstime? will be never set and/or saved. The best would be here to use the Transient API, see the patches.
- A regression: The main site doesn't have a wp_1_posts table anymore, it has wp_posts. Because of that get_blog_list() returns 0 posts for the main site. We should use $wpdb->get_blog_prefix($id) to avoid it.
Attachments (4)
Change History (11)
#2
@
15 years ago
The only thing I see calling this is get_most_active_blogs(). I don't see anywhere that calls get_most_active_blogs(). How are you triggering this? The kindest thing we can do to those functions is kill them entirely. :-)
#4
@
15 years ago
I suggest stubbing these out and moving to ms-deprecated.php. Those queries are suicidal.
Note: See
TracTickets for help on using
tickets.
That list could exceed the typical memcached object size limit. I'm not sure a transient will work here.