From a58285fd06c8113c45377c655dd43cef6337e815 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 11 Jan 2007 19:06:07 +0000 Subject: Aktualisierung auf MediaWiki 1.9.0 --- includes/DefaultSettings.php | 223 +++++++++++++++++++++++++++++++++---------- 1 file changed, 174 insertions(+), 49 deletions(-) (limited to 'includes/DefaultSettings.php') diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index ee1ed3a0..03697b69 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -32,7 +32,7 @@ require_once( 'includes/SiteConfiguration.php' ); $wgConf = new SiteConfiguration; /** MediaWiki version number */ -$wgVersion = '1.8.3'; +$wgVersion = '1.9.0'; /** Name of the site. It must be changed in LocalSettings.php */ $wgSitename = 'MediaWiki'; @@ -82,56 +82,84 @@ if( isset( $_SERVER['SERVER_PORT'] ) /** * The path we should point to. * It might be a virtual path in case with use apache mod_rewrite for example + * + * This *needs* to be set correctly. + * + * Other paths will be set to defaults based on it unless they are directly + * set in LocalSettings.php */ $wgScriptPath = '/wiki'; /** * Whether to support URLs like index.php/Page_title - * @global bool $wgUsePathInfo + * These often break when PHP is set up in CGI mode. + * PATH_INFO *may* be correct if cgi.fix_pathinfo is + * set, but then again it may not; lighttpd converts + * incoming path data to lowercase on systems with + * case-insensitive filesystems, and there have been + * reports of problems on Apache as well. + * + * To be safe we'll continue to keep it off by default. + * + * Override this to false if $_SERVER['PATH_INFO'] + * contains unexpectedly incorrect garbage, or to + * true if it is really correct. + * + * The default $wgArticlePath will be set based on + * this value at runtime, but if you have customized + * it, having this incorrectly set to true can + * cause redirect loops when "pretty URLs" are used. + * */ -$wgUsePathInfo = ( strpos( php_sapi_name(), 'cgi' ) === false ); +$wgUsePathInfo = + ( strpos( php_sapi_name(), 'cgi' ) === false ) && + ( strpos( php_sapi_name(), 'apache2filter' ) === false ) && + ( strpos( php_sapi_name(), 'isapi' ) === false ); /**#@+ * Script users will request to get articles * ATTN: Old installations used wiki.phtml and redirect.phtml - * make sure that LocalSettings.php is correctly set! - * @deprecated - */ -/** - * @global string $wgScript - */ -$wgScript = "{$wgScriptPath}/index.php"; -/** - * @global string $wgRedirectScript + * + * Will be set based on $wgScriptPath in Setup.php if not overridden + * in LocalSettings.php. Generally you should not need to change this + * unless you don't like seeing "index.php". */ -$wgRedirectScript = "{$wgScriptPath}/redirect.php"; +$wgScript = false; /// defaults to "{$wgScriptPath}/index.php" +$wgRedirectScript = false; /// defaults to "{$wgScriptPath}/redirect.php" /**#@-*/ /**#@+ + * These various web and file path variables are set to their defaults + * in Setup.php if they are not explicitly set from LocalSettings.php. + * If you do override them, be sure to set them all! + * + * These will relatively rarely need to be set manually, unless you are + * splitting style sheets or images outside the main document root. + * * @global string */ /** * style path as seen by users - * @global string $wgStylePath */ -$wgStylePath = "{$wgScriptPath}/skins"; +$wgStylePath = false; /// defaults to "{$wgScriptPath}/skins" /** * filesystem stylesheets directory - * @global string $wgStyleDirectory */ -$wgStyleDirectory = "{$IP}/skins"; +$wgStyleDirectory = false; /// defaults to "{$IP}/skins" $wgStyleSheetPath = &$wgStylePath; -$wgArticlePath = "{$wgScript}?title=$1"; -$wgUploadPath = "{$wgScriptPath}/images"; -$wgUploadDirectory = "{$IP}/images"; +$wgArticlePath = false; /// default to "{$wgScript}/$1" or "{$wgScript}?title=$1", depending on $wgUsePathInfo +$wgVariantArticlePath = false; +$wgUploadPath = false; /// defaults to "{$wgScriptPath}/images" +$wgUploadDirectory = false; /// defaults to "{$IP}/images" $wgHashedUploadDirectory = true; -$wgLogo = "{$wgUploadPath}/wiki.png"; +$wgLogo = false; /// defaults to "{$wgStylePath}/common/images/wiki.png" $wgFavicon = '/favicon.ico'; -$wgMathPath = "{$wgUploadPath}/math"; -$wgMathDirectory = "{$wgUploadDirectory}/math"; -$wgTmpDirectory = "{$wgUploadDirectory}/tmp"; +$wgMathPath = false; /// defaults to "{$wgUploadPath}/math" +$wgMathDirectory = false; /// defaults to "{$wgUploadDirectory}/math" +$wgTmpDirectory = false; /// defaults to "{$wgUploadDirectory}/tmp" $wgUploadBaseUrl = ""; /**#@-*/ @@ -290,20 +318,23 @@ $wgMimeInfoFile= "includes/mime.info"; #$wgMimeInfoFile= NULL; #use built-in defaults only. /** Switch for loading the FileInfo extension by PECL at runtime. -* This should be used only if fileinfo is installed as a shared object / dynamic libary -* @global string $wgLoadFileinfoExtension + * This should be used only if fileinfo is installed as a shared object + * or a dynamic libary + * @global string $wgLoadFileinfoExtension */ $wgLoadFileinfoExtension= false; -/** Sets an external mime detector program. The command must print only the mime type to standard output. -* the name of the file to process will be appended to the command given here. -* If not set or NULL, mime_content_type will be used if available. +/** Sets an external mime detector program. The command must print only + * the mime type to standard output. + * The name of the file to process will be appended to the command given here. + * If not set or NULL, mime_content_type will be used if available. */ $wgMimeDetectorCommand= NULL; # use internal mime_content_type function, available since php 4.3.0 #$wgMimeDetectorCommand= "file -bi"; #use external mime detector (Linux) -/** Switch for trivial mime detection. Used by thumb.php to disable all fance things, -* because only a few types of images are needed and file extensions can be trusted. +/** Switch for trivial mime detection. Used by thumb.php to disable all fance + * things, because only a few types of images are needed and file extensions + * can be trusted. */ $wgTrivialMimeDetection= false; @@ -423,6 +454,12 @@ $wgEnableEmail = true; */ $wgEnableUserEmail = true; +/** + * Minimum time, in hours, which must elapse between password reminder + * emails for a given account. This is to prevent abuse by mail flooding. + */ +$wgPasswordReminderResendTime = 24; + /** * SMTP Mode * For using a direct (authenticated) SMTP server connection. @@ -650,6 +687,15 @@ $wgMimeType = 'text/html'; $wgJsMimeType = 'text/javascript'; $wgDocType = '-//W3C//DTD XHTML 1.0 Transitional//EN'; $wgDTD = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'; +$wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml'; + +# Permit other namespaces in addition to the w3.org default. +# Use the prefix for the key and the namespace for the value. For +# example: +# $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg'; +# Normally we wouldn't have to define this in the root +# element, but IE needs it there in some circumstances. +$wgXhtmlNamespaces = array(); /** Enable to allow rewriting dates in page text. * DOES NOT FORMAT CORRECTLY FOR MOST LANGUAGES */ @@ -664,16 +710,29 @@ $wgAmericanDates = false; */ $wgTranslateNumerals = true; - -# Translation using MediaWiki: namespace -# This will increase load times by 25-60% unless memcached is installed -# Interface messages will be loaded from the database. +/** + * Translation using MediaWiki: namespace. + * This will increase load times by 25-60% unless memcached is installed. + * Interface messages will be loaded from the database. + */ $wgUseDatabaseMessages = true; + +/** + * Expiry time for the message cache key + */ $wgMsgCacheExpiry = 86400; +/** + * Maximum entry size in the message cache, in bytes + */ +$wgMaxMsgCacheEntrySize = 10000; + # Whether to enable language variant conversion. $wgDisableLangConversion = false; +# Default variant code, if false, the default will be the language code +$wgDefaultLanguageVariant = false; + /** * Show a bar of language selection links in the user login and user * registration forms; edit the "loginlanguagelinks" message to @@ -745,7 +804,12 @@ $wgMaxArticleSize = 2048; # Maximum article size in kilobytes $wgExtraSubtitle = ''; $wgSiteSupportPage = ''; # A page where you users can receive donations -$wgReadOnlyFile = "{$wgUploadDirectory}/lock_yBgMBwiR"; +/*** + * If this lock file exists, the wiki will be forced into read-only mode. + * Its contents will be shown to users as part of the read-only warning + * message. + */ +$wgReadOnlyFile = false; /// defaults to "{$wgUploadDirectory}/lock_yBgMBwiR"; /** * The debug log file should be not be publicly accessible if it is used, as it @@ -912,6 +976,7 @@ $wgGroupPermissions['emailconfirmed']['emailconfirmed'] = true; // from various log pages by default $wgGroupPermissions['bot' ]['bot'] = true; $wgGroupPermissions['bot' ]['autoconfirmed'] = true; +$wgGroupPermissions['bot' ]['nominornewtalk'] = true; // Most extra permission abilities go to this group $wgGroupPermissions['sysop']['block'] = true; @@ -923,6 +988,7 @@ $wgGroupPermissions['sysop']['import'] = true; $wgGroupPermissions['sysop']['importupload'] = true; $wgGroupPermissions['sysop']['move'] = true; $wgGroupPermissions['sysop']['patrol'] = true; +$wgGroupPermissions['sysop']['autopatrol'] = true; $wgGroupPermissions['sysop']['protect'] = true; $wgGroupPermissions['sysop']['proxyunbannable'] = true; $wgGroupPermissions['sysop']['rollback'] = true; @@ -933,6 +999,7 @@ $wgGroupPermissions['sysop']['reupload-shared'] = true; $wgGroupPermissions['sysop']['unwatchedpages'] = true; $wgGroupPermissions['sysop']['autoconfirmed'] = true; $wgGroupPermissions['sysop']['upload_by_url'] = true; +$wgGroupPermissions['sysop']['ipblock-exempt'] = true; // Permission to change users' group assignments $wgGroupPermissions['bureaucrat']['userrights'] = true; @@ -950,14 +1017,14 @@ $wgGroupPermissions['bureaucrat']['userrights'] = true; # $wgGroupPermissions['developer']['siteadmin'] = true; /** - * Set of available actions that can be restricted via Special:Protect + * Set of available actions that can be restricted via action=protect * You probably shouldn't change this. * Translated trough restriction-* messages. */ $wgRestrictionTypes = array( 'edit', 'move' ); /** - * Set of permission keys that can be selected via Special:Protect. + * Set of permission keys that can be selected via action=protect. * 'autoconfirm' allows all registerd users if $wgAutoConfirmAge is 0. */ $wgRestrictionLevels = array( '', 'autoconfirmed', 'sysop' ); @@ -996,7 +1063,7 @@ $wgBlockOpenProxies = false; /** Port we want to scan for a proxy */ $wgProxyPorts = array( 80, 81, 1080, 3128, 6588, 8000, 8080, 8888, 65506 ); /** Script used to scan */ -$wgProxyScriptPath = "$IP/proxy_check.php"; +$wgProxyScriptPath = "$IP/includes/proxy_check.php"; /** */ $wgProxyMemcExpiry = 86400; /** This should always be customised in LocalSettings.php */ @@ -1023,6 +1090,14 @@ $wgCachePages = true; */ $wgCacheEpoch = '20030516000000'; +/** + * Bump this number when changing the global style sheets and JavaScript. + * It should be appended in the query string of static CSS and JS includes, + * to ensure that client-side caches don't keep obsolete copies of global + * styles. + */ +$wgStyleVersion = '42'; + # Server-side caching: @@ -1032,8 +1107,9 @@ $wgCacheEpoch = '20030516000000'; * Must set $wgShowIPinHeader = false */ $wgUseFileCache = false; + /** Directory where the cached page will be saved */ -$wgFileCacheDirectory = "{$wgUploadDirectory}/cache"; +$wgFileCacheDirectory = false; /// defaults to "{$wgUploadDirectory}/cache"; /** * When using the file cache, we can store the cached HTML gzipped to save disk @@ -1069,11 +1145,20 @@ $wgEnotifRevealEditorAddress = false; # UPO; reply-to address may be filled with $wgEnotifMinorEdits = true; # UPO; false: "minor edits" on pages do not trigger notification mails. # # Attention: _every_ change on a user_talk page trigger a notification mail (if the user is not yet notified) - /** Show watching users in recent changes, watchlist and page history views */ $wgRCShowWatchingUsers = false; # UPO /** Show watching users in Page views */ $wgPageShowWatchingUsers = false; +/** Show the amount of changed characters in recent changes */ +$wgRCShowChangedSize = true; + +/** + * If the difference between the character counts of the text + * before and after the edit is below that value, the value will be + * highlighted on the RC page. + */ +$wgRCChangedSizeThreshold = -500; + /** * Show "Updated (since my last visit)" marker in RC view, watchlist and history * view for watched pages with new changes */ @@ -1124,6 +1209,7 @@ $wgMaxSquidPurgeTitles = 400; $wgHTCPPort = 4827; $wgHTCPMulticastTTL = 1; # $wgHTCPMulticastAddress = "224.0.0.85"; +$wgHTCPMulticastAddress = false; # Cookie settings: # @@ -1155,10 +1241,8 @@ $wgAllowExternalImagesFrom = ''; $wgMiserMode = false; /** Disable all query pages if miser mode is on, not just some */ $wgDisableQueryPages = false; -/** Generate a watchlist once every hour or so */ -$wgUseWatchlistCache = false; -/** The hour or so mentioned above */ -$wgWLCacheTimeout = 3600; +/** Number of rows to cache in 'querycache' table when miser mode is on */ +$wgQueryCacheLimit = 1000; /** Number of links to a page required before it is deemed "wanted" */ $wgWantedPagesThreshold = 1; /** Enable slow parser functions */ @@ -1425,7 +1509,7 @@ if( !isset( $wgCommandLineMode ) ) { # Recent changes settings # -/** Log IP addresses in the recentchanges table */ +/** Log IP addresses in the recentchanges table; can be accessed only by extensions (e.g. CheckUser) or a DB admin */ $wgPutIPinRC = true; /** @@ -1999,8 +2083,11 @@ $wgNoFollowLinks = true; $wgNoFollowNsExceptions = array(); /** - * Robot policies for namespaces - * e.g. $wgNamespaceRobotPolicies = array( NS_TALK => 'noindex' ); + * Robot policies per namespaces. + * The default policy is 'index,follow', the array is made of namespace + * constants as defined in includes/Defines.php + * Example: + * $wgNamespaceRobotPolicies = array( NS_TALK => 'noindex' ); */ $wgNamespaceRobotPolicies = array(); @@ -2043,6 +2130,7 @@ $wgDisableHardRedirects = false; * Use http.dnsbl.sorbs.net to check for open proxies */ $wgEnableSorbs = false; +$wgSorbsUrl = 'http.dnsbl.sorbs.net.'; /** * Proxy whitelist, list of addresses that are assumed to be non-proxy despite what the other @@ -2223,6 +2311,13 @@ $wgAjaxSearch = false; */ $wgAjaxExportList = array( ); +/** + * Enable watching/unwatching pages using AJAX. + * Requires $wgUseAjax to be true too. + * Causes wfAjaxWatch to be added to $wgAjaxExportList + */ +$wgAjaxWatch = false; + /** * Allow DISPLAYTITLE to change title display */ @@ -2232,7 +2327,12 @@ $wgAllowDisplayTitle = false ; * Array of usernames which may not be registered or logged in from * Maintenance scripts can still use these */ -$wgReservedUsernames = array( 'MediaWiki default', 'Conversion script' ); +$wgReservedUsernames = array( + 'MediaWiki default', // Default 'Main Page' and MediaWiki: message pages + 'Conversion script', // Used for the old Wikipedia software upgrade + 'Maintenance script', // ... maintenance/edit.php uses this? + 'Template namespace initialisation script', // Used in 1.2->1.3 upgrade +); /** * MediaWiki will reject HTMLesque tags in uploaded files due to idiotic browsers which can't @@ -2288,7 +2388,32 @@ $wgDjvuPostProcessor = 'ppmtojpeg'; * Enable direct access to the data API * through api.php */ -$wgEnableAPI = false; +$wgEnableAPI = true; $wgEnableWriteAPI = false; +/** + * Parser test suite files to be run by parserTests.php when no specific + * filename is passed to it. + * + * Extensions may add their own tests to this array, or site-local tests + * may be added via LocalSettings.php + * + * Use full paths. + */ +$wgParserTestFiles = array( + "$IP/maintenance/parserTests.txt", +); + +/** + * Break out of framesets. This can be used to prevent external sites from + * framing your site with ads. + */ +$wgBreakFrames = false; + +/** + * Set this to an array of special page names to prevent + * maintenance/updateSpecialPages.php from updating those pages. + */ +$wgDisableQueryPageUpdate = false; + ?> -- cgit v1.2.2