Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/111809

Change subject: Fix for JS not always getting included on the page, with SMW 
1.9+
......................................................................

Fix for JS not always getting included on the page, with SMW 1.9+

Change-Id: I0ef6e4718697039b64072ac5133ee48693ab0368
---
M specials/SF_RunQuery.php
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms 
refs/changes/09/111809/1

diff --git a/specials/SF_RunQuery.php b/specials/SF_RunQuery.php
index 0dd86c0..2c0492f 100644
--- a/specials/SF_RunQuery.php
+++ b/specials/SF_RunQuery.php
@@ -97,6 +97,15 @@
 
                        $wgParser->mOptions = ParserOptions::newFromUser( 
$wgUser );
                        $resultsText = $wgParser->parse( $data_text, $wgTitle, 
$wgParser->mOptions )->getText();
+
+                       // Possibly a hack - for SMW 1.9+, if the "query
+                       // results" for this page contain a result format that
+                       // includes Javascript, the JS libraries required
+                       // don't necessarily get included on the page. This
+                       // call adds in whatever hasn't yet been added.
+                       if ( method_exists( 'SMWOutputs', 
'commitToParserOutput' ) ) {
+                               SMWOutputs::commitToParserOutput( 
$wgParser->getOutput() );
+                       }
                }
 
                // Get the full text of the form.

-- 
To view, visit https://gerrit.wikimedia.org/r/111809
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ef6e4718697039b64072ac5133ee48693ab0368
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to