r114012 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r114011‎ | r114012 | r114013 >
Date:14:39, 16 March 2012
Author:reedy
Status:reverted
Tags:gerritmigration 
Comment:
Partial revert r113986

Bug 35253 - PHP warning in Collection from use of undefined callback

I hate computers
Modified paths:
  • /trunk/extensions/Collection/Collection.suggest.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Collection/Collection.suggest.php
@@ -598,3 +598,24 @@
599599 return count( $this->mPropList );
600600 }
601601 }
 602+
 603+/**
 604+ * sort $mPropList by the entries values
 605+ * sort alphabetically by equal values
 606+ *
 607+ * @param $a, $b: arrays that contain two entries
 608+ * the keys: 'name' & 'val'
 609+ * 'name': an articlename
 610+ * 'val' : a value from 1 to 1.5
 611+ * @return 1, -1 or 0
 612+ */
 613+function wgCollectionCompareProps( $a, $b ) {
 614+ if ( $a['val'] == $b['val'] ) {
 615+ return strcmp( $a['name'], $b['name'] );
 616+ }
 617+ if ( $a['val'] < $b['val'] ) {
 618+ return 1;
 619+ } else {
 620+ return - 1;
 621+ }
 622+}

Follow-up revisions

RevisionCommit summaryAuthorDate
r114399Revert r113740 and its followups r113785, r113985, r113986, r113988, r113991,...catrope19:56, 21 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113986Documentation stuffsreedy01:26, 16 March 2012

Status & tagging log