Index: trunk/extensions/SemanticMediaWiki/specials/URIResolver/SMW_SpecialURIResolver.php |
— | — | @@ -25,26 +25,26 @@ |
26 | 26 | function execute($query = '') { |
27 | 27 | global $wgOut, $smwgIP; |
28 | 28 | wfProfileIn('SpecialURIResolver::execute (SMW)'); |
29 | | - require_once( $smwgIP . '/specials/ExportRDF/SMW_SpecialExportRDF.php' ); |
30 | 29 | if ('' == $query) { |
31 | 30 | $wgOut->addHTML(wfMsg('smw_uri_doc')); |
32 | 31 | } else { |
| 32 | + /// TODO: the next (large) include is used for just a single function, I think -- mak |
| 33 | + require_once( $smwgIP . '/specials/ExportRDF/SMW_SpecialExportRDF.php' ); |
33 | 34 | $wgOut->disable(); |
34 | 35 | |
35 | 36 | $query = ExportRDF::makeURIfromXMLExportId($query); |
36 | 37 | $query = str_replace( "_", "%20", $query ); |
37 | 38 | $query = urldecode($query); |
38 | 39 | $title = Title::newFromText($query); |
39 | | - $t = $title->getFullURL(); |
40 | 40 | |
41 | | - $rdftitle = Title::newFromText('ExportRDF', NS_SPECIAL); |
42 | | - $s = $rdftitle->getFullURL() . "/" . $title->getPrefixedURL(); |
43 | | - |
44 | 41 | header('HTTP/1.1 303 See Other'); |
45 | | - if (stristr($_SERVER['HTTP_ACCEPT'], 'RDF')) |
| 42 | + if (stristr($_SERVER['HTTP_ACCEPT'], 'RDF')) { |
| 43 | + $s = Skin::makeSpecialUrlSubpage('ExportRDF', $title->getPrefixedURL(), 'xmlmime=rdf'); |
46 | 44 | header('Location: ' . $s); |
47 | | - else |
| 45 | + } else { |
| 46 | + $t = $title->getFullURL(); |
48 | 47 | header('Location: ' . $t); |
| 48 | + } |
49 | 49 | } |
50 | 50 | wfProfileOut('SpecialURIResolver::execute (SMW)'); |
51 | 51 | } |