http://www.mediawiki.org/wiki/Special:Code/MediaWiki/71899

Revision: 71899
Author:   mkroetzsch
Date:     2010-08-29 20:32:59 +0000 (Sun, 29 Aug 2010)

Log Message:
-----------
Fixing Bug 23781 (assuming that it was caused by namespace-like prefixes in 
property names confusing the Title generation)
-This line, and those below, will be ignored--

M    includes/SMW_QueryProcessor.php

Modified Paths:
--------------
    trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php

Modified: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php
===================================================================
--- trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php  
2010-08-29 20:23:36 UTC (rev 71898)
+++ trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php  
2010-08-29 20:32:59 UTC (rev 71899)
@@ -205,16 +205,16 @@
                                                continue;
                                        }
                                        
-                                       if ( $title->getNamespace() == 
SMW_NS_PROPERTY ) {
+                                       if ( $title->getNamespace() == 
NS_CATEGORY ) {
+                                               $printmode = 
SMWPrintRequest::PRINT_CCAT;
+                                               $data = $title;
+                                               $label = $showmode ? '' : 
$title->getText();  // default
+                                       } else { // enforce interpretation as 
property (even if it starts with something that looks like another namespace)
                                                $printmode = 
SMWPrintRequest::PRINT_PROP;
                                                $property = 
SMWPropertyValue::makeUserProperty( trim( $propparts[0] ) );
                                                $data = $property;
                                                $label = $showmode ? '' : 
$property->getWikiValue();  // default
-                                       } elseif ( $title->getNamespace() == 
NS_CATEGORY ) {
-                                               $printmode = 
SMWPrintRequest::PRINT_CCAT;
-                                               $data = $title;
-                                               $label = $showmode ? '' : 
$title->getText();  // default
-                                       } // else?
+                                       }
                                }
                                
                                if ( count( $propparts ) == 1 ) { // no 
outputformat found, leave empty



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to