mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-02 08:10:04 +00:00
Unify user and author queries on cache_userdata
git-svn-id: https://develop.svn.wordpress.org/trunk@1186 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -175,8 +175,8 @@ function get_currentuserinfo() { // a bit like get_userdata(), on steroids
|
||||
}
|
||||
|
||||
function get_userdata($userid) {
|
||||
global $wpdb, $cache_authors, $tableusers;
|
||||
if ( empty($cache_authors[$userid]) ) {
|
||||
global $wpdb, $cache_userdata, $tableusers;
|
||||
if ( empty($cache_userdata[$userid]) ) {
|
||||
$user = $wpdb->get_row("SELECT * FROM $tableusers WHERE ID = '$userid'");
|
||||
$user->user_nickname = stripslashes($user->user_nickname);
|
||||
$user->user_firstname = stripslashes($user->user_firstname);
|
||||
@@ -1095,6 +1095,7 @@ function start_wp() {
|
||||
);
|
||||
}
|
||||
$authordata = get_userdata($post->post_author);
|
||||
|
||||
$day = mysql2date('d.m.y', $post->post_date);
|
||||
$currentmonth = mysql2date('m', $post->post_date);
|
||||
$numpages = 1;
|
||||
|
||||
Reference in New Issue
Block a user