fix some spacing
[lhc/web/wiklou.git] / includes / db / LoadBalancer.php
index 311691d..cbd79c3 100644 (file)
@@ -117,14 +117,14 @@ class LoadBalancer {
         * 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 );
        }
 
        /**
@@ -323,7 +323,7 @@ class LoadBalancer {
                                        $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;
                        }
                }