Changeset 1186
- Timestamp:
- 04/27/2004 03:59:13 AM (20 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-blog-header.php
r1184 r1186 271 271 } 272 272 273 // author stuff 274 foreach ($users as $auteur) { 275 $cache_authors[$auteur->ID] = $auteur; 273 // Author/user stuff 274 $users = $wpdb->get_results("SELECT * FROM $tableusers WHERE 1=1"); 275 foreach ($users as $user) { 276 $cache_userdata[$user->ID] = $user; 276 277 } 277 278 -
trunk/wp-includes/functions.php
r1184 r1186 176 176 177 177 function get_userdata($userid) { 178 global $wpdb, $cache_ authors, $tableusers;179 if ( empty($cache_ authors[$userid]) ) {178 global $wpdb, $cache_userdata, $tableusers; 179 if ( empty($cache_userdata[$userid]) ) { 180 180 $user = $wpdb->get_row("SELECT * FROM $tableusers WHERE ID = '$userid'"); 181 181 $user->user_nickname = stripslashes($user->user_nickname); … … 1096 1096 } 1097 1097 $authordata = get_userdata($post->post_author); 1098 1098 1099 $day = mysql2date('d.m.y', $post->post_date); 1099 1100 $currentmonth = mysql2date('m', $post->post_date); -
trunk/wp-includes/template-functions-author.php
r1095 r1186 6 6 $idmode = $authordata->user_idmode; 7 7 } 8 8 9 if ($idmode == 'nickname') $id = $authordata->user_nickname; 9 10 if ($idmode == 'login') $id = $authordata->user_login; … … 77 78 78 79 function get_author_link($echo = false, $author_id, $author_nicename) { 79 global $wpdb, $tableusers, $post, $querystring_start, $querystring_equal, $cache_ authors;80 global $wpdb, $tableusers, $post, $querystring_start, $querystring_equal, $cache_userdata; 80 81 $auth_ID = $author_id; 81 82 $permalink_structure = get_settings('permalink_structure'); … … 85 86 $link = $file.$querystring_start.'author'.$querystring_equal.$auth_ID; 86 87 } else { 87 if ('' == $author_nicename) $author_nicename = $cache_ authors[$author_id]->author_nicename;88 if ('' == $author_nicename) $author_nicename = $cache_userdata[$author_id]->author_nicename; 88 89 // Get any static stuff from the front 89 90 $front = substr($permalink_structure, 0, strpos($permalink_structure, '%'));
Note: See TracChangeset
for help on using the changeset viewer.