/** * For each URI in the (unparsed) query that is set by an "Original URI" property in * the wiki, replace it with the page's corresponding URI Resolver URI */ function convertOrigURIsToInternalURIsInQuery() { $query = $this->m_query; $origuris = RDFIOUtils::extractURIs( $this->m_query ); // TODO: Use parsed query instead $count = count( $origuris ); if ( $count > 1 || ( $count > 0 && !RDFIOUtils::contains( "URIResolver", $origuris[0] ) ) ) { // The first URI is the URI Resolver one, which always is there foreach ( $origuris as $origuri ) { $uri = $this->m_store->getURIForOrigURI( $origuri ); if ( $uri != '' ) { // Replace original uri:s into SMW:s internal URIs // (The "http://.../Special:URIResolver/..." ones) $query = str_replace( $origuri, $uri, $this->m_query ); } } $this->setQueryInPost( $query ); } }