r17542 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17541‎ | r17542 | r17543 >
Date:19:21, 11 November 2006
Author:mkroetzsch
Status:old
Tags:
Comment:
Fixed problem when exporting properties starting with numbers.
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/ExportRDF/SMW_SpecialExportRDF.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/ExportRDF/SMW_SpecialExportRDF.php
@@ -30,6 +30,9 @@
3131
3232 if ($page=='') { //try to get GET parameter; simple way of calling the export
3333 $page = $wgRequest->getVal( 'page' );
 34+ } else {
 35+ //FIXME: this might be needed with MediaWiki 1.9 final, but it would be wrong in 1.8
 36+ //$page = urldecode($page);
3437 }
3538
3639 if ($page=='') { //try to get POST list; some settings are only available via POST
@@ -196,7 +199,7 @@
197200 break;
198201 }
199202 $this->long_uri = $xmlent . $baseXML;
200 - if (mb_substr($baseXML,0,1)=='-') { // illegal as first char in XML
 203+ if (in_array(mb_substr($baseXML,0,1), array('-','0','1','2','3','4','5','6','7','8','9'))) { // illegal as first char in XML
201204 $this->short_uri = 'wiki:_' . $this->ns_uri . $baseXML;
202205 } else {
203206 $this->short_uri = $xmlprefix . $baseXML;

Status & tagging log