if ( $wgDebugLogFile != '' && !$wgProfileOnly ) {
# Strip unprintables; they can switch terminal modes when binary data
# gets dumped, which is pretty annoying.
- $text = preg_replace( '![\x00-\x08\x0b\x0c\x0e-\x1a\x1c-\x1f]!', ' ', $text );
+ $text = preg_replace( '![\x00-\x08\x0b\x0c\x0e-\x1f]!', ' ', $text );
$text = $wgDebugLogPrefix . $text;
wfErrorLog( $text, $wgDebugLogFile );
}
* @return String
*/
function wfMemcKey( /*... */ ) {
+ global $wgCachePrefix;
+ $prefix = $wgCachePrefix === false ? wfWikiID() : $wgCachePrefix;
$args = func_get_args();
- $key = wfWikiID() . ':' . implode( ':', $args );
+ $key = $prefix . ':' . implode( ':', $args );
$key = str_replace( ' ', '_', $key );
return $key;
}
* @return String
*/
function wfWikiID() {
- global $wgDBprefix, $wgDBname, $wgWikiID;
- if ( $wgWikiID !== false ) {
- return $wgWikiID;
- } elseif ( $wgDBprefix ) {
+ global $wgDBprefix, $wgDBname;
+ if ( $wgDBprefix ) {
return "$wgDBname-$wgDBprefix";
} else {
return $wgDBname;