Index: branches/SemanticMaps0.8/includes/queryprinters/SM_QueryPrinters.php |
— | — | @@ -77,15 +77,14 @@ |
78 | 78 | $params['staticlocations']->addManipulations( new MapsParamLocation( '~' ) ); |
79 | 79 | $params['staticlocations']->setDefault( array() ); |
80 | 80 | |
81 | | - $params['centre'] = new Parameter( |
82 | | - 'centre', |
83 | | - Parameter::TYPE_STRING, |
84 | | - '', // TODO |
85 | | - array( 'center' ), |
86 | | - array( |
87 | | - new CriterionIsLocation(), |
88 | | - ) |
89 | | - ); |
| 81 | + $params['centre'] = new Parameter( 'centre' ); |
| 82 | + $params['centre']->setDefault( false ); |
| 83 | + $params['centre']->addAliases( 'center' ); |
| 84 | + $params['centre']->addCriteria( new CriterionIsLocation() ); |
| 85 | + $params['centre']->setDoManipulationOfDefault( false ); |
| 86 | + $manipulation = new MapsParamLocation(); |
| 87 | + $manipulation->toJSONObj = true; |
| 88 | + $params['centre']->addManipulations( $manipulation ); |
90 | 89 | |
91 | 90 | $params['icon'] = new Parameter( |
92 | 91 | 'icon', |
Index: branches/SemanticMaps0.8/includes/queryprinters/SM_MapPrinter.php |
— | — | @@ -183,8 +183,7 @@ |
184 | 184 | if ( $location->isValid() ) { |
185 | 185 | $jsonObj = $location->getJSONObject( $params['title'], $params['label'], $iconUrl ); |
186 | 186 | |
187 | | - $jsonObj['title'] = strip_tags( $parser->parse( $jsonObj['title'], $wgTitle, new ParserOptions() )->getText() ); |
188 | | - $jsonObj['text'] = $parser->parse( $jsonObj['text'], $wgTitle, new ParserOptions() )->getText(); |
| 187 | + $jsonObj['title'] = strip_tags( $jsonObj['title'] ); |
189 | 188 | |
190 | 189 | $params['locations'][] = $jsonObj; |
191 | 190 | } |
Index: branches/SemanticMaps0.8/includes/queryprinters/SM_QueryHandler.php |
— | — | @@ -191,15 +191,17 @@ |
192 | 192 | // Loop throught all the parts of the field value. |
193 | 193 | while ( ( /* SMWDataValue */ $object = $resultArray->getNextObject() ) !== false ) { |
194 | 194 | if ( $object->getTypeID() == '_wpg' && $i == 0 ) { |
| 195 | + $title = $object->getLongText( $this->outputmode, null ); |
| 196 | + |
195 | 197 | if ( !$this->titleLinkSeperate && $this->linkAbsolute ) { |
196 | | - $title = Html::element( |
| 198 | + $text = Html::element( |
197 | 199 | 'a', |
198 | 200 | array( 'href' => $object->getTitle()->getFullUrl() ), |
199 | 201 | $object->getTitle()->getText() |
200 | | - ); |
| 202 | + ) . '<br />'; |
201 | 203 | } |
202 | 204 | else { |
203 | | - $title = $object->getLongText( $this->outputmode, $skin ); |
| 205 | + $text = $object->getLongText( $this->outputmode, $skin ) . '<br />'; |
204 | 206 | } |
205 | 207 | |
206 | 208 | if ( $this->titleLinkSeperate ) { |