Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -18,6 +18,10 @@ |
19 | 19 | * LogReader and LogViewer classes (deprecated in 1.14) have now been removed |
20 | 20 | * (bug 26033) Added $wgArticleCountMethod to select the method to use to say |
21 | 21 | whether a page is an article or not. $wgUseCommaCount is now deprecated. |
| 22 | +* $wgEnableDublinCoreRdf and $wgEnableCreativeCommonsRdf no longer work in core, |
| 23 | + and the functionality has been moved to the relevant extensions. See |
| 24 | + http://www.mediawiki.org/wiki/Extension:DublinCoreRdf and |
| 25 | + http://www.mediawiki.org/wiki/Extension:CreativeCoreRdf as appropriate |
22 | 26 | |
23 | 27 | === New features in 1.19 === |
24 | 28 | * (bug 28916) A way to to toggle mw.config legacy globals settings from |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -307,7 +307,7 @@ |
308 | 308 | * |
309 | 309 | * @return String |
310 | 310 | */ |
311 | | - private function getMetadataAttribute() { |
| 311 | + public function getMetadataAttribute() { |
312 | 312 | # note: buggy CC software only reads first "meta" link |
313 | 313 | static $haveMeta = false; |
314 | 314 | if ( $haveMeta ) { |
Index: trunk/phase3/includes/Metadata.php |
— | — | @@ -1,6 +1,5 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | - * Provides CreativeCommons metadata |
5 | 4 | * |
6 | 5 | * Copyright 2004, Evan Prodromou <evan@wikitravel.org>. |
7 | 6 | * |
— | — | @@ -35,9 +34,6 @@ |
36 | 35 | |
37 | 36 | public abstract function show(); |
38 | 37 | |
39 | | - /** |
40 | | - * |
41 | | - */ |
42 | 38 | protected function setup() { |
43 | 39 | global $wgOut, $wgRequest; |
44 | 40 | |
— | — | @@ -55,9 +51,6 @@ |
56 | 52 | } |
57 | 53 | } |
58 | 54 | |
59 | | - /** |
60 | | - * |
61 | | - */ |
62 | 55 | protected function reallyFullUrl() { |
63 | 56 | return $this->mArticle->getTitle()->getFullURL(); |
64 | 57 | } |
Index: trunk/extensions/CreativeCommonsRdf/CreativeCommonsRdf.php |
— | — | @@ -9,6 +9,7 @@ |
10 | 10 | ); |
11 | 11 | |
12 | 12 | $wgHooks['MediaWikiPerformAction'][] = 'efCreativeCommonsRdfPreformAction'; |
| 13 | +$wgHooks['BeforePageDisplay'][] = 'efCreativeCommonsRdfBeforePageDisplay'; |
13 | 14 | |
14 | 15 | $wgAutoloadClasses['CreativeCommonsRdf'] = $dir . 'CreativeCommonsRdf_body.php'; |
15 | 16 | |
— | — | @@ -20,4 +21,20 @@ |
21 | 22 | $rdf = new CreativeCommonsRdf( $article ); |
22 | 23 | $rdf->show(); |
23 | 24 | return false; |
| 25 | +} |
| 26 | + |
| 27 | +/** |
| 28 | + * @param $out OutputPage |
| 29 | + * @param $skin Skin |
| 30 | + * @return bool |
| 31 | + */ |
| 32 | +function efCreativeCommonsRdfBeforePageDisplay( $out, $skin ) { |
| 33 | + $out->addHeadItem( 'creativecommons', |
| 34 | + Html::element( 'link', array( |
| 35 | + 'rel' => $out->getMetadataAttribute(), |
| 36 | + 'title' => 'Creative Commons', |
| 37 | + 'type' => 'application/rdf+xml', |
| 38 | + 'href' => $out->getTitle()->getLocalURL( 'action=creativecommons' ) ) |
| 39 | + )); |
| 40 | + return true; |
24 | 41 | } |
\ No newline at end of file |
Index: trunk/extensions/DublinCoreRdf/DublinCoreRdf.php |
— | — | @@ -8,7 +8,8 @@ |
9 | 9 | 'descriptionmsg' => "Dublin Core RDF-metadata" |
10 | 10 | ); |
11 | 11 | |
12 | | -$wgHooks['MediaWikiPerformAction'][] = 'efDublinCorePerformAction'; |
| 12 | +$wgHooks['MediaWikiPerformAction'][] = 'efDublinCoreBeforePageDisplay'; |
| 13 | +$wgHooks['BeforePageDisplay'][] = 'efCreativeCommonsRdfBeforePageDisplay'; |
13 | 14 | |
14 | 15 | $wgAutoloadClasses['DublinCoreRdf'] = $dir . 'DublinCoreRdf_body.php'; |
15 | 16 | |
— | — | @@ -20,4 +21,20 @@ |
21 | 22 | $rdf = new DublinCoreRdf( $article ); |
22 | 23 | $rdf->show(); |
23 | 24 | return false; |
| 25 | +} |
| 26 | + |
| 27 | +/** |
| 28 | + * @param $out OutputPage |
| 29 | + * @param $skin Skin |
| 30 | + * @return bool |
| 31 | + */ |
| 32 | +function efDublinCoreBeforePageDisplay( $out, $skin ) { |
| 33 | + $out->addHeadItem( 'dublincore', |
| 34 | + Html::element( 'link', array( |
| 35 | + 'rel' => $out->getMetadataAttribute(), |
| 36 | + 'title' => 'Dublin Core', |
| 37 | + 'type' => 'application/rdf+xml', |
| 38 | + 'href' => $out->getTitle()->getLocalURL( 'action=dublincore' ) ) |
| 39 | + )); |
| 40 | + return true; |
24 | 41 | } |
\ No newline at end of file |