From 9db190c7e736ec8d063187d4241b59feaf7dc2d1 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 22 Jun 2011 11:28:20 +0200 Subject: update to MediaWiki 1.17.0 --- includes/Metadata.php | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'includes/Metadata.php') diff --git a/includes/Metadata.php b/includes/Metadata.php index 0b4fbf8c..93ce4b27 100644 --- a/includes/Metadata.php +++ b/includes/Metadata.php @@ -1,6 +1,7 @@ . * * This program is free software; you can redistribute it and/or modify @@ -18,6 +19,7 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA * * @author Evan Prodromou + * @file */ abstract class RdfMetaData { @@ -27,7 +29,7 @@ abstract class RdfMetaData { * Constructor * @param $article Article object */ - public function __construct( Article $article ){ + public function __construct( Article $article ) { $this->mArticle = $article; } @@ -61,11 +63,11 @@ abstract class RdfMetaData { } protected function basics() { - global $wgContLanguageCode, $wgSitename; + global $wgLanguageCode, $wgSitename; $this->element( 'title', $this->mArticle->mTitle->getText() ); $this->pageOrString( 'publisher', wfMsg( 'aboutpage' ), $wgSitename ); - $this->element( 'language', $wgContLanguageCode ); + $this->element( 'language', $wgLanguageCode ); $this->element( 'type', 'Text' ); $this->element( 'format', 'text/html' ); $this->element( 'identifier', $this->reallyFullUrl() ); @@ -92,7 +94,7 @@ abstract class RdfMetaData { . substr($timestamp, 6, 2); } - protected function pageOrString( $name, $page, $str ){ + protected function pageOrString( $name, $page, $str ) { if( $page instanceof Title ) $nt = $page; else @@ -105,7 +107,7 @@ abstract class RdfMetaData { } } - protected function page( $name, $title ){ + protected function page( $name, $title ) { $this->url( $name, $title->getFullUrl() ); } @@ -114,15 +116,17 @@ abstract class RdfMetaData { print "\t\t\n"; } - protected function person($name, User $user ){ - global $wgContLang; - + protected function person( $name, User $user ) { if( $user->isAnon() ){ $this->element( $name, wfMsgExt( 'anonymous', array( 'parsemag' ), 1 ) ); - } else if( $real = $user->getRealName() ) { - $this->element( $name, $real ); } else { - $this->pageOrString( $name, $user->getUserPage(), wfMsg( 'siteuser', $user->getName() ) ); + $real = $user->getRealName(); + if( $real ) { + $this->element( $name, $real ); + } else { + $userName = $user->getName(); + $this->pageOrString( $name, $user->getUserPage(), wfMsgExt( 'siteuser', 'parsemag', $userName, $userName ) ); + } } } @@ -315,4 +319,4 @@ PROLOGUE; protected function epilogue() { echo "\n"; } -} \ No newline at end of file +} -- cgit v1.2.3-54-g00ecf