r107850 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107849‎ | r107850 | r107851 >
Date:20:40, 2 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/RELEASE-NOTES (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/SemanticMediaWiki.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QueryPrinter.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/RELEASE-NOTES
@@ -1,6 +1,15 @@
22 For a documentation of all features, see http://semantic-mediawiki.org
33
44
 5+== SMW 1.7.1 ==
 6+
 7+THIS IS NOT A RELEASE YET
 8+
 9+Semantic MediaWiki 1.7.1 is currently in beta-quality and is not recommended for use in
 10+production until the actual release.
 11+
 12+* Fixed bug in "further results" links causing the main column to be displayed twice on Special:Ask.
 13+
514 == SMW 1.7 ==
615
716 Released on January 1, 2012.
@@ -31,12 +40,12 @@
3241 * Fixed some issues with the category result format (including bug 30761).
3342 * Fixed email validation issue (bug 32295).
3443 * Fixed incorrect handling of sort and order parameters on Special:Ask (bug 32706).
35 -* Fixed display of images to old behavior after a recent regression.
36 -* Fixed several more issues not listed here.
 44+* Fixed display of images to old behaviour after a recent regression.
3745 * Fixed fatal error in the concept cache maintenance script (bug 32592).
3846 * Fixed factbox links to Special:SearchByProperty containing numerical numbers for
3947 wikis in languages with the comma as decimal separator instead of a dot.
4048 * Fixed the "hide incoming properties" link on Special:Browse.
 49+* Fixed several more issues not listed here.
4150 * Dropped compatibility with MediaWiki 1.15.x (and earlier).
4251 * Dropped compatibility with old-style (SMW < 1.6) query printers.
4352 * Full compatibility with MediaWiki 1.18 and foreward-compatibility with 1.19.
Index: trunk/extensions/SemanticMediaWiki/includes/queryprinters/SMW_QueryPrinter.php
@@ -451,7 +451,7 @@
452452 * @return boolean
453453 */
454454 protected function linkFurtherResults( $results ) {
455 - return ( $this->mInline && $results->hasFurtherResults() && ( $this->mSearchlabel !== '' ) );
 455+ return $this->mInline && $results->hasFurtherResults() && $this->mSearchlabel !== '';
456456 }
457457
458458 /**
Index: trunk/extensions/SemanticMediaWiki/includes/storage/SMW_QueryResult.php
@@ -193,6 +193,9 @@
194194 * can also be changed afterwards with SMWInfolink::setCaption()). If empty, the
195195 * message 'smw_iq_moreresults' is used as a caption.
196196 *
 197+ * TODO: have this work for all params without manually overriding and adding everything
 198+ * (this is possible since the param handling changes in 1.7)
 199+ *
197200 * @param mixed $caption A caption string or false
198201 *
199202 * @return SMWInfolink
@@ -200,11 +203,19 @@
201204 public function getQueryLink( $caption = false ) {
202205 $params = array( trim( $this->mQuery->getQueryString() ) );
203206
204 - foreach ( $this->mQuery->getExtraPrintouts() as $printout ) {
205 - $params[] = $printout->getSerialisation();
 207+ foreach ( $this->mQuery->getExtraPrintouts() as /* SMWPrintRequest */ $printout ) {
 208+ $serialization = $printout->getSerialisation();
 209+
 210+ // TODO: this is a hack to get rid of the mainlabel param in case it was automatically added
 211+ // by SMWQueryProcessor::addThisPrintout. Should be done nicer when this link creation gets redone.
 212+ if ( $serialization !== '?#' ) {
 213+ $params[] = $serialization;
 214+ }
206215 }
207216
208 - $params['mainlabel'] = $this->mQuery->getMainLabel();
 217+ if ( $this->mQuery->getMainLabel() !== false ) {
 218+ $params['mainlabel'] = $this->mQuery->getMainLabel();
 219+ }
209220
210221 if ( count( $this->mQuery->sortkeys ) > 0 ) {
211222 $order = implode( ',', $this->mQuery->sortkeys );
Index: trunk/extensions/SemanticMediaWiki/SemanticMediaWiki.php
@@ -34,7 +34,7 @@
3535 }
3636
3737 // The SMW version number.
38 -define( 'SMW_VERSION', '1.7' );
 38+define( 'SMW_VERSION', '1.7.1 alpha' );
3939
4040 // Registration of the extension credits, see Special:Version.
4141 $wgExtensionCredits['semantic'][] = array(