r89369 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r89368‎ | r89369 | r89370 >
Date:21:27, 2 June 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
replaced deprecated getText method
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Property.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialBrowse.php
@@ -198,6 +198,7 @@
199199 * @param[in] $property SMWPropertyValue The property this value is linked to the subject with
200200 * @param[in] $value SMWDataValue The actual value
201201 * @param[in] $incoming bool If this is an incoming or outgoing link
 202+ *
202203 * @return string HTML with the link to the article, browse, and search pages
203204 */
204205 private function displayValue( SMWPropertyValue $property, SMWDataValue $dataValue, $incoming ) {
@@ -208,7 +209,7 @@
209210 if ( $dataValue->getTypeID() == '_wpg' ) {
210211 $html .= " " . SMWInfolink::newBrowsingLink( '+', $dataValue->getLongWikiText() )->getHTML( $linker );
211212 } elseif ( $incoming && $property->isVisible() ) {
212 - $html .= " " . SMWInfolink::newInversePropertySearchLink( '+', $dataValue->getTitle(), $property->getText(), 'smwsearch' )->getHTML( $linker );
 213+ $html .= " " . SMWInfolink::newInversePropertySearchLink( '+', $dataValue->getTitle(), $property->getDataItem()->getLabel(), 'smwsearch' )->getHTML( $linker );
213214 } else {
214215 $html .= $dataValue->getInfolinkText( SMW_OUTPUT_HTML, $linker );
215216 }
Index: trunk/extensions/SemanticMediaWiki/specials/SearchTriple/SMW_SpecialPageProperty.php
@@ -121,19 +121,25 @@
122122 } else {
123123 $html .= "<ul>\n";
124124 $count = $limit + 1;
 125+
125126 foreach ( $results as $di ) {
126127 $count--;
127128 if ( $count < 1 ) continue;
 129+
128130 $dv = SMWDataValueFactory::newDataItemValue( $di, $property->getDataItem() );
129131 $html .= '<li>' . $dv->getLongHTMLText( $linker ); // do not show infolinks, the magnifier "+" is ambiguous with the browsing '+' for '_wpg' (see below)
 132+
130133 if ( $property->getDataItem()->findPropertyTypeID() == '_wpg' ) {
131134 $browselink = SMWInfolink::newBrowsingLink( '+', $dv->getLongWikiText() );
132135 $html .= ' &#160;' . $browselink->getHTML( $linker );
133136 }
 137+
134138 $html .= "</li> \n";
135139 }
 140+
136141 $html .= "</ul>\n";
137142 }
 143+
138144 $html .= $navigation;
139145 }
140146
Index: trunk/extensions/SemanticMediaWiki/includes/datavalues/SMW_DV_Property.php
@@ -260,6 +260,7 @@
261261 * A function for registering/overwriting predefined properties for SMW. Should be called from
262262 * within the hook 'smwInitProperties'. Ids should start with three underscores "___" to avoid
263263 * current and future confusion with SMW built-ins.
 264+ *
264265 * @deprecated Use SMWDIProperty::registerProperty(). Will vanish before SMW 1.7.
265266 */
266267 static public function registerProperty( $id, $typeid, $label = false, $show = false ) {
@@ -270,6 +271,7 @@
271272 * Add a new alias label to an existing datatype id. Note that every ID should have a primary
272273 * label, either provided by SMW or registered with registerDatatype. This function should be
273274 * called from within the hook 'smwInitDatatypes'.
 275+ *
274276 * @deprecated Use SMWDIProperty::registerPropertyAlias(). Will vanish before SMW 1.7.
275277 */
276278 static public function registerPropertyAlias( $id, $label ) {
@@ -278,7 +280,8 @@
279281
280282 /**
281283 * @see SMWDIProperty::isUserDefined()
282 - * @deprecated
 284+ *
 285+ * @deprecated since 1.6
283286 */
284287 public function isUserDefined() {
285288 return $this->m_dataitem->isUserDefined();
@@ -286,7 +289,8 @@
287290
288291 /**
289292 * @see SMWDIProperty::isShown()
290 - * @deprecated
 293+ *
 294+ * @deprecated since 1.6
291295 */
292296 public function isShown() {
293297 return $this->m_dataitem->isShown();
@@ -294,7 +298,8 @@
295299
296300 /**
297301 * @see SMWDIProperty::isInverse()
298 - * @deprecated
 302+ *
 303+ * @deprecated since 1.6
299304 */
300305 public function isInverse() {
301306 return $this->m_dataitem->isInverse();
@@ -305,7 +310,8 @@
306311 * for internal (invisible) properties, it is the property ID. The value agrees
307312 * with the first component of getDBkeys() and it can be used in its place.
308313 * @see SMWDIProperty::getKey()
309 - * @deprecated
 314+ *
 315+ * @deprecated since 1.6
310316 */
311317 public function getDBkey() {
312318 return $this->m_dataitem->getKey();
@@ -313,7 +319,8 @@
314320
315321 /**
316322 * @see SMWDIProperty::getLabel()
317 - * @deprecated
 323+ *
 324+ * @deprecated since 1.6
318325 */
319326 public function getText() {
320327 return $this->m_dataitem->getLabel();

Status & tagging log