Make stashEditFromPreview() call setCacheTime()
authorAaron Schulz <aschulz@wikimedia.org>
Sat, 7 May 2016 04:58:12 +0000 (21:58 -0700)
committerOri.livneh <ori@wikimedia.org>
Sat, 7 May 2016 11:02:35 +0000 (11:02 +0000)
This makes sure the output can pass the "presumed fresh" check.

Bug: T134620
Change-Id: I4f9ac2f1b9cef5c6b179946ea02a5e2fad2adc09

includes/api/ApiStashEdit.php

index 577d5f8..5efefbd 100644 (file)
@@ -219,6 +219,9 @@ class ApiStashEdit extends ApiBase {
                        return false;
                }
 
+               // Set the time the output was generated
+               $pOut->setCacheTime( wfTimestampNow() );
+
                // Build a value to cache with a proper TTL
                list( $stashInfo, $ttl ) = self::buildStashValue( $pstContent, $pOut, $timestamp );
                if ( !$stashInfo ) {