r91984 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r91983‎ | r91984 | r91985 >
Date:18:33, 12 July 2011
Author:devayon
Status:deferred
Tags:
Comment:
follow-up to r91979
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/specials/AskSpecial/SMW_QueryUIHelper.php
@@ -17,16 +17,18 @@
1818 const DISABLE_AUTO_SUGGEST = false;
1919
2020 /**
21 - * Builds a read-only #ask of the given query
 21+ * Builds a read-only #ask embed code of the given query.
2222 *
2323 * @return string
2424 */
2525 protected function getAskEmbedBox() {
26 - $result = '<div id="inlinequeryembed">
27 - <div id="inlinequeryembedinstruct">' . wfMsg( 'smw_ask_embed_instr' ) . '</div>
28 - <textarea id="inlinequeryembedarea" readonly="yes" cols="20" rows="6" onclick="this.select()">' .
29 - $this->m_ui_helper->getAsk() . '</textarea></div>';
30 -
 26+ $result = '';
 27+ if ( $this->m_ui_helper->getQueryString() != "" ) {
 28+ $result = Html::rawElement( 'div', array( 'id' => 'inlinequeryembed' ),
 29+ Html::rawElement( 'div', array( 'id' => 'inlinequeryembedinstruct' ), wfMsg( 'smw_ask_embed_instr' ) ) .
 30+ Html::element( 'textarea', array( 'id' => 'inlinequeryembedarea', 'readonly' => 'yes', 'cols' => '20', 'rows' => '6', 'onclick' => 'this.select()' ),
 31+ $this->m_ui_helper->getAsk() ) );
 32+ }
3133 return $result;
3234 }
3335
@@ -1361,5 +1363,5 @@
13621364 return false;
13631365 }
13641366 }
1365 -
 1367+
13661368 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r91979added #ask output, limited sorting support and squashed some bugsdevayon18:00, 12 July 2011