r95395 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95394‎ | r95395 | r95396 >
Date:12:47, 24 August 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix documentation (clearing w/c)
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/LoadBalancer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/Database.php
@@ -2295,14 +2295,11 @@
22962296 * to collide. However if you do this, you run the risk of encountering
22972297 * errors which wouldn't have occurred in MySQL.
22982298 *
2299 - * @param $rows Can be either a single row to insert, or multiple rows,
 2299+ * @param $table String: The table to replace the row(s) in.
 2300+ * @param $rows array Can be either a single row to insert, or multiple rows,
23002301 * in the same format as for DatabaseBase::insert()
2301 - * @param $uniqueIndexes is an array of indexes. Each element may be either
 2302+ * @param $uniqueIndexes array is an array of indexes. Each element may be either
23022303 * a field name or an array of field names
2303 - *
2304 - * @param $table String: The table to replace the row(s) in.
2305 - * @param $uniqueIndexes Array: An associative array of indexes
2306 - * @param $rows Array: Array of rows to replace
23072304 * @param $fname String: Calling function name (use __METHOD__) for logs/profiling
23082305 */
23092306 function replace( $table, $uniqueIndexes, $rows, $fname = 'DatabaseBase::replace' ) {
Index: trunk/phase3/includes/db/LoadBalancer.php
@@ -117,7 +117,7 @@
118118 return false;
119119 }
120120 $max = mt_getrandmax();
121 - $rand = mt_rand(0, $max) / $max * $sum;
 121+ $rand = mt_rand( 0, $max ) / $max * $sum;
122122
123123 $sum = 0;
124124 foreach ( $weights as $i => $w ) {

Status & tagging log