Add support for Number grouping(commafy) based on CLDR number grouping patterns like...
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 4a722b5..cbe28c2 100644 (file)
@@ -869,7 +869,7 @@ function wfErrorLog( $text, $file ) {
                }
 
                $len = strlen( $text );
-               $maxLen = socket_get_option( $sock, SOL_UDP, SO_SNDBUF );
+               $maxLen = socket_get_option( $sock, SOL_SOCKET, SO_SNDBUF );
 
                if ( $len > $maxLen ) {
                        $len = $maxLen - 1;
@@ -3148,8 +3148,10 @@ function wfForeignMemcKey( $db, $prefix /*, ... */ ) {
  * @return String
  */
 function wfWikiID() {
-       global $wgDBprefix, $wgDBname;
-       if ( $wgDBprefix ) {
+       global $wgDBprefix, $wgDBname, $wgWikiID;
+       if ( $wgWikiID !== false ) {
+               return $wgWikiID;
+       } elseif ( $wgDBprefix ) {
                return "$wgDBname-$wgDBprefix";
        } else {
                return $wgDBname;