dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a1b2e33
)
Use correct variable in UserCache::doQuery
author
umherirrender
<umherirrender_de.wp@web.de>
Sat, 11 Jul 2015 10:19:35 +0000
(12:19 +0200)
committer
Umherirrender
<umherirrender_de.wp@web.de>
Sat, 11 Jul 2015 10:22:32 +0000
(10:22 +0000)
The variable $row is set to the last user of the first loop.
It is better to use the $name which is set in the foreach correctly.
This now adds all userpages to the LinkBatch and that avoids some extra
queries on at least Special:ListFiles.
Change-Id: Ied378b1596ec9d38eda41ce5ee413203c65eb21b
includes/cache/UserCache.php
patch
|
blob
|
history
diff --git
a/includes/cache/UserCache.php
b/includes/cache/UserCache.php
index
2a3aac2
..
51bf385
100644
(file)
--- a/
includes/cache/UserCache.php
+++ b/
includes/cache/UserCache.php
@@
-123,11
+123,11
@@
class UserCache {
$lb = new LinkBatch();
foreach ( $usersToCheck as $userId => $name ) {
if ( $this->queryNeeded( $userId, 'userpage', $options ) ) {
- $lb->add( NS_USER, $
row->user_
name );
+ $lb->add( NS_USER, $name );
$this->typesCached[$userId]['userpage'] = 1;
}
if ( $this->queryNeeded( $userId, 'usertalk', $options ) ) {
- $lb->add( NS_USER_TALK, $
row->user_
name );
+ $lb->add( NS_USER_TALK, $name );
$this->typesCached[$userId]['usertalk'] = 1;
}
}