* Constructor
* @param $article Article object
*/
- public function __construct( Article $article ) {
+ public function __construct( Page $article ) {
$this->mArticle = $article;
}
protected function basics() {
global $wgLanguageCode, $wgSitename;
- $this->element( 'title', $this->mArticle->mTitle->getText() );
+ $this->element( 'title', $this->mArticle->getTitle()->getText() );
$this->pageOrString( 'publisher', wfMsg( 'aboutpage' ), $wgSitename );
$this->element( 'language', $wgLanguageCode );
$this->element( 'type', 'Text' );
}
}
+ /**
+ * @param $name string
+ * @param $title Title
+ */
protected function page( $name, $title ) {
$this->url( $name, $title->getFullUrl() );
}
if( $wgRightsPage && ( $nt = Title::newFromText( $wgRightsPage ) )
&& ($nt->getArticleID() != 0)) {
$this->page('rights', $nt);
- } else if( $wgRightsUrl ){
+ } elseif( $wgRightsUrl ){
$this->url('rights', $wgRightsUrl);
- } else if( $wgRightsText ){
+ } elseif( $wgRightsText ){
$this->element( 'rights', $wgRightsText );
}
}