Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_QueryHandler.php |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | * @var boolean |
108 | 108 | */ |
109 | 109 | protected $showSubject = true; |
110 | | - |
| 110 | + |
111 | 111 | /** |
112 | 112 | * Constructor. |
113 | 113 | * |
— | — | @@ -199,7 +199,18 @@ |
200 | 200 | */ |
201 | 201 | public function setShowSubject( $showSubject ) { |
202 | 202 | $this->showSubject = $showSubject; |
203 | | - } |
| 203 | + } |
| 204 | + |
| 205 | + /** |
| 206 | + * Sets the text for the link to the page when separate from the title. |
| 207 | + * |
| 208 | + * @since 0.8 |
| 209 | + * |
| 210 | + * @param string $text |
| 211 | + */ |
| 212 | + public function setPageLinkText( $text ) { |
| 213 | + $this->pageLinkText = $text; |
| 214 | + } |
204 | 215 | |
205 | 216 | /** |
206 | 217 | * Gets the query result as a list of locations. |
— | — | @@ -309,10 +320,15 @@ |
310 | 321 | } |
311 | 322 | |
312 | 323 | if ( $this->titleLinkSeperate ) { |
| 324 | + $txt = $object->getTitle()->getText(); |
| 325 | + |
| 326 | + if ( $this->pageLinkText != '' ) { |
| 327 | + $txt = str_replace( '$1', $txt, $this->pageLinkText ); |
| 328 | + } |
313 | 329 | $text .= Html::element( |
314 | 330 | 'a', |
315 | 331 | array( 'href' => $object->getTitle()->getFullUrl() ), |
316 | | - str_replace( '$1', $object->getTitle()->getText(), $this->params['pagelinktext'] ) |
| 332 | + $txt |
317 | 333 | ); |
318 | 334 | } |
319 | 335 | } |