r88456 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88455‎ | r88456 | r88457 >
Date:15:38, 20 May 2011
Author:yaron
Status:deferred
Tags:
Comment:
Another fix for SMW 1.6
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormLinker.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormLinker.php
@@ -137,9 +137,14 @@
138138
139139 $form_names = array();
140140 foreach ( $res as $wiki_page_value ) {
141 - $form_title = $wiki_page_value->getTitle();
142 - if ( ! is_null( $form_title ) ) {
143 - $form_names[] = $form_title->getText();
 141+ // SMW 1.6+
 142+ if ( $wiki_page_value instanceof SMWDIWikiPage ) {
 143+ $form_names[] = $wiki_page_value->getDBkey();
 144+ } else {
 145+ $form_title = $wiki_page_value->getTitle();
 146+ if ( ! is_null( $form_title ) ) {
 147+ $form_names[] = $form_title->getText();
 148+ }
144149 }
145150 }
146151 // if we're using a non-English language, check for the English string as well