Manual:Defines.php/de

From mediawiki.org
This page is a translated version of the page Manual:Defines.php and the translation is 76% complete.

Details

Defines.php contains "a few constants that might be needed during LocalSettings.php . Note: these constants must all be resolvable at compile time by HipHop, since this file will not be executed during request startup for a compiled MediaWiki." Among the constants are version constants for the benefit of extensions; Unicode normalisation related constants; namespace constants, including those that provide support for $wgResourceModules ; protocol constants for wfExpandUrl; and flags for Parser::replaceLinkHolders.

Konstanten

  • Anti-lock flags

Flaggen

In einigen Fällen, werden Bitfelder für Flags genutzt. Beispiele sind wie folgt:

define( 'DBO_DEBUG', 1 );
define( 'DBO_NOBUFFER', 2 );
define( 'DBO_IGNORE', 4 );
define( 'DBO_TRX', 8 ); // automatically start transaction on first query
define( 'DBO_DEFAULT', 16 );
define( 'DBO_PERSISTENT', 32 );
define( 'DBO_SYSDBA', 64 ); // for oracle maintenance
define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle
define( 'DBO_SSL', 256 );
define( 'DBO_COMPRESS', 512 );
define( 'ALF_PRELOAD_LINKS', 1 ); // unused
define( 'ALF_PRELOAD_EXISTENCE', 2 ); // unused
define( 'ALF_NO_LINK_LOCK', 4 );
define( 'ALF_NO_BLOCK_LOCK', 8 );
define( 'EDIT_NEW', 1 );
define( 'EDIT_UPDATE', 2 );
define( 'EDIT_MINOR', 4 );
define( 'EDIT_SUPPRESS_RC', 8 );
define( 'EDIT_FORCE_BOT', 16 );
define( 'EDIT_DEFER_UPDATES', 32 );
define( 'EDIT_AUTOSUMMARY', 64 );

Diese schließt die Nutzung von Bit-Operatoren ein. Z.B. wenn Sie die EDIT_MINOR flag in $flags auf true setzen wollen:

$flags |= EDIT_MINOR;

Wenn Sie beide sowohl die EDIT_MINOR und EDIT_NEW flags in $flags auf true und alle anderen flags in $flags auf false setzen wollen:

$flags = EDIT_MINOR | EDIT_NEW;

Wenn Sie die EDIT_MINOR flag in $flags auf false setzen wollen:

$flags &= ~EDIT_MINOR;

Wenn Sie wollen dass $isminor nur true ist, wenn die EDIT_MINOR flag auf true in $flags gesetzt ist:

$isminor = ( $flags & EDIT_MINOR );