r87135 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87134‎ | r87135 | r87136 >
Date:21:37, 29 April 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added forgotten code
Modified paths:
  • /trunk/extensions/SemanticMaps/includes/queryprinters/SM_QueryHandler.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/includes/queryprinters/SM_QueryHandler.php
@@ -106,7 +106,7 @@
107107 * @var boolean
108108 */
109109 protected $showSubject = true;
110 -
 110+
111111 /**
112112 * Constructor.
113113 *
@@ -199,7 +199,18 @@
200200 */
201201 public function setShowSubject( $showSubject ) {
202202 $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+ }
204215
205216 /**
206217 * Gets the query result as a list of locations.
@@ -309,10 +320,15 @@
310321 }
311322
312323 if ( $this->titleLinkSeperate ) {
 324+ $txt = $object->getTitle()->getText();
 325+
 326+ if ( $this->pageLinkText != '' ) {
 327+ $txt = str_replace( '$1', $txt, $this->pageLinkText );
 328+ }
313329 $text .= Html::element(
314330 'a',
315331 array( 'href' => $object->getTitle()->getFullUrl() ),
316 - str_replace( '$1', $object->getTitle()->getText(), $this->params['pagelinktext'] )
 332+ $txt
317333 );
318334 }
319335 }

Status & tagging log