* Given an array of non-normalised probabilities, this function will select
* an element and return the appropriate key
*
- * @deprecated 1.21, use wfPickRandom()
+ * @deprecated 1.21, use ArrayUtils::pickRandom()
*
* @param $weights array
*
* @return bool|int|string
*/
function pickRandom( $weights ) {
- return wfPickRandom( $weights );
+ return ArrayUtils::pickRandom( $weights );
}
/**
$this->mServers[$i]['slave pos'] = $conn->getSlavePos();
}
}
- if ( $this->mReadIndex <=0 && $this->mLoads[$i]>0 && $i !== false ) {
+ if ( $this->mReadIndex <= 0 && $this->mLoads[$i] > 0 && $i !== false ) {
$this->mReadIndex = $i;
}
}