From 27c3b22bff21b5746fb037154e0c864f72ff8efb Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 25 May 2011 23:55:15 +0000 Subject: [PATCH] * (bug 29144) Move action=dublincore and action=creativecommons to extensions Moved dublincore out to extension --- includes/AutoLoader.php | 1 - includes/DefaultSettings.php | 3 +-- includes/Metadata.php | 38 +------------------------------ includes/OutputPage.php | 11 +-------- includes/Wiki.php | 10 +------- maintenance/language/messages.inc | 1 - 6 files changed, 4 insertions(+), 60 deletions(-) diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index d79a77fe8f..965c0857d2 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -53,7 +53,6 @@ $wgAutoloadLocalClasses = array( 'DiffHistoryBlob' => 'includes/HistoryBlob.php', 'DjVuImage' => 'includes/DjVuImage.php', 'DoubleReplacer' => 'includes/StringUtils.php', - 'DublinCoreRdf' => 'includes/Metadata.php', 'DummyLinker' => 'includes/Linker.php', 'Dump7ZipOutput' => 'includes/Export.php', 'DumpBZip2Output' => 'includes/Export.php', diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index a6868b0ae8..bde197d6ce 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -4407,7 +4407,6 @@ $wgUseTagFilter = true; */ /** RDF metadata toggles */ -$wgEnableDublinCoreRdf = false; $wgEnableCreativeCommonsRdf = false; /** Override for copyright metadata. @@ -5040,7 +5039,7 @@ $wgActions = array( ); /** - * Array of disabled article actions, e.g. view, edit, dublincore, delete, etc. + * Array of disabled article actions, e.g. view, edit, delete, etc. * @deprecated since 1.18; just set $wgActions['action'] = false instead */ $wgDisabledActions = array(); diff --git a/includes/Metadata.php b/includes/Metadata.php index 5f9a13bb5a..5168262120 100644 --- a/includes/Metadata.php +++ b/includes/Metadata.php @@ -1,6 +1,6 @@ . * @@ -198,42 +198,6 @@ abstract class RdfMetaData { } } -class DublinCoreRdf extends RdfMetaData { - - public function show(){ - if( $this->setup() ){ - $this->prologue(); - $this->basics(); - $this->epilogue(); - } - } - - /** - * begin of the page - */ - protected function prologue() { - $url = htmlspecialchars( $this->reallyFullUrl() ); - print << - - - - -PROLOGUE; - } - - /** - * end of the page - */ - protected function epilogue() { - print << - -EPILOGUE; - } -} - class CreativeCommonsRdf extends RdfMetaData { public function show(){ diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 186ca777b8..1ab62d94aa 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2703,7 +2703,7 @@ class OutputPage { global $wgUniversalEditButton, $wgFavicon, $wgAppleTouchIcon, $wgEnableAPI, $wgSitename, $wgVersion, $wgHtml5, $wgMimeType, $wgFeed, $wgOverrideSiteFeed, $wgAdvertisedFeedTypes, - $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf, + $wgEnableCreativeCommonsRdf, $wgDisableLangConversion, $wgCanonicalLanguageLinks, $wgContLang, $wgRightsPage, $wgRightsUrl; @@ -2844,15 +2844,6 @@ class OutputPage { 'href' => $this->getTitle()->getLocalURL( 'action=creativecommons' ) ) ); } - - if ( $wgEnableDublinCoreRdf ) { - $tags[] = Html::element( 'link', array( - 'rel' => $this->getMetadataAttribute(), - 'title' => 'Dublin Core', - 'type' => 'application/rdf+xml', - 'href' => $this->getTitle()->getLocalURL( 'action=dublincore' ) ) - ); - } } # Language variants diff --git a/includes/Wiki.php b/includes/Wiki.php index 07007f3edc..6c17a48688 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -407,7 +407,7 @@ class MediaWiki { */ private function performAction( $article ) { global $wgSquidMaxage, $wgUseExternalEditor, - $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf; + $wgEnableCreativeCommonsRdf; wfProfileIn( __METHOD__ ); @@ -450,14 +450,6 @@ class MediaWiki { case 'deletetrackback': $article->$act(); break; - case 'dublincore': - if ( !$wgEnableDublinCoreRdf ) { - wfHttpError( 403, 'Forbidden', wfMsg( 'nodublincore' ) ); - } else { - $rdf = new DublinCoreRdf( $article ); - $rdf->show(); - } - break; case 'creativecommons': if ( !$wgEnableCreativeCommonsRdf ) { wfHttpError( 403, 'Forbidden', wfMsg( 'nocreativecommons' ) ); diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index fa8c571f45..7194236f23 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -2489,7 +2489,6 @@ $wgMessageStructure = array( 'group-bureaucrat.js', ), 'metadata_cc' => array( - 'nodublincore', 'nocreativecommons', 'notacceptable', ), -- 2.20.1