X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=blobdiff_plain;f=includes%2FDefaultSettings.php;h=971bb981064cd329cb0b5b3405f838bb9acad6a9;hb=206711db1b05f4ec1124c1b36b2aeb63d9498bec;hp=fd3a83dd7b5441a85f49b02f34f04b7429c95fe5;hpb=82bb4aaab6dd4611b5f04ee24a68a27e8e031873;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index fd3a83dd7b..971bb98106 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -16,7 +16,7 @@ if( defined( 'MEDIAWIKI' ) ) { /** MediaWiki version number */ -$wgVersion = '1.5pre-alpha'; +$wgVersion = '1.5alpha1'; /** Name of the site. It must be changed in LocalSettings.php */ $wgSitename = 'MediaWiki'; @@ -31,8 +31,11 @@ if( isset( $_SERVER['SERVER_NAME'] ) ) { $wgServerName = $_SERVER['SERVER_NAME']; } elseif( isset( $_SERVER['HOSTNAME'] ) ) { $wgServerName = $_SERVER['HOSTNAME']; +} elseif( isset( $_SERVER['HTTP_HOST'] ) ) { + $wgServerName = $_SERVER['HTTP_HOST']; +} elseif( isset( $_SERVER['SERVER_ADDR'] ) ) { + $wgServerName = $_SERVER['SERVER_ADDR']; } else { - # FIXME: Fall back on... something else? $wgServerName = 'localhost'; } @@ -40,7 +43,11 @@ if( isset( $_SERVER['SERVER_NAME'] ) ) { $wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http'; $wgServer = $wgProto.'://' . $wgServerName; -if( isset( $_SERVER['SERVER_PORT'] ) && $_SERVER['SERVER_PORT'] != 80 ) { +# If the port is a non-standard one, add it to the URL +if( isset( $_SERVER['SERVER_PORT'] ) + && ( ( $wgProto == 'http' && $_SERVER['SERVER_PORT'] != 80 ) + || ( $wgProto == 'https' && $_SERVER['SERVER_PORT'] != 443 ) ) ) { + $wgServer .= ":" . $_SERVER['SERVER_PORT']; } unset($wgProto); @@ -90,7 +97,6 @@ $wgStylePath = "{$wgScriptPath}/skins"; */ $wgStyleDirectory = "{$IP}/skins"; $wgStyleSheetPath = &$wgStylePath; -$wgStyleSheetDirectory = &$wgStyleDirectory; $wgArticlePath = "{$wgScript}?title=$1"; $wgUploadPath = "{$wgScriptPath}/upload"; $wgUploadDirectory = "{$IP}/upload"; @@ -102,6 +108,11 @@ $wgTmpDirectory = "{$wgUploadDirectory}/tmp"; $wgUploadBaseUrl = ""; /**#@-*/ +/** + * Produce hashed HTML article paths. Used internally, do not set. + */ +$wgMakeDumpLinks = false; + /** * To set 'pretty' URL paths for actions other than * plain page views, add to this array. For instance: @@ -124,10 +135,31 @@ $wgActionPaths = array(); $wgUseSharedUploads = false; /** Full path on the web server where shared uploads can be found */ $wgSharedUploadPath = "http://commons.wikimedia.org/shared/images"; -/** Path on the file system where shared uploads can be found */ +/** Path on the file system where shared uploads can be found. */ $wgSharedUploadDirectory = "/var/www/wiki3/images"; -/** Path on the file system where shared uploads can be found */ -$wgSharedUploadDBname = "commons"; +/** DB name with metadata about shared directory. Set this to false if the uploads do not come from a wiki. */ +$wgSharedUploadDBname = false; +/** Cache shared metadata in memcached. Don't do this if the commons wiki is in a different memcached domain */ +$wgCacheSharedUploads = true; + +/** + * Point the upload navigation link to an external URL + * Useful if you want to use a shared repository by default + * without disabling local uploads + * e.g. $wgUploadNavigationUrl = 'http://commons.wikimedia.org/wiki/Special:Upload'; +*/ +$wgUploadNavigationUrl = false; + +/** + * Give a path here to use thumb.php for thumbnail generation on client request, instead of + * generating them on render and outputting a static URL. This is necessary if some of your + * apache servers don't have read/write access to the thumbnail path. + * + * Example: + * $wgThumbnailScriptPath = "{$wgScriptPath}/thumb.php"; + */ +$wgThumbnailScriptPath = false; +$wgSharedThumbnailScriptPath = false; /** * Set the following to false especially if you have a set of files that need to @@ -136,9 +168,6 @@ $wgSharedUploadDBname = "commons"; */ $wgHashedSharedUploadDirectory = true; -/** set true if the repository uses latin1 filenames */ -$wgSharedLatin1=false; - /** * Base URL for a repository wiki. Leave this blank if uploads are just stored * in a shared directory and not meant to be accessible through a separate wiki. @@ -252,18 +281,21 @@ $wgSharedDB = null; # Database load balancer # This is a two-dimensional array, an array of server info structures # Fields are: -# host: Host name -# dbname: Default database name -# user: DB user -# password: DB password -# type: "mysql" or "pgsql" -# load: ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0 -# flags: bit field -# DBO_DEFAULT -- turns on DBO_TRX only if !$wgCommandLineMode (recommended) -# DBO_DEBUG -- equivalent of $wgDebugDumpSql -# DBO_TRX -- wrap entire request in a transaction -# DBO_IGNORE -- ignore errors (not useful in LocalSettings.php) -# DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php) +# host: Host name +# dbname: Default database name +# user: DB user +# password: DB password +# type: "mysql" or "pgsql" +# load: ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0 +# groupLoads: array of load ratios, the key is the query group name. A query may belong +# to several groups, the most specific group defined here is used. +# +# flags: bit field +# DBO_DEFAULT -- turns on DBO_TRX only if !$wgCommandLineMode (recommended) +# DBO_DEBUG -- equivalent of $wgDebugDumpSql +# DBO_TRX -- wrap entire request in a transaction +# DBO_IGNORE -- ignore errors (not useful in LocalSettings.php) +# DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php) # # Leave at false to use the single-server variables above $wgDBservers = false; @@ -286,7 +318,6 @@ $wgDBminWordLen = 4; $wgDBtransactions = false; /** Set to true to use enhanced fulltext search */ $wgDBmysql4 = false; -$wgSqlTimeout = 30; /** * Other wikis on this site, can be administered from a single developer @@ -295,45 +326,30 @@ $wgSqlTimeout = 30; */ $wgLocalDatabases = array(); +/** + * Object cache settings + * See Defines.php for types + */ +$wgMainCacheType = CACHE_NONE; +$wgMessageCacheType = CACHE_ANYTHING; +$wgParserCacheType = CACHE_ANYTHING; -# Memcached settings -# See docs/memcached.doc -# -$wgMemCachedDebug = false; # Will be set to false in Setup.php, if the server isn't working -$wgUseMemCached = false; -$wgMemCachedServers = array( '127.0.0.1:11000' ); -$wgMemCachedDebug = false; $wgSessionsInMemcached = false; $wgLinkCacheMemcached = false; # Not fully tested /** - * Turck MMCache shared memory - * You can use this for persistent caching where your wiki runs on a single - * server. Enabled by default if Turck is installed. Mutually exclusive with - * memcached and eAccelerator, the preference order priorities being memcached first, - * Turck MMCache second, and eAccelerator third. - * - * @global bool $wgUseTurckShm Enable or disabled Turck MMCache + * Memcached-specific settings + * See docs/memcached.txt */ -$wgUseTurckShm = false; +$wgMemCachedDebug = false; # Will be set to false in Setup.php, if the server isn't working +$wgMemCachedServers = array( '127.0.0.1:11000' ); +$wgMemCachedDebug = false; -/** - * eAccelerator shared memory - * You can use this for persistent caching where your wiki runs on a single - * server. Enabled by default if eAccelerator is installed. Mutually exclusive with - * memcached and Turck MMCache, the preference order being memcached first, - * Turck MMCache second, and eAccelerator third. - * - * Most of the code to support this is directly copied from the Turck code. - * - * @global bool $wgUseEAccelShm Enable or disabled eAccelerator - */ -$wgUseEAccelShm = false; # Language settings # -/** Site language code, should be one of ./language/Language(.*).php */ +/** Site language code, should be one of ./languages/Language(.*).php */ $wgLanguageCode = 'en'; /** Filename of a language file generated by dumpMessages.php */ @@ -342,12 +358,9 @@ $wgLanguageFile = false; /** Treat language links as magic connectors, not inline links */ $wgInterwikiMagic = true; -/** LanguageUtf8.php normally overrides this */ -$wgInputEncoding = 'ISO-8859-1'; -/** unless you set the next option to true: */ -$wgOutputEncoding = 'ISO-8859-1'; -/** Enable ISO-8859-1 compatibility mode */ -$wgUseLatin1 = false; +/** We speak UTF-8 all the time now, unless some oddities happen */ +$wgInputEncoding = 'UTF-8'; +$wgOutputEncoding = 'UTF-8'; $wgEditEncoding = ''; # Set this to eg 'ISO-8859-1' to perform character set @@ -367,7 +380,9 @@ $wgDTD = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'; /** Enable to allow rewriting dates in page text. * DOES NOT FORMAT CORRECTLY FOR MOST LANGUAGES */ $wgUseDynamicDates = false; -/** Enable for English module to print dates as eg 'May 12' instead of '12 May' */ +/** Enable dates like 'May 12' instead of '12 May', this only takes effect if + * the interface is set to English + */ $wgAmericanDates = false; /** * For Hindi and Arabic use local numerals instead of Western style (0-9) @@ -389,6 +404,9 @@ $wgPartialMessageCache = false; # code, so that if it breaks, only zh will be affected $wgDisableLangConversion = false; +# Use article validation feature; turned off by default +$wgUseValidation = false; + # Whether to use zhdaemon to perform Chinese text processing # zhdaemon is under developement, so normally you don't want to # use it unless for testing @@ -474,6 +492,18 @@ $wgUseOldExistenceCheck = false; # use old prefill link method, for debugging o */ $wgEnableParserCache = true; +/** + * Under which condition should a page in the main namespace be counted + * as a valid article? If $wgUseCommaCount is set to true, it will be + * counted if it contains at least one comma. If it is set to false + * (default), it will only be counted if it contains at least one [[wiki + * link]]. See http://meta.wikimedia.org/wiki/Help:Article_count + * + * Retroactively changing this variable will not affect + * the existing count (cf. maintenance/recount.sql). +*/ +$wgUseCommaCount = false; + /**#@-*/ /** @@ -496,8 +526,8 @@ $wgWhitelistAccount = array ( 'user' => 1, 'sysop' => 1, 'developer' => 1 ); $wgAllowAnonymousMinor = false; # Allow anonymous users to mark changes as 'minor' -$wgSysopUserBans = false; # Allow sysops to ban logged-in users -$wgSysopRangeBans = false; # Allow sysops to ban IP ranges +$wgSysopUserBans = true; # Allow sysops to ban logged-in users +$wgSysopRangeBans = true; # Allow sysops to ban IP ranges /** Comma-separated list of options to show on the IP block form. * Use strtotime() format, or "infinite" for an infinite block @@ -506,6 +536,14 @@ $wgBlockExpiryOptions = "2 hours,1 day,3 days,1 week,2 weeks,1 month,3 months,6 $wgAutoblockExpiry = 86400; # Number of seconds before autoblock entries expire +/** + * Static user groups serialized record + * To avoid database access, you can set this to a user groups record as returned + * by Special:Groups with the magic parameter showrecord=1. This will however mean + * that you won't be able to edit them at runtime. + */ +$wgStaticGroups = false; + # Proxy scanner settings # @@ -529,6 +567,8 @@ $wgProxyMemcExpiry = 86400; $wgSecretKey = false; /** big list of banned IP addresses, in the keys not the values */ $wgProxyList = array(); +/** deprecated */ +$wgProxyKey = false; /** Number of accounts each IP address may create, 0 to disable. * Requires memcached */ @@ -640,6 +680,10 @@ $wgSquidServersNoPurge = array(); /** Maximum number of titles to purge in any one client operation */ $wgMaxSquidPurgeTitles = 400; +/** HTCP multicast purging */ +$wgHTCPPort = 4827; +$wgHTCPMulticastTTL = 1; +# $wgHTCPMulticastAddress = "224.0.0.85"; # Cookie settings: # @@ -705,7 +749,13 @@ $wgDisableTextSearch = false; */ $wgDisableSearchUpdate = false; /** Uploads have to be specially set up to be secure */ -$wgDisableUploads = true; +$wgEnableUploads = false; +/** + * Show EXIF data, on by default if available. + * Requires PHP's EXIF extension: http://www.php.net/manual/en/ref.exif.php + */ +$wgShowEXIF = function_exists( 'exif_read_data' ); + /** * Set to true to enable the upload _link_ while local uploads are disabled. * Assumes that the special page link will be bounced to another server where @@ -755,7 +805,7 @@ $wgCheckFileExtensions = true; $wgStrictFileExtensions = true; /** Warn if uploaded files are larger than this */ -$wgUploadSizeWarning = 150000; +$wgUploadSizeWarning = 150 * 1024; /** For compatibility with old installations set to false */ $wgPasswordSalt = true; @@ -763,11 +813,45 @@ $wgPasswordSalt = true; /** Which namespaces should support subpages? * See Language.php for a list of namespaces. */ -$wgNamespacesWithSubpages = array( -1 => 0, 0 => 0, 1 => 1, - 2 => 1, 3 => 1, 4 => 0, 5 => 1, 6 => 0, 7 => 1, 8 => 0, 9 => 1, 10 => 0, 11 => 1); - -$wgNamespacesToBeSearchedDefault = array( -1 => 0, 0 => 1, 1 => 0, - 2 => 0, 3 => 0, 4 => 0, 5 => 0, 6 => 0, 7 => 0, 8 => 0, 9 => 1, 10 => 0, 11 => 1 ); +$wgNamespacesWithSubpages = array( + NS_SPECIAL => 0, + NS_MAIN => 0, + NS_TALK => 1, + NS_USER => 1, + NS_USER_TALK => 1, + NS_PROJECT => 0, + NS_PROJECT_TALK => 1, + NS_IMAGE => 0, + NS_IMAGE_TALK => 1, + NS_MEDIAWIKI => 0, + NS_MEDIAWIKI_TALK => 1, + NS_TEMPLATE => 0, + NS_TEMPLATE_TALK => 1, + NS_HELP => 0, + NS_HELP_TALK => 1, + NS_CATEGORY => 0, + NS_CATEGORY_TALK => 1 + ); + +$wgNamespacesToBeSearchedDefault = array( + NS_SPECIAL => 0, + NS_MAIN => 1, + NS_TALK => 0, + NS_USER => 0, + NS_USER_TALK => 0, + NS_PROJECT => 0, + NS_PROJECT_TALK => 0, + NS_IMAGE => 0, + NS_IMAGE_TALK => 0, + NS_MEDIAWIKI => 0, + NS_MEDIAWIKI_TALK => 1, + NS_TEMPLATE => 1, + NS_TEMPLATE_TALK => 1, + NS_HELP => 0, + NS_HELP_TALK => 0, + NS_CATEGORY => 0, + NS_CATEGORY_TALK => 0 +); /** If set, a bold ugly notice will show up at the top of every page. */ $wgSiteNotice = ''; @@ -918,13 +1002,20 @@ $wgRawHtml = false; * $wgTidyBin should be set to the path of the binary and * $wgTidyConf to the path of the configuration file. * $wgTidyOpts can include any number of parameters. + * + * $wgTidyInternal controls the use of the PECL extension to use an in- + * process tidy library instead of spawning a separate program. + * Normally you shouldn't need to override the setting except for + * debugging. To install, use 'pear install tidy' and add a line + * 'extension=tidy.so' to php.ini. */ $wgUseTidy = false; $wgTidyBin = 'tidy'; $wgTidyConf = $IP.'/extensions/tidy/tidy.conf'; $wgTidyOpts = ''; +$wgTidyInternal = function_exists( 'tidy_load_config' ); -/** See list of skins and their symbolic names in languagel/Language.php */ +/** See list of skins and their symbolic names in languages/Language.php */ $wgDefaultSkin = 'monobook'; /** @@ -1004,8 +1095,8 @@ $wgFeedDiffCutoff = 32768; * no longer be accessible. If you rename it, then you can access them through * the new namespace name. * - * Custom namespaces should start at 100 and stop at 255 (hard limit set by - * database). + * Custom namespaces should start at 100 to avoid conflicting with standard + * namespaces, and should always follow the even/odd main/talk pattern. */ #$wgExtraNamespaces = # array(100 => "Hilfe", @@ -1015,16 +1106,6 @@ $wgFeedDiffCutoff = 32768; # ); $wgExtraNamespaces = NULL; -/** - * Enable SOAP interface. Off by default - * SOAP is a protocoll for remote procedure calls (RPC) using http as - * middleware. This interface can be used by bots or special clients to receive - * articles from a wiki. - * Most bots use the normal HTTP interface and don't use SOAP. - * If unsure, set to false. - */ -$wgEnableSOAP = false; - /** * Limit images on image description pages to a user-selectable limit. In order * to reduce disk usage, limits can only be selected from a list. This is the @@ -1038,6 +1119,19 @@ $wgImageLimits = array ( array(1280,1024), array(10000,10000) ); +/** + * Adjust thumbnails on image pages according to a user setting. In order to + * reduce disk usage, the values can only be selected from a list. This is the + * list of settings the user can choose from: + */ +$wgThumbLimits = array( + 120, + 150, + 180, + 200, + 250, + 300 +); /** Navigation links for the user sidebar. * 'text' is the name of the MediaWiki message that contains the label of this link @@ -1066,9 +1160,21 @@ $wgCategoryMagicGallery = true; * Contains a list of regexps : "/regexp/" matching problematic browsers */ $wgBrowserBlackList = array( - "/Mozilla\/4\.78 \[en\] \(X11; U; Linux/" - // FIXME: Add some accurate, true things here - ); + "/Mozilla\/4\.78 \[en\] \(X11; U; Linux/", + /** + * MSIE on Mac OS 9 is teh sux0r, converts þ to , ð to , Þ to and Ð to + * + * Known useragents: + * - Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) + * - Mozilla/4.0 (compatible; MSIE 5.15; Mac_PowerPC) + * - Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC) + * - [...] + * + * @link http://en.wikipedia.org/w/index.php?title=User%3A%C6var_Arnfj%F6r%F0_Bjarmason%2Ftestme&diff=12356041&oldid=12355864 + * @link http://en.wikipedia.org/wiki/Template%3AOS9 + */ + "/Mozilla\/4\.0 \(compatible; MSIE \d+\.\d+; Mac_PowerPC\)/" +); /** * Fake out the timezone that the server thinks it's in. This will be used for @@ -1090,6 +1196,7 @@ $wgAnonGroupId = 1; $wgLoggedInGroupId = 2; $wgSysopGroupId = 3; $wgBureaucratGroupId = 4; +$wgStewardGroupId = 5; /** * When translating messages with wfMsg(), it is not always clear what should be @@ -1166,6 +1273,43 @@ $wgNoFollowLinks = true; */ $wgMinimalPasswordLength = 0; +/** + * Activate external editor interface for files and pages + * See http://meta.wikimedia.org/wiki/Help:External_editors + */ +$wgUseExternalEditor = true; + +/** Whether or not to sort special pages in Special:Specialpages */ + +$wgSortSpecialPages = true; + +/** + * Array of disabled article actions, e.g. view, edit, dublincore, delete, etc. + */ +$wgDisabledActions = array(); + +/** + * Use http.dnsbl.sorbs.net to check for open proxies + */ +$wgEnableSorbs = false; + +/** + * On Special:Unusedimages, consider images "used", if they are put + * into a category. Default (false) is not to count those as used. + */ +$wgCountCategorizedImagesAsUsed = false; + +/** + * External stores allow including content + * from non database sources following URL links + * + * Short names of ExternalStore classes may be specified in an array here: + * $wgExternalStores = array("http","file","custom")... + * + * CAUTION: Access to database might lead to code execution + */ +$wgExternalStores = false; + } else { die(); }