http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88456

Revision: 88456
Author:   yaron
Date:     2011-05-20 15:38:29 +0000 (Fri, 20 May 2011)
Log Message:
-----------
Another fix for SMW 1.6

Modified Paths:
--------------
    trunk/extensions/SemanticForms/includes/SF_FormLinker.php

Modified: trunk/extensions/SemanticForms/includes/SF_FormLinker.php
===================================================================
--- trunk/extensions/SemanticForms/includes/SF_FormLinker.php   2011-05-20 
15:34:21 UTC (rev 88455)
+++ trunk/extensions/SemanticForms/includes/SF_FormLinker.php   2011-05-20 
15:38:29 UTC (rev 88456)
@@ -137,9 +137,14 @@
                
                $form_names = array();
                foreach ( $res as $wiki_page_value ) {
-                       $form_title = $wiki_page_value->getTitle();
-                       if ( ! is_null( $form_title ) ) {
-                               $form_names[] = $form_title->getText();
+                       // SMW 1.6+
+                       if ( $wiki_page_value instanceof SMWDIWikiPage ) {
+                               $form_names[] = $wiki_page_value->getDBkey();
+                       } else {
+                               $form_title = $wiki_page_value->getTitle();
+                               if ( ! is_null( $form_title ) ) {
+                                       $form_names[] = $form_title->getText();
+                               }
                        }
                }
                // if we're using a non-English language, check for the English 
string as well


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to