TODO
Jump to navigation
Jump to search
- user rights names visualdata and pageencryption
- this does not seem to work
if ( $this->schemaId === null ) {
$this->errors[] = 'no schema (' . $this->params['schema'] . ')';
return;
}
and
public static function onPageSaveComplete(
WikiPage $wikiPage,
MediaWiki\User\UserIdentity $user,
string $summary,
int $flags,
RevisionRecord $revisionRecord,
MediaWiki\Storage\EditResult $editResult
) {
$title = $wikiPage->getTitle();
$revertMethod = $editResult->getRevertMethod();
\VisualData::onArticleSaveOrUndelete( $user, $wikiPage, $revisionRecord, $revertMethod );
// create schema id and printouts if is a new schema
if ( $title->getNamespace() === NS_VISUALDATASCHEMA ) {
$content = $revisionRecord->getContent( MediaWiki\Revision\SlotRecord::MAIN );
$contentHandler = $content->getContentHandler();
$modelId = $contentHandler->getModelID();
$text = $content->getNativeData();
$data = json_decode( $text, true );
if ( $data ) {
$databaseManager = new DatabaseManager();
$databaseManager->createSchemaIdAndPrintouts( $data );
}
}
}
and
/**
* @param array $schema
*/
public function createSchemaIdAndPrintouts( $schema ) {
$rows = [];
// @FIXME use only if used in all similar cases
// $this->escapeJsonPointerPart( )
$schemaId = $this->recordSchema( $schema['wiki']['name'] );
$thisClass = $this;
after creating a new schema
done
- schema-builder, hidden field should not hide container for multiple items
- tagmultiselect should work for email as well (not just text format)