Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -2489,7 +2489,6 @@ |
2490 | 2490 | 'group-bureaucrat.js', |
2491 | 2491 | ), |
2492 | 2492 | 'metadata_cc' => array( |
2493 | | - 'nodublincore', |
2494 | 2493 | 'nocreativecommons', |
2495 | 2494 | 'notacceptable', |
2496 | 2495 | ), |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -2703,7 +2703,7 @@ |
2704 | 2704 | global $wgUniversalEditButton, $wgFavicon, $wgAppleTouchIcon, $wgEnableAPI, |
2705 | 2705 | $wgSitename, $wgVersion, $wgHtml5, $wgMimeType, |
2706 | 2706 | $wgFeed, $wgOverrideSiteFeed, $wgAdvertisedFeedTypes, |
2707 | | - $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf, |
| 2707 | + $wgEnableCreativeCommonsRdf, |
2708 | 2708 | $wgDisableLangConversion, $wgCanonicalLanguageLinks, $wgContLang, |
2709 | 2709 | $wgRightsPage, $wgRightsUrl; |
2710 | 2710 | |
— | — | @@ -2844,15 +2844,6 @@ |
2845 | 2845 | 'href' => $this->getTitle()->getLocalURL( 'action=creativecommons' ) ) |
2846 | 2846 | ); |
2847 | 2847 | } |
2848 | | - |
2849 | | - if ( $wgEnableDublinCoreRdf ) { |
2850 | | - $tags[] = Html::element( 'link', array( |
2851 | | - 'rel' => $this->getMetadataAttribute(), |
2852 | | - 'title' => 'Dublin Core', |
2853 | | - 'type' => 'application/rdf+xml', |
2854 | | - 'href' => $this->getTitle()->getLocalURL( 'action=dublincore' ) ) |
2855 | | - ); |
2856 | | - } |
2857 | 2848 | } |
2858 | 2849 | |
2859 | 2850 | # Language variants |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -53,7 +53,6 @@ |
54 | 54 | 'DiffHistoryBlob' => 'includes/HistoryBlob.php', |
55 | 55 | 'DjVuImage' => 'includes/DjVuImage.php', |
56 | 56 | 'DoubleReplacer' => 'includes/StringUtils.php', |
57 | | - 'DublinCoreRdf' => 'includes/Metadata.php', |
58 | 57 | 'DummyLinker' => 'includes/Linker.php', |
59 | 58 | 'Dump7ZipOutput' => 'includes/Export.php', |
60 | 59 | 'DumpBZip2Output' => 'includes/Export.php', |
Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -407,7 +407,7 @@ |
408 | 408 | */ |
409 | 409 | private function performAction( $article ) { |
410 | 410 | global $wgSquidMaxage, $wgUseExternalEditor, |
411 | | - $wgEnableDublinCoreRdf, $wgEnableCreativeCommonsRdf; |
| 411 | + $wgEnableCreativeCommonsRdf; |
412 | 412 | |
413 | 413 | wfProfileIn( __METHOD__ ); |
414 | 414 | |
— | — | @@ -450,14 +450,6 @@ |
451 | 451 | case 'deletetrackback': |
452 | 452 | $article->$act(); |
453 | 453 | break; |
454 | | - case 'dublincore': |
455 | | - if ( !$wgEnableDublinCoreRdf ) { |
456 | | - wfHttpError( 403, 'Forbidden', wfMsg( 'nodublincore' ) ); |
457 | | - } else { |
458 | | - $rdf = new DublinCoreRdf( $article ); |
459 | | - $rdf->show(); |
460 | | - } |
461 | | - break; |
462 | 454 | case 'creativecommons': |
463 | 455 | if ( !$wgEnableCreativeCommonsRdf ) { |
464 | 456 | wfHttpError( 403, 'Forbidden', wfMsg( 'nocreativecommons' ) ); |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -4407,7 +4407,6 @@ |
4408 | 4408 | */ |
4409 | 4409 | |
4410 | 4410 | /** RDF metadata toggles */ |
4411 | | -$wgEnableDublinCoreRdf = false; |
4412 | 4411 | $wgEnableCreativeCommonsRdf = false; |
4413 | 4412 | |
4414 | 4413 | /** Override for copyright metadata. |
— | — | @@ -5040,7 +5039,7 @@ |
5041 | 5040 | ); |
5042 | 5041 | |
5043 | 5042 | /** |
5044 | | - * Array of disabled article actions, e.g. view, edit, dublincore, delete, etc. |
| 5043 | + * Array of disabled article actions, e.g. view, edit, delete, etc. |
5045 | 5044 | * @deprecated since 1.18; just set $wgActions['action'] = false instead |
5046 | 5045 | */ |
5047 | 5046 | $wgDisabledActions = array(); |
Index: trunk/phase3/includes/Metadata.php |
— | — | @@ -1,6 +1,6 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | - * Provides DublinCore and CreativeCommons metadata |
| 4 | + * Provides CreativeCommons metadata |
5 | 5 | * |
6 | 6 | * Copyright 2004, Evan Prodromou <evan@wikitravel.org>. |
7 | 7 | * |
— | — | @@ -198,42 +198,6 @@ |
199 | 199 | } |
200 | 200 | } |
201 | 201 | |
202 | | -class DublinCoreRdf extends RdfMetaData { |
203 | | - |
204 | | - public function show(){ |
205 | | - if( $this->setup() ){ |
206 | | - $this->prologue(); |
207 | | - $this->basics(); |
208 | | - $this->epilogue(); |
209 | | - } |
210 | | - } |
211 | | - |
212 | | - /** |
213 | | - * begin of the page |
214 | | - */ |
215 | | - protected function prologue() { |
216 | | - $url = htmlspecialchars( $this->reallyFullUrl() ); |
217 | | - print <<<PROLOGUE |
218 | | -<?xml version="1.0" encoding="UTF-8" ?> |
219 | | -<!DOCTYPE rdf:RDF PUBLIC "-//DUBLIN CORE//DCMES DTD 2002/07/31//EN" "http://dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.dtd"> |
220 | | -<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
221 | | - xmlns:dc="http://purl.org/dc/elements/1.1/"> |
222 | | - <rdf:Description rdf:about="{$url}"> |
223 | | - |
224 | | -PROLOGUE; |
225 | | - } |
226 | | - |
227 | | - /** |
228 | | - * end of the page |
229 | | - */ |
230 | | - protected function epilogue() { |
231 | | - print <<<EPILOGUE |
232 | | - </rdf:Description> |
233 | | -</rdf:RDF> |
234 | | -EPILOGUE; |
235 | | - } |
236 | | -} |
237 | | - |
238 | 202 | class CreativeCommonsRdf extends RdfMetaData { |
239 | 203 | |
240 | 204 | public function show(){ |
Index: trunk/extensions/DublinCoreRdf/DublinCoreRdf_body.php |
— | — | @@ -0,0 +1,59 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Provides DublinCore metadata |
| 5 | + * |
| 6 | + * Copyright 2004, Evan Prodromou <evan@wikitravel.org>. |
| 7 | + * |
| 8 | + * This program is free software; you can redistribute it and/or modify |
| 9 | + * it under the terms of the GNU General Public License as published by |
| 10 | + * the Free Software Foundation; either version 2 of the License, or |
| 11 | + * (at your option) any later version. |
| 12 | + * |
| 13 | + * This program is distributed in the hope that it will be useful, |
| 14 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | + * GNU General Public License for more details. |
| 17 | + * |
| 18 | + * You should have received a copy of the GNU General Public License |
| 19 | + * along with this program; if not, write to the Free Software |
| 20 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
| 21 | + * |
| 22 | + * @author Evan Prodromou <evan@wikitravel.org> |
| 23 | + * @file |
| 24 | + */ |
| 25 | + |
| 26 | +class DublinCoreRdf extends RdfMetaData { |
| 27 | + |
| 28 | + public function show(){ |
| 29 | + if( $this->setup() ){ |
| 30 | + $this->prologue(); |
| 31 | + $this->basics(); |
| 32 | + $this->epilogue(); |
| 33 | + } |
| 34 | + } |
| 35 | + |
| 36 | + /** |
| 37 | + * begin of the page |
| 38 | + */ |
| 39 | + protected function prologue() { |
| 40 | + $url = htmlspecialchars( $this->reallyFullUrl() ); |
| 41 | + print <<<PROLOGUE |
| 42 | +<?xml version="1.0" encoding="UTF-8" ?> |
| 43 | +<!DOCTYPE rdf:RDF PUBLIC "-//DUBLIN CORE//DCMES DTD 2002/07/31//EN" "http://dublincore.org/documents/2002/07/31/dcmes-xml/dcmes-xml-dtd.dtd"> |
| 44 | +<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
| 45 | + xmlns:dc="http://purl.org/dc/elements/1.1/"> |
| 46 | + <rdf:Description rdf:about="{$url}"> |
| 47 | + |
| 48 | +PROLOGUE; |
| 49 | + } |
| 50 | + |
| 51 | + /** |
| 52 | + * end of the page |
| 53 | + */ |
| 54 | + protected function epilogue() { |
| 55 | + print <<<EPILOGUE |
| 56 | + </rdf:Description> |
| 57 | +</rdf:RDF> |
| 58 | +EPILOGUE; |
| 59 | + } |
| 60 | +} |
\ No newline at end of file |
Property changes on: trunk/extensions/DublinCoreRdf/DublinCoreRdf_body.php |
___________________________________________________________________ |
Added: svn:keywords |
1 | 61 | + Author Date Id Revision |
Added: svn:eol-style |
2 | 62 | + native |
Index: trunk/extensions/DublinCoreRdf/DublinCore.php |
— | — | @@ -0,0 +1,25 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +$wgExtensionCredits['other'][] = array( |
| 5 | + 'path' => __FILE__, |
| 6 | + 'name' => 'DublinCore', |
| 7 | + 'url' => '', |
| 8 | + 'author' => 'Evan Prodromou', |
| 9 | +); |
| 10 | + |
| 11 | +$wgHooks['MediaWikiPerformAction'][] = 'efDublinCorePreformAction'; |
| 12 | + |
| 13 | + $rdf = new DublinCoreRdf( $article ); |
| 14 | + $rdf->show(); |
| 15 | + |
| 16 | +$wgAutoloadClasses['DublinCoreRdf'] = $dir . 'DublinCoreRdf_body.php'; |
| 17 | + |
| 18 | +function efDublinCorePreformAction( $output, $article, $title, $user, $request, $mediaWiki ) { |
| 19 | + if ( $mediaWiki->getAction() !== 'dublincore' ) { |
| 20 | + return true; |
| 21 | + } |
| 22 | + |
| 23 | + $rdf = new DublinCoreRdf( $article ); |
| 24 | + $rdf->show(); |
| 25 | + return false; |
| 26 | +} |
\ No newline at end of file |
Property changes on: trunk/extensions/DublinCoreRdf/DublinCore.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 27 | + native |