Index: trunk/extensions/SemanticMediaWiki/includes/SMW_QueryProcessor.php |
— | — | @@ -37,6 +37,13 @@ |
38 | 38 | * @return array |
39 | 39 | */ |
40 | 40 | public static function getProcessedParams( array $params, array $printRequests = null, $unknownInvalid = true ) { |
| 41 | +// $mainlabel = array_key_exists( 'mainlabel', $params ) ? $params['mainlabel'] : ''; |
| 42 | +// if ( ( $querymode == SMWQuery::MODE_NONE ) || |
| 43 | +// ( ( !$desc->isSingleton() || ( count( $desc->getPrintRequests() ) + count( $extraprintouts ) == 0 ) ) |
| 44 | +// && ( trim( $mainlabel ) != '-' ) ) ) { |
| 45 | +// $desc->prependPrintRequest( new SMWPrintRequest( SMWPrintRequest::PRINT_THIS, $mainlabel ) ); |
| 46 | +// } |
| 47 | + |
41 | 48 | $paramDefinitions = self::getParameters(); |
42 | 49 | |
43 | 50 | $formatManipulation = new SMWParamFormat(); |
— | — | @@ -95,17 +102,10 @@ |
96 | 103 | $querymode = $printer->getQueryMode( $context ); |
97 | 104 | } |
98 | 105 | |
99 | | - $mainlabel = array_key_exists( 'mainlabel', $params ) ? $params['mainlabel'] : ''; |
100 | | - if ( ( $querymode == SMWQuery::MODE_NONE ) || |
101 | | - ( ( !$desc->isSingleton() || ( count( $desc->getPrintRequests() ) + count( $extraprintouts ) == 0 ) ) |
102 | | - && ( trim( $mainlabel ) != '-' ) ) ) { |
103 | | - $desc->prependPrintRequest( new SMWPrintRequest( SMWPrintRequest::PRINT_THIS, $mainlabel ) ); |
104 | | - } |
105 | | - |
106 | 106 | $query = new SMWQuery( $desc, ( $context != self::SPECIAL_PAGE ), ( $context == self::CONCEPT_DESC ) ); |
107 | 107 | $query->setQueryString( $querystring ); |
108 | 108 | $query->setExtraPrintouts( $extraprintouts ); |
109 | | - $query->setMainLabel( $mainlabel ); |
| 109 | + $query->setMainLabel( $params['mainlabel'] ); |
110 | 110 | $query->addErrors( $qp->getErrors() ); // keep parsing errors for later output |
111 | 111 | |
112 | 112 | // set mode, limit, and offset: |
Index: trunk/extensions/SemanticMediaWiki/includes/params/SMW_ParamFormat.php |
— | — | @@ -126,7 +126,7 @@ |
127 | 127 | |
128 | 128 | // If no default was set by an extension, use a table or list, depending on the column count. |
129 | 129 | if ( $format === false ) { |
130 | | - $format = count( $this->printRequests ) == 0 ? 'list' : 'table'; |
| 130 | + $format = count( $this->printRequests ) == 1 ? 'list' : 'table'; |
131 | 131 | } |
132 | 132 | |
133 | 133 | return $format; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | * @ingroup SMW |
16 | 16 | */ |
17 | 17 | |
18 | | -define( 'SMW_VERSION', '1.6.2 light' ); |
| 18 | +define( 'SMW_VERSION', '1.6.2.1 alpha light' ); |
19 | 19 | |
20 | 20 | require_once( 'SMW_GlobalFunctions.php' ); |
21 | 21 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | */ |
10 | 10 | |
11 | 11 | // The SMW version number. |
12 | | -define( 'SMW_VERSION', '1.6.2' ); |
| 12 | +define( 'SMW_VERSION', '1.6.2.1 alpha' ); |
13 | 13 | |
14 | 14 | // A flag used to indicate SMW defines a semantic extension type for extension crdits. |
15 | 15 | define( 'SEMANTIC_EXTENSION_TYPE', true ); |