Page MenuHomePhabricator

Remove SpamBlacklist error handling from ApiVisualEditorEdit.php
Closed, ResolvedPublic

Description

Remove SpamBlacklist error handling from ApiVisualEditorEdit.php.

				if ( isset( $saveresult['edit']['spamblacklist'] ) ) {
					$matches = explode( '|', $saveresult['edit']['spamblacklist'] );
					$matcheslist = $this->getLanguage()->listToText( $matches );
					$result['edit']['sberrorparsed'] = $this->msg( 'spamprotectiontext' )->parse() . ' ' .
						$this->msg( 'spamprotectionmatch', $matcheslist )->parse();
				}

We probably can ask the API to return parsed errors and remove this bit? (And then change SpamBlacklistSaveErrorHandler to not use 'sberrorparsed'.)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 526816 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/SpamBlacklist@master] Improve error message integration

https://gerrit.wikimedia.org/r/526816

Change 526817 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] ApiVisualEditorEdit: Remove special handling for SpamBlacklist

https://gerrit.wikimedia.org/r/526817

Change 526816 abandoned by Bartosz Dziewoński:
Add human-readable error message to edit API response

Reason:
On second thought, I might as well merge this into https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SpamBlacklist/ /526829

https://gerrit.wikimedia.org/r/526816

Change 526817 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ApiVisualEditorEdit: Remove special handling for SpamBlacklist

https://gerrit.wikimedia.org/r/526817