*/
abstract class Content {
- public function __construct( $modelName = null ) { #FIXME: really need revId? annoying! #FIXME: really $title? or just when parsing, every time?
+ public function __construct( $modelName = null ) {
$this->mModelName = $modelName;
}
# XXX: isCacheable( ) # can/should we do this here?
- # TODO: WikiPage::getUndoText( Revision $undo, Revision $undoafter = null )
-
# TODO: EditPage::getPreloadedText( $preload ) // $wgParser->getPreloadText
# TODO: tie into EditPage, make it use Content-objects throughout, make edit form aware of content model and format
# TODO: tie into WikiPage, make it use Content-objects throughout, especially in doEdit(), doDelete(), updateRevisionOn(), etc
$html = $this->getHtml( $options );
$po = new ParserOutput( $html );
- if ( $this->mTitle ) $po->setTitleText( $this->mTitle->getText() );
-
- #TODO: cache settings, etc?
-
return $po;
}
$options = $this->getDefaultParserOptions();
}
- $po = $wgParser->parse( $this->mText, $this->getTitle(), $options, true, true, $this->mRevId );
+ $po = $wgParser->parse( $this->mText, $title, $options, true, true, $revId );
return $po;
}