diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2015-12-20 09:00:55 +0100 |
commit | a2190ac74dd4d7080b12bab90e552d7aa81209ef (patch) | |
tree | 8b31f38de9882d18df54cf8d9e0de74167a094eb /includes/api/ApiStashEdit.php | |
parent | 15e69f7b20b6596b9148030acce5b59993b95a45 (diff) | |
parent | 257401d8b2cf661adf36c84b0e3fd1cf85e33c22 (diff) |
Merge branch 'mw-1.26'
Diffstat (limited to 'includes/api/ApiStashEdit.php')
-rw-r--r-- | includes/api/ApiStashEdit.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php index d068e945..e87fc97a 100644 --- a/includes/api/ApiStashEdit.php +++ b/includes/api/ApiStashEdit.php @@ -20,7 +20,7 @@ */ /** - * Prepare and edit in shared cache so that it can be reused on edit + * Prepare an edit in shared cache so that it can be reused on edit * * This endpoint can be called via AJAX as the user focuses on the edit * summary box. By the time of submission, the parse may have already @@ -112,6 +112,7 @@ class ApiStashEdit extends ApiBase { if ( $user->pingLimiter( 'stashedit' ) ) { $status = 'ratelimited'; } elseif ( $wgMemc->lock( $key, 0, 30 ) ) { + /** @noinspection PhpUnusedLocalVariableInspection */ $unlocker = new ScopedCallback( function() use ( $key ) { global $wgMemc; $wgMemc->unlock( $key ); @@ -350,7 +351,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 ); @@ -399,7 +400,7 @@ class ApiStashEdit extends ApiBase { ApiBase::PARAM_TYPE => 'string' ), 'text' => array( - ApiBase::PARAM_TYPE => 'string', + ApiBase::PARAM_TYPE => 'text', ApiBase::PARAM_REQUIRED => true ), 'contentmodel' => array( |