dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add `actor` table and code to start using it
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiStashEdit.php
diff --git
a/includes/api/ApiStashEdit.php
b/includes/api/ApiStashEdit.php
index
b4b9321
..
23163c2
100644
(file)
--- a/
includes/api/ApiStashEdit.php
+++ b/
includes/api/ApiStashEdit.php
@@
-340,11
+340,15
@@
class ApiStashEdit extends ApiBase {
* @return string|null TS_MW timestamp or null
*/
private static function lastEditTime( User $user ) {
* @return string|null TS_MW timestamp or null
*/
private static function lastEditTime( User $user ) {
- $time = wfGetDB( DB_REPLICA )->selectField(
- 'recentchanges',
+ $db = wfGetDB( DB_REPLICA );
+ $actorQuery = ActorMigration::newMigration()->getWhere( $db, 'rc_user', $user, false );
+ $time = $db->selectField(
+ [ 'recentchanges' ] + $actorQuery['tables'],
'MAX(rc_timestamp)',
'MAX(rc_timestamp)',
- [ 'rc_user_text' => $user->getName() ],
- __METHOD__
+ [ $actorQuery['conds'] ],
+ __METHOD__,
+ [],
+ $actorQuery['joins']
);
return wfTimestampOrNull( TS_MW, $time );
);
return wfTimestampOrNull( TS_MW, $time );