Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php |
— | — | @@ -611,7 +611,6 @@ |
612 | 612 | * suitable description. |
613 | 613 | */ |
614 | 614 | protected function getClassDescription(&$setNS, &$label, $category=true) { |
615 | | - global $smwgSMWBetaCompatible; // * printouts only for this old version |
616 | 615 | // note: no subqueries allowed here, inline disjunction allowed, wildcards allowed |
617 | 616 | $result = NULL; |
618 | 617 | $continue = true; |
— | — | @@ -619,26 +618,6 @@ |
620 | 619 | $chunk = $this->readChunk(); |
621 | 620 | if ($chunk == '+') { |
622 | 621 | //wildcard, ignore for categories (semantically meaningless, everything is in some class) |
623 | | - } elseif ( ($chunk == '+') && $category && $smwgSMWBetaCompatible) { // print statement |
624 | | - $chunk = $this->readChunk('\]\]|\|'); |
625 | | - if ($chunk == '|') { |
626 | | - $printlabel = $this->readChunk('\]\]'); |
627 | | - if ($printlabel != ']]') { |
628 | | - $chunk = $this->readChunk('\]\]'); |
629 | | - } else { |
630 | | - $printlabel = ''; |
631 | | - $chunk = ']]'; |
632 | | - } |
633 | | - } else { |
634 | | - global $wgContLang; |
635 | | - $printlabel = $wgContLang->getNSText(NS_CATEGORY); |
636 | | - } |
637 | | - if ($chunk == ']]') { |
638 | | - return new SMWPrintRequest(SMWPrintRequest::PRINT_CATS, $printlabel); |
639 | | - } else { |
640 | | - $this->m_errors[] = wfMsgForContent('smw_badprintout'); |
641 | | - return NULL; |
642 | | - } |
643 | 622 | } else { //assume category/concept title |
644 | 623 | /// NOTE: use m_c...prefix to prevent problems with, e.g., [[Category:Template:Test]] |
645 | 624 | $class = Title::newFromText(($category?$this->m_categoryprefix:$this->m_conceptprefix) . $chunk); |
— | — | @@ -661,7 +640,6 @@ |
662 | 641 | * string. |
663 | 642 | */ |
664 | 643 | protected function getPropertyDescription($propertyname, &$setNS, &$label) { |
665 | | - global $smwgSMWBetaCompatible; // support for old * printouts of beta |
666 | 644 | wfLoadExtensionMessages('SemanticMediaWiki'); |
667 | 645 | $this->readChunk(); // consume separator ":=" or "::" |
668 | 646 | // first process property chain syntax (e.g. "property1.property2::value"): |
— | — | @@ -772,34 +750,14 @@ |
773 | 751 | $comparator = SMW_CMP_EQ; |
774 | 752 | $printmodifier = ''; |
775 | 753 | SMWQueryParser::prepareValue($value, $comparator, $printmodifier); |
776 | | - if ( ($value == '*') && $smwgSMWBetaCompatible ) { |
777 | | - if ($chunk == '|') { |
778 | | - $printlabel = $this->readChunk('\]\]'); |
779 | | - if ($printlabel != ']]') { |
780 | | - $chunk = $this->readChunk('\]\]'); |
781 | | - } else { |
782 | | - $printlabel = ''; |
783 | | - $chunk = ']]'; |
784 | | - } |
785 | | - } else { |
786 | | - $printlabel = $property->getWikiValue(); |
787 | | - } |
788 | | - if ($chunk == ']]') { |
789 | | - return new SMWPrintRequest(SMWPrintRequest::PRINT_PROP, $printlabel, $property, $printmodifier); |
790 | | - } else { |
791 | | - $this->m_errors[] = wfMsgForContent('smw_badprintout'); |
792 | | - return NULL; |
793 | | - } |
| 754 | + $dv = SMWDataValueFactory::newPropertyObjectValue($property, $value); |
| 755 | + if (!$dv->isValid()) { |
| 756 | + $this->m_errors = $this->m_errors + $dv->getErrors(); |
| 757 | + $vd = new SMWThingDescription(); |
794 | 758 | } else { |
795 | | - $dv = SMWDataValueFactory::newPropertyObjectValue($property, $value); |
796 | | - if (!$dv->isValid()) { |
797 | | - $this->m_errors = $this->m_errors + $dv->getErrors(); |
798 | | - $vd = new SMWThingDescription(); |
799 | | - } else { |
800 | | - $vd = new SMWValueDescription($dv, $comparator); |
801 | | - } |
802 | | - $innerdesc = $this->addDescription($innerdesc, $vd, false); |
| 759 | + $vd = new SMWValueDescription($dv, $comparator); |
803 | 760 | } |
| 761 | + $innerdesc = $this->addDescription($innerdesc, $vd, false); |
804 | 762 | } |
805 | 763 | } |
806 | 764 | $continue = ($chunk == '||'); |
— | — | @@ -828,20 +786,7 @@ |
829 | 787 | * effective value string, or of "*" for print statements. |
830 | 788 | */ |
831 | 789 | static public function prepareValue(&$value, &$comparator, &$printmodifier) { |
832 | | - global $smwgQComparators, $smwgSMWBetaCompatible; // support for old * printouts of beta |
833 | | - // get print modifier behind * |
834 | | - if ($smwgSMWBetaCompatible) { |
835 | | - $list = preg_split('/^\*/',$value,2); |
836 | | - if (count($list) == 2) { //hit |
837 | | - $value = '*'; |
838 | | - $printmodifier = $list[1]; |
839 | | - } else { |
840 | | - $printmodifier = ''; |
841 | | - } |
842 | | - if ($value == '*') { // printout statement |
843 | | - return; |
844 | | - } |
845 | | - } |
| 790 | + global $smwgQComparators; |
846 | 791 | $list = preg_split('/^(' . $smwgQComparators . ')/u',$value, 2, PREG_SPLIT_DELIM_CAPTURE); |
847 | 792 | $comparator = SMW_CMP_EQ; |
848 | 793 | if (count($list) == 3) { // initial comparator found ($list[1] should be empty) |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Settings.php |
— | — | @@ -36,26 +36,6 @@ |
37 | 37 | require_once('SMW_GlobalFunctions.php'); |
38 | 38 | |
39 | 39 | ### |
40 | | -# SMW has changed a lot since version 0.1 and some additional settings are |
41 | | -# needed to preserve old functions on sites that have been using beta versions |
42 | | -# of SMW (any version prior to 1.0). Sites still using obsolete SMW beta |
43 | | -# features should set the following to "true". All others can safely keep the |
44 | | -# default here. |
45 | | -# |
46 | | -# Setting this option to true has the following effect: |
47 | | -# * The obsolete namespace "Relation" will still be created (maybe some sites |
48 | | -# have content there). |
49 | | -# * Statements like [[property::*]] in queries will be interpreted as printout |
50 | | -# statements (like ?property in the current #ask query syntax). |
51 | | -# This option must be set before including this file, or otherwise the old |
52 | | -# Relation namespaces will not be available. |
53 | | -## |
54 | | -if (!isset($smwgSMWBetaCompatible)) { |
55 | | - $smwgSMWBetaCompatible = false; |
56 | | -} |
57 | | -## |
58 | | - |
59 | | -### |
60 | 40 | # If you already have custom namespaces on your site, insert |
61 | 41 | # $smwgNamespaceIndex = ???; |
62 | 42 | # into your LocalSettings.php *before* including this file. The number ??? must |