Opened 16 years ago
Closed 16 years ago
#13773 closed defect (bug) (fixed)
Warning and wrong blog prefix in get_most_active_blogs() and get_blog_list()
| Reported by: | ocean90 | Owned by: | |
|---|---|---|---|
| Priority: | high | Milestone: | 3.0 |
| Component: | Multisite | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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
@
16 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
@
16 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
That list could exceed the typical memcached object size limit. I'm not sure a transient will work here.