}
$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;
* @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;