use MediaWiki\EditPage\TextConflictHelper;
use MediaWiki\Logger\LoggerFactory;
use MediaWiki\MediaWikiServices;
-use MediaWiki\Storage\RevisionRecord;
+use MediaWiki\Revision\RevisionRecord;
use Wikimedia\ScopedCallback;
/**
* @since 1.21
*/
protected function getContentObject( $def_content = null ) {
+ global $wgDisableAnonTalk;
+
$content = false;
$user = $this->context->getUser();
$undo
)->inContentLanguage()->text();
} else {
+ $undoMessage = ( $undorev->getUser() === 0 && $wgDisableAnonTalk ) ?
+ 'undo-summary-anon' :
+ 'undo-summary';
$undoSummary = $this->context->msg(
- 'undo-summary',
+ $undoMessage,
$undo,
$userText
)->inContentLanguage()->text();
* content.
*
* @param Content|null|bool|string $content
- * @return string The editable text form of the content.
+ * @return string|false|null The editable text form of the content.
*
* @throws MWException If $content is not an instance of TextContent and
* $this->allowNonTextContent is not true.