r91942: Add nosuchaction also if action not in
[lhc/web/wiklou.git] / includes / Metadata.php
index 463b497..2e4ab94 100644 (file)
@@ -28,7 +28,7 @@ abstract class RdfMetaData {
         * Constructor
         * @param $article Article object
         */
-       public function __construct( Article $article ) {
+       public function __construct( Page $article ) {
                $this->mArticle = $article;
        }
 
@@ -58,7 +58,7 @@ abstract class RdfMetaData {
        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' );
@@ -101,6 +101,10 @@ abstract class RdfMetaData {
                }
        }
 
+       /**
+        * @param $name string
+        * @param $title Title
+        */
        protected function page( $name, $title ) {
                $this->url( $name, $title->getFullUrl() );
        }
@@ -134,9 +138,9 @@ abstract class RdfMetaData {
                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 );
                }
        }