r37121 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37120‎ | r37121 | r37122 >
Date:17:31, 5 July 2008
Author:mkroetzsch
Status:old
Tags:
Comment:
use non XML-escaped query string for executing concepts
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Concept.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_SQLStore2_Queries.php
@@ -317,7 +317,7 @@
318318 }
319319 } elseif ($description instanceof SMWConceptDescription) { // fetch concept definition and insert it here
320320 $dv = end($this->m_store->getSpecialValues($description->getConcept(), SMW_SP_CONCEPT_DESC));
321 - $desctxt = ($dv!==false)?$dv->getXSDValue():false;
 321+ $desctxt = ($dv!==false)?$dv->getWikiValue():false;
322322 if ($desctxt == false) { // no description found, concept does not exist
323323 // keep the above query object, it yields an empty result
324324 ///TODO: announce an error here? (maybe not, since the query processor can check for
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DV_Concept.php
@@ -58,7 +58,7 @@
5959 }
6060
6161 public function getWikiValue(){
62 - return $this->m_concept;
 62+ return str_replace(array('&lt;','&gt;','&amp;'),array('<','>','&'), $this->m_concept);
6363 }
6464
6565 public function getExportData() {

Status & tagging log