X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiStashEdit.php;h=23163c2489d998b86be8e112c859f9e6be07d65c;hb=46c17ddb1ff10a1e073742c9d8b831cd915802f3;hp=b4b93217878c483087bab4007a4b92437d76ade6;hpb=9de578da93ec2b649340e5512db61618cc12e442;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index b4b9321787..23163c2489 100644 --- 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 ) { - $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)', - [ 'rc_user_text' => $user->getName() ], - __METHOD__ + [ $actorQuery['conds'] ], + __METHOD__, + [], + $actorQuery['joins'] ); return wfTimestampOrNull( TS_MW, $time );