* @deprecated since 1.30
*/
public function isOouiEnabled() {
+ wfDeprecated( __METHOD__, '1.30' );
return true;
}
* @return bool
*/
protected function previewOnOpen() {
- $previewOnOpenNamespaces = $this->context->getConfig()->get( 'PreviewOnOpenNamespaces' );
+ $config = $this->context->getConfig();
+ $previewOnOpenNamespaces = $config->get( 'PreviewOnOpenNamespaces' );
$request = $this->context->getRequest();
+ if ( $config->get( 'RawHtml' ) ) {
+ // If raw HTML is enabled, disable preview on open
+ // since it has to be posted with a token for
+ // security reasons
+ return false;
+ }
if ( $request->getVal( 'preview' ) == 'yes' ) {
// Explicit override from request
return true;
// Run new style post-section-merge edit filter
if ( !Hooks::run( 'EditFilterMergedContent',
- [ $this->mArticle->getContext(), $content, $status, $this->summary,
+ [ $this->context, $content, $status, $this->summary,
$user, $this->minoredit ] )
) {
# Error messages etc. could be handled within the hook...
*/
function getSummaryInputOOUI( $summary = "", $labelText = null, $inputAttrs = null ) {
wfDeprecated( __METHOD__, '1.30' );
- $this->getSummaryInputWidget( $summary, $labelText, $inputAttrs );
+ return $this->getSummaryInputWidget( $summary, $labelText, $inputAttrs );
}
/**
$newContent = $oldContent->getContentHandler()->makeEmptyContent();
}
- $de = $oldContent->getContentHandler()->createDifferenceEngine( $this->mArticle->getContext() );
+ $de = $oldContent->getContentHandler()->createDifferenceEngine( $this->context );
$de->setContent( $oldContent, $newContent );
$difftext = $de->getDiff( $oldtitle, $newtitle );
$content2 = $this->toEditContent( $this->textbox2 );
$handler = ContentHandler::getForModelID( $this->contentModel );
- $de = $handler->createDifferenceEngine( $this->mArticle->getContext() );
+ $de = $handler->createDifferenceEngine( $this->context );
$de->setContent( $content2, $content1 );
$de->showDiff(
$this->context->msg( 'yourtext' )->parse(),
* @return ParserOptions
*/
protected function getPreviewParserOptions() {
- $parserOptions = $this->page->makeParserOptions( $this->mArticle->getContext() );
+ $parserOptions = $this->page->makeParserOptions( $this->context );
$parserOptions->setIsPreview( true );
$parserOptions->setIsSectionPreview( !is_null( $this->section ) && $this->section !== '' );
$parserOptions->enableLimitReport();
* @return array
*/
public function getCheckboxes( &$tabindex, $checked ) {
+ wfDeprecated( __METHOD__, '1.30' );
$checkboxes = [];
$checkboxesDef = $this->getCheckboxesDefinition( $checked );
* @return array Associative array of string keys to OOUI\FieldLayout instances
*/
public function getCheckboxesOOUI( &$tabindex, $checked ) {
+ wfDeprecated( __METHOD__, '1.30' );
return $this->getCheckboxesWidget( $tabindex, $checked );
}
/**
* Get the message key of the label for the button to save the page
*
+ * @since 1.30
* @return string
*/
protected function getSubmitButtonLabel() {
];
// The following classes can be used here:
- // * mw-editfont-default
// * mw-editfont-monospace
// * mw-editfont-sans-serif
// * mw-editfont-serif