$this->enableApiEditOverride = $enableOverride;
}
+ /**
+ * @deprecated since 1.29, call edit directly
+ */
function submit() {
$this->edit();
}
*/
protected function runPostMergeFilters( Content $content, Status $status, User $user ) {
// Run old style post-section-merge edit filter
- if ( !ContentHandler::runLegacyHooks( 'EditFilterMerged',
- [ $this, $content, &$this->hookError, $this->summary ],
- '1.21'
- ) ) {
- # Error messages etc. could be handled within the hook...
- $status->fatal( 'hookaborted' );
- $status->value = self::AS_HOOK_ERROR;
- return false;
- } elseif ( $this->hookError != '' ) {
+ if ( $this->hookError != '' ) {
# ...or the hook could be expecting us to produce an error
$status->fatal( 'hookaborted' );
$status->value = self::AS_HOOK_ERROR_EXPECTED;
*/
public function getCancelLink() {
$cancelParams = [];
+ $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
if ( !$this->isConflict && $this->oldid > 0 ) {
$cancelParams['oldid'] = $this->oldid;
} elseif ( $this->getContextTitle()->isRedirect() ) {
}
$attrs = [ 'id' => 'mw-editform-cancel' ];
- return Linker::linkKnown(
+ return $linkRenderer->makeKnownLink(
$this->getContextTitle(),
- $this->context->msg( 'cancel' )->parse(),
+ new HtmlArmor( $this->context->msg( 'cancel' )->parse() ),
Html::buttonAttributes( $attrs, [ 'mw-ui-quiet' ] ),
$cancelParams
);
}
$hook_args = [ $this, &$content ];
- ContentHandler::runLegacyHooks( 'EditPageGetPreviewText', $hook_args, '1.25' );
Hooks::run( 'EditPageGetPreviewContent', $hook_args );
$parserResult = $this->doPreviewParse( $content );