summaryrefslogtreecommitdiff
path: root/includes/api/ApiStashEdit.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-12-17 09:15:42 +0100
committerPierre Schmitz <pierre@archlinux.de>2015-12-17 09:44:51 +0100
commita1789ddde42033f1b05cc4929491214ee6e79383 (patch)
tree63615735c4ddffaaabf2428946bb26f90899f7bf /includes/api/ApiStashEdit.php
parent9e06a62f265e3a2aaabecc598d4bc617e06fa32d (diff)
Update to MediaWiki 1.26.0
Diffstat (limited to 'includes/api/ApiStashEdit.php')
-rw-r--r--includes/api/ApiStashEdit.php7
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(