From 5399fba68b99d2a4fb3ec681fd4d426ca9739a1a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 21 May 2015 16:24:42 -0700 Subject: [PATCH] Use less fuzzy User::getDBTouched() in ApiStashEdit::getStashKey() * The getTouched() value can bump more often or vary in DCs Change-Id: Idffa22c9dde7c7950943b104ed61f5779636b7e7 --- includes/User.php | 2 +- includes/api/ApiStashEdit.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/User.php b/includes/User.php index fc07b6d63a..828c9b1396 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2383,7 +2383,7 @@ class User implements IDBAccessObject { * @return string TS_MW Timestamp * @since 1.26 */ - protected function getDBTouched() { + public function getDBTouched() { $this->load(); return $this->mTouched; diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index 1b27f60609..1f469b89fc 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -331,7 +331,7 @@ class ApiStashEdit extends ApiBase { $content->getDefaultFormat(), sha1( $content->serialize( $content->getDefaultFormat() ) ), $user->getId() ?: md5( $user->getName() ), // account for user parser options - $user->getId() ? $user->getTouched() : '-' // handle preference change races + $user->getId() ? $user->getDBTouched() : '-' // handle preference change races ) ) ); return wfMemcKey( 'prepared-edit', md5( $title->getPrefixedDBkey() ), $hash ); -- 2.20.1