Manual:$wgCookiePrefix

From MediaWiki.org
Jump to: navigation, search
Cookies: $wgCookiePrefix
Custom cookie prefix.
Introduced in version: 1.13.0 (r37893)
Removed in version: still in use
Allowed values: (string) or false
Default value: false

Other settings: Alphabetical | By Function

Details[edit | edit source]

Set it to use a custom one. Setting it to false or an empty string sets the default of using the database name.

The default value is determined in Setup.php:

if ( !$wgCookiePrefix ) {
        if ( $wgSharedDB && $wgSharedPrefix && in_array( 'user', $wgSharedTables ) ) {
                $wgCookiePrefix = $wgSharedDB . '_' . $wgSharedPrefix;
        } elseif ( $wgSharedDB && in_array( 'user', $wgSharedTables ) ) {
                $wgCookiePrefix = $wgSharedDB;
        } elseif ( $wgDBprefix ) {
                $wgCookiePrefix = $wgDBname . '_' . $wgDBprefix;
        } else {
                $wgCookiePrefix = $wgDBname;
        }
}

See also[edit | edit source]

Language: English  • Deutsch • русский