$contentHandler = ContentHandler::getForModelID( $params['contentmodel'] );
}
+ $name = $titleObj->getPrefixedDBkey();
+ $model = $contentHandler->getModelID();
if ( $contentHandler->supportsDirectApiEditing() === false ) {
$this->dieUsage(
- 'Direct editing via API is not supported for this content type.',
+ "Direct editing via API is not supported for content model $model used by $name",
'no-direct-editing'
);
}
$contentFormat = $params['contentformat'];
if ( !$contentHandler->isSupportedFormat( $contentFormat ) ) {
- $name = $titleObj->getPrefixedDBkey();
- $model = $contentHandler->getModelID();
$this->dieUsage( "The requested format $contentFormat is not supported for content model " .
" $model used by $name", 'badformat' );
public function testCheckDirectApiEditingDisallowed_forNonTextContent() {
$this->setExpectedException(
'UsageException',
- 'Direct editing via API is not supported for this content type.'
+ 'Direct editing via API is not supported for content model testing used by Dummy:ApiEditPageTest_nonTextPageEdit'
);
$this->doApiRequestWithToken( array(