PageRenderTime 81ms CodeModel.GetById 25ms RepoModel.GetById 1ms app.codeStats 0ms

/includes/DefaultSettings.php

https://bitbucket.org/ghostfreeman/freeside-wiki
PHP | 6229 lines | 3635 code | 342 blank | 2252 comment | 1 complexity | 89594001d152ccab661228ff148970c3 MD5 | raw file
Possible License(s): GPL-2.0, Apache-2.0, LGPL-3.0
  1. <?php
  2. /**
  3. * Default values for MediaWiki configuration settings.
  4. *
  5. *
  6. * NEVER EDIT THIS FILE
  7. *
  8. *
  9. * To customize your installation, edit "LocalSettings.php". If you make
  10. * changes here, they will be lost on next upgrade of MediaWiki!
  11. *
  12. * In this file, variables whose default values depend on other
  13. * variables are set to false. The actual default value of these variables
  14. * will only be set in Setup.php, taking into account any custom settings
  15. * performed in LocalSettings.php.
  16. *
  17. * Documentation is in the source and on:
  18. * http://www.mediawiki.org/wiki/Manual:Configuration_settings
  19. *
  20. * @warning Note: this (and other things) will break if the autoloader is not
  21. * enabled. Please include includes/AutoLoader.php before including this file.
  22. *
  23. * This program is free software; you can redistribute it and/or modify
  24. * it under the terms of the GNU General Public License as published by
  25. * the Free Software Foundation; either version 2 of the License, or
  26. * (at your option) any later version.
  27. *
  28. * This program is distributed in the hope that it will be useful,
  29. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  30. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  31. * GNU General Public License for more details.
  32. *
  33. * You should have received a copy of the GNU General Public License along
  34. * with this program; if not, write to the Free Software Foundation, Inc.,
  35. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  36. * http://www.gnu.org/copyleft/gpl.html
  37. *
  38. * @file
  39. */
  40. /**
  41. * @defgroup Globalsettings Global settings
  42. */
  43. /**
  44. * @cond file_level_code
  45. * This is not a valid entry point, perform no further processing unless
  46. * MEDIAWIKI is defined
  47. */
  48. if( !defined( 'MEDIAWIKI' ) ) {
  49. echo "This file is part of MediaWiki and is not a valid entry point\n";
  50. die( 1 );
  51. }
  52. /**
  53. * wgConf hold the site configuration.
  54. * Not used for much in a default install.
  55. */
  56. $wgConf = new SiteConfiguration;
  57. /** MediaWiki version number */
  58. $wgVersion = '1.20.0';
  59. /** Name of the site. It must be changed in LocalSettings.php */
  60. $wgSitename = 'MediaWiki';
  61. /**
  62. * URL of the server.
  63. *
  64. * @par Example:
  65. * @code
  66. * $wgServer = 'http://example.com';
  67. * @endcode
  68. *
  69. * This is usually detected correctly by MediaWiki. If MediaWiki detects the
  70. * wrong server, it will redirect incorrectly after you save a page. In that
  71. * case, set this variable to fix it.
  72. *
  73. * If you want to use protocol-relative URLs on your wiki, set this to a
  74. * protocol-relative URL like '//example.com' and set $wgCanonicalServer
  75. * to a fully qualified URL.
  76. */
  77. $wgServer = WebRequest::detectServer();
  78. /**
  79. * Canonical URL of the server, to use in IRC feeds and notification e-mails.
  80. * Must be fully qualified, even if $wgServer is protocol-relative.
  81. *
  82. * Defaults to $wgServer, expanded to a fully qualified http:// URL if needed.
  83. */
  84. $wgCanonicalServer = false;
  85. /************************************************************************//**
  86. * @name Script path settings
  87. * @{
  88. */
  89. /**
  90. * The path we should point to.
  91. * It might be a virtual path in case with use apache mod_rewrite for example.
  92. *
  93. * This *needs* to be set correctly.
  94. *
  95. * Other paths will be set to defaults based on it unless they are directly
  96. * set in LocalSettings.php
  97. */
  98. $wgScriptPath = '/wiki';
  99. /**
  100. * Whether to support URLs like index.php/Page_title These often break when PHP
  101. * is set up in CGI mode. PATH_INFO *may* be correct if cgi.fix_pathinfo is set,
  102. * but then again it may not; lighttpd converts incoming path data to lowercase
  103. * on systems with case-insensitive filesystems, and there have been reports of
  104. * problems on Apache as well.
  105. *
  106. * To be safe we'll continue to keep it off by default.
  107. *
  108. * Override this to false if $_SERVER['PATH_INFO'] contains unexpectedly
  109. * incorrect garbage, or to true if it is really correct.
  110. *
  111. * The default $wgArticlePath will be set based on this value at runtime, but if
  112. * you have customized it, having this incorrectly set to true can cause
  113. * redirect loops when "pretty URLs" are used.
  114. */
  115. $wgUsePathInfo =
  116. ( strpos( php_sapi_name(), 'cgi' ) === false ) &&
  117. ( strpos( php_sapi_name(), 'apache2filter' ) === false ) &&
  118. ( strpos( php_sapi_name(), 'isapi' ) === false );
  119. /**
  120. * The extension to append to script names by default. This can either be .php
  121. * or .php5.
  122. *
  123. * Some hosting providers use PHP 4 for *.php files, and PHP 5 for *.php5. This
  124. * variable is provided to support those providers.
  125. */
  126. $wgScriptExtension = '.php';
  127. /**@}*/
  128. /************************************************************************//**
  129. * @name URLs and file paths
  130. *
  131. * These various web and file path variables are set to their defaults
  132. * in Setup.php if they are not explicitly set from LocalSettings.php.
  133. *
  134. * These will relatively rarely need to be set manually, unless you are
  135. * splitting style sheets or images outside the main document root.
  136. *
  137. * In this section, a "path" is usually a host-relative URL, i.e. a URL without
  138. * the host part, that starts with a slash. In most cases a full URL is also
  139. * acceptable. A "directory" is a local file path.
  140. *
  141. * In both paths and directories, trailing slashes should not be included.
  142. *
  143. * @{
  144. */
  145. /**
  146. * The URL path to index.php.
  147. *
  148. * Defaults to "{$wgScriptPath}/index{$wgScriptExtension}".
  149. */
  150. $wgScript = false;
  151. /**
  152. * The URL path to redirect.php. This is a script that is used by the Nostalgia
  153. * skin.
  154. *
  155. * Defaults to "{$wgScriptPath}/redirect{$wgScriptExtension}".
  156. */
  157. $wgRedirectScript = false;
  158. /**
  159. * The URL path to load.php.
  160. *
  161. * Defaults to "{$wgScriptPath}/load{$wgScriptExtension}".
  162. */
  163. $wgLoadScript = false;
  164. /**
  165. * The URL path of the skins directory.
  166. * Defaults to "{$wgScriptPath}/skins".
  167. */
  168. $wgStylePath = false;
  169. $wgStyleSheetPath = &$wgStylePath;
  170. /**
  171. * The URL path of the skins directory. Should not point to an external domain.
  172. * Defaults to "{$wgScriptPath}/skins".
  173. */
  174. $wgLocalStylePath = false;
  175. /**
  176. * The URL path of the extensions directory.
  177. * Defaults to "{$wgScriptPath}/extensions".
  178. * @since 1.16
  179. */
  180. $wgExtensionAssetsPath = false;
  181. /**
  182. * Filesystem stylesheets directory.
  183. * Defaults to "{$IP}/skins".
  184. */
  185. $wgStyleDirectory = false;
  186. /**
  187. * The URL path for primary article page views. This path should contain $1,
  188. * which is replaced by the article title.
  189. *
  190. * Defaults to "{$wgScript}/$1" or "{$wgScript}?title=$1",
  191. * depending on $wgUsePathInfo.
  192. */
  193. $wgArticlePath = false;
  194. /**
  195. * The URL path for the images directory.
  196. * Defaults to "{$wgScriptPath}/images".
  197. */
  198. $wgUploadPath = false;
  199. /**
  200. * The filesystem path of the images directory. Defaults to "{$IP}/images".
  201. */
  202. $wgUploadDirectory = false;
  203. /**
  204. * Directory where the cached page will be saved.
  205. * Defaults to "{$wgUploadDirectory}/cache".
  206. */
  207. $wgFileCacheDirectory = false;
  208. /**
  209. * The URL path of the wiki logo. The logo size should be 135x135 pixels.
  210. * Defaults to "{$wgStylePath}/common/images/wiki.png".
  211. */
  212. $wgLogo = false;
  213. /**
  214. * The URL path of the shortcut icon.
  215. */
  216. $wgFavicon = '/favicon.ico';
  217. /**
  218. * The URL path of the icon for iPhone and iPod Touch web app bookmarks.
  219. * Defaults to no icon.
  220. */
  221. $wgAppleTouchIcon = false;
  222. /**
  223. * The local filesystem path to a temporary directory. This is not required to
  224. * be web accessible.
  225. *
  226. * When this setting is set to false, its value will be set through a call
  227. * to wfTempDir(). See that methods implementation for the actual detection
  228. * logic.
  229. *
  230. * Developers should use the global function wfTempDir() instead of this
  231. * variable.
  232. *
  233. * @see wfTempDir()
  234. * @note Default changed to false in MediaWiki 1.20.
  235. *
  236. */
  237. $wgTmpDirectory = false;
  238. /**
  239. * If set, this URL is added to the start of $wgUploadPath to form a complete
  240. * upload URL.
  241. */
  242. $wgUploadBaseUrl = '';
  243. /**
  244. * To enable remote on-demand scaling, set this to the thumbnail base URL.
  245. * Full thumbnail URL will be like $wgUploadStashScalerBaseUrl/e/e6/Foo.jpg/123px-Foo.jpg
  246. * where 'e6' are the first two characters of the MD5 hash of the file name.
  247. * If $wgUploadStashScalerBaseUrl is set to false, thumbs are rendered locally as needed.
  248. */
  249. $wgUploadStashScalerBaseUrl = false;
  250. /**
  251. * To set 'pretty' URL paths for actions other than
  252. * plain page views, add to this array.
  253. *
  254. * @par Example:
  255. * Set pretty URL for the edit action:
  256. * @code
  257. * 'edit' => "$wgScriptPath/edit/$1"
  258. * @endcode
  259. *
  260. * There must be an appropriate script or rewrite rule in place to handle these
  261. * URLs.
  262. */
  263. $wgActionPaths = array();
  264. /**@}*/
  265. /************************************************************************//**
  266. * @name Files and file uploads
  267. * @{
  268. */
  269. /** Uploads have to be specially set up to be secure */
  270. $wgEnableUploads = false;
  271. /**
  272. * The maximum age of temporary (incomplete) uploaded files
  273. */
  274. $wgUploadStashMaxAge = 6 * 3600; // 6 hours
  275. /** Allows to move images and other media files */
  276. $wgAllowImageMoving = true;
  277. /**
  278. * These are additional characters that should be replaced with '-' in filenames
  279. */
  280. $wgIllegalFileChars = ":";
  281. /**
  282. * @deprecated since 1.17 use $wgDeletedDirectory
  283. */
  284. $wgFileStore = array();
  285. /**
  286. * What directory to place deleted uploads in.
  287. * Defaults to "{$wgUploadDirectory}/deleted".
  288. */
  289. $wgDeletedDirectory = false;
  290. /**
  291. * Set this to true if you use img_auth and want the user to see details on why access failed.
  292. */
  293. $wgImgAuthDetails = false;
  294. /**
  295. * If this is enabled, img_auth.php will not allow image access unless the wiki
  296. * is private. This improves security when image uploads are hosted on a
  297. * separate domain.
  298. */
  299. $wgImgAuthPublicTest = true;
  300. /**
  301. * File repository structures
  302. *
  303. * $wgLocalFileRepo is a single repository structure, and $wgForeignFileRepos is
  304. * an array of such structures. Each repository structure is an associative
  305. * array of properties configuring the repository.
  306. *
  307. * Properties required for all repos:
  308. * - class The class name for the repository. May come from the core or an extension.
  309. * The core repository classes are FileRepo, LocalRepo, ForeignDBRepo.
  310. * FSRepo is also supported for backwards compatibility.
  311. *
  312. * - name A unique name for the repository (but $wgLocalFileRepo should be 'local').
  313. * The name should consist of alpha-numberic characters.
  314. * - backend A file backend name (see $wgFileBackends).
  315. *
  316. * For most core repos:
  317. * - zones Associative array of zone names that each map to an array with:
  318. * container : backend container name the zone is in
  319. * directory : root path within container for the zone
  320. * url : base URL to the root of the zone
  321. * handlerUrl : base script handled URL to the root of the zone
  322. * (see FileRepo::getZoneHandlerUrl() function)
  323. * Zones default to using "<repo name>-<zone name>" as the container name
  324. * and default to using the container root as the zone's root directory.
  325. * Nesting of zone locations within other zones should be avoided.
  326. * - url Public zone URL. The 'zones' settings take precedence.
  327. * - hashLevels The number of directory levels for hash-based division of files
  328. * - thumbScriptUrl The URL for thumb.php (optional, not recommended)
  329. * - transformVia404 Whether to skip media file transformation on parse and rely on a 404
  330. * handler instead.
  331. * - initialCapital Equivalent to $wgCapitalLinks (or $wgCapitalLinkOverrides[NS_FILE],
  332. * determines whether filenames implicitly start with a capital letter.
  333. * The current implementation may give incorrect description page links
  334. * when the local $wgCapitalLinks and initialCapital are mismatched.
  335. * - pathDisclosureProtection
  336. * May be 'paranoid' to remove all parameters from error messages, 'none' to
  337. * leave the paths in unchanged, or 'simple' to replace paths with
  338. * placeholders. Default for LocalRepo is 'simple'.
  339. * - fileMode This allows wikis to set the file mode when uploading/moving files. Default
  340. * is 0644.
  341. * - directory The local filesystem directory where public files are stored. Not used for
  342. * some remote repos.
  343. * - thumbDir The base thumbnail directory. Defaults to "<directory>/thumb".
  344. * - thumbUrl The base thumbnail URL. Defaults to "<url>/thumb".
  345. * - isPrivate Set this if measures should always be taken to keep the files private.
  346. * One should not trust this to assure that the files are not web readable;
  347. * the server configuration should be done manually depending on the backend.
  348. *
  349. * These settings describe a foreign MediaWiki installation. They are optional, and will be ignored
  350. * for local repositories:
  351. * - descBaseUrl URL of image description pages, e.g. http://en.wikipedia.org/wiki/File:
  352. * - scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
  353. * http://en.wikipedia.org/w
  354. * - scriptExtension Script extension of the MediaWiki installation, equivalent to
  355. * $wgScriptExtension, e.g. .php5 defaults to .php
  356. *
  357. * - articleUrl Equivalent to $wgArticlePath, e.g. http://en.wikipedia.org/wiki/$1
  358. * - fetchDescription Fetch the text of the remote file description page. Equivalent to
  359. * $wgFetchCommonsDescriptions.
  360. * - abbrvThreshold File names over this size will use the short form of thumbnail names.
  361. * Short thumbnail names only have the width, parameters, and the extension.
  362. *
  363. * ForeignDBRepo:
  364. * - dbType, dbServer, dbUser, dbPassword, dbName, dbFlags
  365. * equivalent to the corresponding member of $wgDBservers
  366. * - tablePrefix Table prefix, the foreign wiki's $wgDBprefix
  367. * - hasSharedCache True if the wiki's shared cache is accessible via the local $wgMemc
  368. *
  369. * ForeignAPIRepo:
  370. * - apibase Use for the foreign API's URL
  371. * - apiThumbCacheExpiry How long to locally cache thumbs for
  372. *
  373. * If you leave $wgLocalFileRepo set to false, Setup will fill in appropriate values.
  374. * Otherwise, set $wgLocalFileRepo to a repository structure as described above.
  375. * If you set $wgUseInstantCommons to true, it will add an entry for Commons.
  376. * If you set $wgForeignFileRepos to an array of repostory structures, those will
  377. * be searched after the local file repo.
  378. * Otherwise, you will only have access to local media files.
  379. *
  380. * @see Setup.php for an example usage and default initialization.
  381. */
  382. $wgLocalFileRepo = false;
  383. /** @see $wgLocalFileRepo */
  384. $wgForeignFileRepos = array();
  385. /**
  386. * Use Commons as a remote file repository. Essentially a wrapper, when this
  387. * is enabled $wgForeignFileRepos will point at Commons with a set of default
  388. * settings
  389. */
  390. $wgUseInstantCommons = false;
  391. /**
  392. * File backend structure configuration.
  393. * This is an array of file backend configuration arrays.
  394. * Each backend configuration has the following parameters:
  395. * - 'name' : A unique name for the backend
  396. * - 'class' : The file backend class to use
  397. * - 'wikiId' : A unique string that identifies the wiki (container prefix)
  398. * - 'lockManager' : The name of a lock manager (see $wgLockManagers)
  399. *
  400. * Additional parameters are specific to the class used.
  401. */
  402. $wgFileBackends = array();
  403. /**
  404. * Array of configuration arrays for each lock manager.
  405. * Each backend configuration has the following parameters:
  406. * - 'name' : A unique name for the lock manager
  407. * - 'class' : The lock manger class to use
  408. * Additional parameters are specific to the class used.
  409. */
  410. $wgLockManagers = array();
  411. /**
  412. * Show EXIF data, on by default if available.
  413. * Requires PHP's EXIF extension: http://www.php.net/manual/en/ref.exif.php
  414. *
  415. * @note FOR WINDOWS USERS:
  416. * To enable EXIF functions, add the following lines to the "Windows
  417. * extensions" section of php.ini:
  418. * @code{.ini}
  419. * extension=extensions/php_mbstring.dll
  420. * extension=extensions/php_exif.dll
  421. * @endcode
  422. */
  423. $wgShowEXIF = function_exists( 'exif_read_data' );
  424. /**
  425. * If to automatically update the img_metadata field
  426. * if the metadata field is outdated but compatible with the current version.
  427. * Defaults to false.
  428. */
  429. $wgUpdateCompatibleMetadata = false;
  430. /**
  431. * If you operate multiple wikis, you can define a shared upload path here.
  432. * Uploads to this wiki will NOT be put there - they will be put into
  433. * $wgUploadDirectory.
  434. * If $wgUseSharedUploads is set, the wiki will look in the shared repository if
  435. * no file of the given name is found in the local repository (for [[File:..]],
  436. * [[Media:..]] links). Thumbnails will also be looked for and generated in this
  437. * directory.
  438. *
  439. * Note that these configuration settings can now be defined on a per-
  440. * repository basis for an arbitrary number of file repositories, using the
  441. * $wgForeignFileRepos variable.
  442. */
  443. $wgUseSharedUploads = false;
  444. /** Full path on the web server where shared uploads can be found */
  445. $wgSharedUploadPath = "http://commons.wikimedia.org/shared/images";
  446. /** Fetch commons image description pages and display them on the local wiki? */
  447. $wgFetchCommonsDescriptions = false;
  448. /** Path on the file system where shared uploads can be found. */
  449. $wgSharedUploadDirectory = "/var/www/wiki3/images";
  450. /** DB name with metadata about shared directory. Set this to false if the uploads do not come from a wiki. */
  451. $wgSharedUploadDBname = false;
  452. /** Optional table prefix used in database. */
  453. $wgSharedUploadDBprefix = '';
  454. /** Cache shared metadata in memcached. Don't do this if the commons wiki is in a different memcached domain */
  455. $wgCacheSharedUploads = true;
  456. /**
  457. * Allow for upload to be copied from an URL.
  458. * The timeout for copy uploads is set by $wgHTTPTimeout.
  459. * You have to assign the user right 'upload_by_url' to a user group, to use this.
  460. */
  461. $wgAllowCopyUploads = false;
  462. /**
  463. * Allow asynchronous copy uploads.
  464. * This feature is experimental and broken as of r81612.
  465. */
  466. $wgAllowAsyncCopyUploads = false;
  467. /**
  468. * A list of domains copy uploads can come from
  469. *
  470. * @since 1.20
  471. */
  472. $wgCopyUploadsDomains = array();
  473. /**
  474. * Proxy to use for copy upload requests.
  475. * @since 1.20
  476. */
  477. $wgCopyUploadProxy = false;
  478. /**
  479. * Max size for uploads, in bytes. If not set to an array, applies to all
  480. * uploads. If set to an array, per upload type maximums can be set, using the
  481. * file and url keys. If the * key is set this value will be used as maximum
  482. * for non-specified types.
  483. *
  484. * @par Example:
  485. * @code
  486. * $wgMaxUploadSize = array(
  487. * '*' => 250 * 1024,
  488. * 'url' => 500 * 1024,
  489. * );
  490. * @endcode
  491. * Sets the maximum for all uploads to 250 kB except for upload-by-url, which
  492. * will have a maximum of 500 kB.
  493. *
  494. */
  495. $wgMaxUploadSize = 1024*1024*100; # 100MB
  496. /**
  497. * Point the upload navigation link to an external URL
  498. * Useful if you want to use a shared repository by default
  499. * without disabling local uploads (use $wgEnableUploads = false for that).
  500. *
  501. * @par Example:
  502. * @code
  503. * $wgUploadNavigationUrl = 'http://commons.wikimedia.org/wiki/Special:Upload';
  504. * @endcode
  505. */
  506. $wgUploadNavigationUrl = false;
  507. /**
  508. * Point the upload link for missing files to an external URL, as with
  509. * $wgUploadNavigationUrl. The URL will get "(?|&)wpDestFile=<filename>"
  510. * appended to it as appropriate.
  511. */
  512. $wgUploadMissingFileUrl = false;
  513. /**
  514. * Give a path here to use thumb.php for thumbnail generation on client
  515. * request, instead of generating them on render and outputting a static URL.
  516. * This is necessary if some of your apache servers don't have read/write
  517. * access to the thumbnail path.
  518. *
  519. * @par Example:
  520. * @code
  521. * $wgThumbnailScriptPath = "{$wgScriptPath}/thumb{$wgScriptExtension}";
  522. * @endcode
  523. */
  524. $wgThumbnailScriptPath = false;
  525. /**
  526. * @see $wgThumbnailScriptPath
  527. */
  528. $wgSharedThumbnailScriptPath = false;
  529. /**
  530. * Set this to false if you do not want MediaWiki to divide your images
  531. * directory into many subdirectories, for improved performance.
  532. *
  533. * It's almost always good to leave this enabled. In previous versions of
  534. * MediaWiki, some users set this to false to allow images to be added to the
  535. * wiki by simply copying them into $wgUploadDirectory and then running
  536. * maintenance/rebuildImages.php to register them in the database. This is no
  537. * longer recommended, use maintenance/importImages.php instead.
  538. *
  539. * @note That this variable may be ignored if $wgLocalFileRepo is set.
  540. * @todo Deprecate the setting and ultimately remove it from Core.
  541. */
  542. $wgHashedUploadDirectory = true;
  543. /**
  544. * Set the following to false especially if you have a set of files that need to
  545. * be accessible by all wikis, and you do not want to use the hash (path/a/aa/)
  546. * directory layout.
  547. */
  548. $wgHashedSharedUploadDirectory = true;
  549. /**
  550. * Base URL for a repository wiki. Leave this blank if uploads are just stored
  551. * in a shared directory and not meant to be accessible through a separate wiki.
  552. * Otherwise the image description pages on the local wiki will link to the
  553. * image description page on this wiki.
  554. *
  555. * Please specify the namespace, as in the example below.
  556. */
  557. $wgRepositoryBaseUrl = "http://commons.wikimedia.org/wiki/File:";
  558. /**
  559. * This is the list of preferred extensions for uploading files. Uploading files
  560. * with extensions not in this list will trigger a warning.
  561. *
  562. * @warning If you add any OpenOffice or Microsoft Office file formats here,
  563. * such as odt or doc, and untrusted users are allowed to upload files, then
  564. * your wiki will be vulnerable to cross-site request forgery (CSRF).
  565. */
  566. $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg' );
  567. /**
  568. * Files with these extensions will never be allowed as uploads.
  569. * An array of file extensions to blacklist. You should append to this array
  570. * if you want to blacklist additional files.
  571. * */
  572. $wgFileBlacklist = array(
  573. # HTML may contain cookie-stealing JavaScript and web bugs
  574. 'html', 'htm', 'js', 'jsb', 'mhtml', 'mht', 'xhtml', 'xht',
  575. # PHP scripts may execute arbitrary code on the server
  576. 'php', 'phtml', 'php3', 'php4', 'php5', 'phps',
  577. # Other types that may be interpreted by some servers
  578. 'shtml', 'jhtml', 'pl', 'py', 'cgi',
  579. # May contain harmful executables for Windows victims
  580. 'exe', 'scr', 'dll', 'msi', 'vbs', 'bat', 'com', 'pif', 'cmd', 'vxd', 'cpl' );
  581. /**
  582. * Files with these mime types will never be allowed as uploads
  583. * if $wgVerifyMimeType is enabled.
  584. */
  585. $wgMimeTypeBlacklist = array(
  586. # HTML may contain cookie-stealing JavaScript and web bugs
  587. 'text/html', 'text/javascript', 'text/x-javascript', 'application/x-shellscript',
  588. # PHP scripts may execute arbitrary code on the server
  589. 'application/x-php', 'text/x-php',
  590. # Other types that may be interpreted by some servers
  591. 'text/x-python', 'text/x-perl', 'text/x-bash', 'text/x-sh', 'text/x-csh',
  592. # Client-side hazards on Internet Explorer
  593. 'text/scriptlet', 'application/x-msdownload',
  594. # Windows metafile, client-side vulnerability on some systems
  595. 'application/x-msmetafile',
  596. );
  597. /**
  598. * Allow Java archive uploads.
  599. * This is not recommended for public wikis since a maliciously-constructed
  600. * applet running on the same domain as the wiki can steal the user's cookies.
  601. */
  602. $wgAllowJavaUploads = false;
  603. /**
  604. * This is a flag to determine whether or not to check file extensions on upload.
  605. *
  606. * @warning Setting this to false is insecure for public wikis.
  607. */
  608. $wgCheckFileExtensions = true;
  609. /**
  610. * If this is turned off, users may override the warning for files not covered
  611. * by $wgFileExtensions.
  612. *
  613. * @warning Setting this to false is insecure for public wikis.
  614. */
  615. $wgStrictFileExtensions = true;
  616. /**
  617. * Setting this to true will disable the upload system's checks for HTML/JavaScript.
  618. *
  619. * @warning THIS IS VERY DANGEROUS on a publicly editable site, so USE
  620. * $wgGroupPermissions TO RESTRICT UPLOADING to only those that you trust
  621. */
  622. $wgDisableUploadScriptChecks = false;
  623. /**
  624. * Warn if uploaded files are larger than this (in bytes), or false to disable
  625. */
  626. $wgUploadSizeWarning = false;
  627. /**
  628. * list of trusted media-types and mime types.
  629. * Use the MEDIATYPE_xxx constants to represent media types.
  630. * This list is used by File::isSafeFile
  631. *
  632. * Types not listed here will have a warning about unsafe content
  633. * displayed on the images description page. It would also be possible
  634. * to use this for further restrictions, like disabling direct
  635. * [[media:...]] links for non-trusted formats.
  636. */
  637. $wgTrustedMediaFormats = array(
  638. MEDIATYPE_BITMAP, //all bitmap formats
  639. MEDIATYPE_AUDIO, //all audio formats
  640. MEDIATYPE_VIDEO, //all plain video formats
  641. "image/svg+xml", //svg (only needed if inline rendering of svg is not supported)
  642. "application/pdf", //PDF files
  643. #"application/x-shockwave-flash", //flash/shockwave movie
  644. );
  645. /**
  646. * Plugins for media file type handling.
  647. * Each entry in the array maps a MIME type to a class name
  648. */
  649. $wgMediaHandlers = array(
  650. 'image/jpeg' => 'JpegHandler',
  651. 'image/png' => 'PNGHandler',
  652. 'image/gif' => 'GIFHandler',
  653. 'image/tiff' => 'TiffHandler',
  654. 'image/x-ms-bmp' => 'BmpHandler',
  655. 'image/x-bmp' => 'BmpHandler',
  656. 'image/x-xcf' => 'XCFHandler',
  657. 'image/svg+xml' => 'SvgHandler', // official
  658. 'image/svg' => 'SvgHandler', // compat
  659. 'image/vnd.djvu' => 'DjVuHandler', // official
  660. 'image/x.djvu' => 'DjVuHandler', // compat
  661. 'image/x-djvu' => 'DjVuHandler', // compat
  662. );
  663. /**
  664. * Resizing can be done using PHP's internal image libraries or using
  665. * ImageMagick or another third-party converter, e.g. GraphicMagick.
  666. * These support more file formats than PHP, which only supports PNG,
  667. * GIF, JPG, XBM and WBMP.
  668. *
  669. * Use Image Magick instead of PHP builtin functions.
  670. */
  671. $wgUseImageMagick = false;
  672. /** The convert command shipped with ImageMagick */
  673. $wgImageMagickConvertCommand = '/usr/bin/convert';
  674. /** The identify command shipped with ImageMagick */
  675. $wgImageMagickIdentifyCommand = '/usr/bin/identify';
  676. /** Sharpening parameter to ImageMagick */
  677. $wgSharpenParameter = '0x0.4';
  678. /** Reduction in linear dimensions below which sharpening will be enabled */
  679. $wgSharpenReductionThreshold = 0.85;
  680. /**
  681. * Temporary directory used for ImageMagick. The directory must exist. Leave
  682. * this set to false to let ImageMagick decide for itself.
  683. */
  684. $wgImageMagickTempDir = false;
  685. /**
  686. * Use another resizing converter, e.g. GraphicMagick
  687. * %s will be replaced with the source path, %d with the destination
  688. * %w and %h will be replaced with the width and height.
  689. *
  690. * @par Example for GraphicMagick:
  691. * @code
  692. * $wgCustomConvertCommand = "gm convert %s -resize %wx%h %d"
  693. * @endcode
  694. *
  695. * Leave as false to skip this.
  696. */
  697. $wgCustomConvertCommand = false;
  698. /**
  699. * Some tests and extensions use exiv2 to manipulate the EXIF metadata in some
  700. * image formats.
  701. */
  702. $wgExiv2Command = '/usr/bin/exiv2';
  703. /**
  704. * Scalable Vector Graphics (SVG) may be uploaded as images.
  705. * Since SVG support is not yet standard in browsers, it is
  706. * necessary to rasterize SVGs to PNG as a fallback format.
  707. *
  708. * An external program is required to perform this conversion.
  709. * If set to an array, the first item is a PHP callable and any further items
  710. * are passed as parameters after $srcPath, $dstPath, $width, $height
  711. */
  712. $wgSVGConverters = array(
  713. 'ImageMagick' => '$path/convert -background white -thumbnail $widthx$height\! $input PNG:$output',
  714. 'sodipodi' => '$path/sodipodi -z -w $width -f $input -e $output',
  715. 'inkscape' => '$path/inkscape -z -w $width -f $input -e $output',
  716. 'batik' => 'java -Djava.awt.headless=true -jar $path/batik-rasterizer.jar -w $width -d $output $input',
  717. 'rsvg' => '$path/rsvg -w$width -h$height $input $output',
  718. 'imgserv' => '$path/imgserv-wrapper -i svg -o png -w$width $input $output',
  719. 'ImagickExt' => array( 'SvgHandler::rasterizeImagickExt' ),
  720. );
  721. /** Pick a converter defined in $wgSVGConverters */
  722. $wgSVGConverter = 'ImageMagick';
  723. /** If not in the executable PATH, specify the SVG converter path. */
  724. $wgSVGConverterPath = '';
  725. /** Don't scale a SVG larger than this */
  726. $wgSVGMaxSize = 2048;
  727. /** Don't read SVG metadata beyond this point.
  728. * Default is 1024*256 bytes
  729. */
  730. $wgSVGMetadataCutoff = 262144;
  731. /**
  732. * Disallow <title> element in SVG files.
  733. *
  734. * MediaWiki will reject HTMLesque tags in uploaded files due to idiotic
  735. * browsers which can not perform basic stuff like MIME detection and which are
  736. * vulnerable to further idiots uploading crap files as images.
  737. *
  738. * When this directive is on, "<title>" will be allowed in files with an
  739. * "image/svg+xml" MIME type. You should leave this disabled if your web server
  740. * is misconfigured and doesn't send appropriate MIME types for SVG images.
  741. */
  742. $wgAllowTitlesInSVG = false;
  743. /**
  744. * The maximum number of pixels a source image can have if it is to be scaled
  745. * down by a scaler that requires the full source image to be decompressed
  746. * and stored in decompressed form, before the thumbnail is generated.
  747. *
  748. * This provides a limit on memory usage for the decompression side of the
  749. * image scaler. The limit is used when scaling PNGs with any of the
  750. * built-in image scalers, such as ImageMagick or GD. It is ignored for
  751. * JPEGs with ImageMagick, and when using the VipsScaler extension.
  752. *
  753. * The default is 50 MB if decompressed to RGBA form, which corresponds to
  754. * 12.5 million pixels or 3500x3500.
  755. */
  756. $wgMaxImageArea = 1.25e7;
  757. /**
  758. * Force thumbnailing of animated GIFs above this size to a single
  759. * frame instead of an animated thumbnail. As of MW 1.17 this limit
  760. * is checked against the total size of all frames in the animation.
  761. * It probably makes sense to keep this equal to $wgMaxImageArea.
  762. */
  763. $wgMaxAnimatedGifArea = 1.25e7;
  764. /**
  765. * Browsers don't support TIFF inline generally...
  766. * For inline display, we need to convert to PNG or JPEG.
  767. * Note scaling should work with ImageMagick, but may not with GD scaling.
  768. *
  769. * @par Example:
  770. * @code
  771. * // PNG is lossless, but inefficient for photos
  772. * $wgTiffThumbnailType = array( 'png', 'image/png' );
  773. * // JPEG is good for photos, but has no transparency support. Bad for diagrams.
  774. * $wgTiffThumbnailType = array( 'jpg', 'image/jpeg' );
  775. * @endcode
  776. */
  777. $wgTiffThumbnailType = false;
  778. /**
  779. * If rendered thumbnail files are older than this timestamp, they
  780. * will be rerendered on demand as if the file didn't already exist.
  781. * Update if there is some need to force thumbs and SVG rasterizations
  782. * to rerender, such as fixes to rendering bugs.
  783. */
  784. $wgThumbnailEpoch = '20030516000000';
  785. /**
  786. * If set, inline scaled images will still produce "<img>" tags ready for
  787. * output instead of showing an error message.
  788. *
  789. * This may be useful if errors are transitory, especially if the site
  790. * is configured to automatically render thumbnails on request.
  791. *
  792. * On the other hand, it may obscure error conditions from debugging.
  793. * Enable the debug log or the 'thumbnail' log group to make sure errors
  794. * are logged to a file for review.
  795. */
  796. $wgIgnoreImageErrors = false;
  797. /**
  798. * Allow thumbnail rendering on page view. If this is false, a valid
  799. * thumbnail URL is still output, but no file will be created at
  800. * the target location. This may save some time if you have a
  801. * thumb.php or 404 handler set up which is faster than the regular
  802. * webserver(s).
  803. */
  804. $wgGenerateThumbnailOnParse = true;
  805. /**
  806. * Show thumbnails for old images on the image description page
  807. */
  808. $wgShowArchiveThumbnails = true;
  809. /** Obsolete, always true, kept for compatibility with extensions */
  810. $wgUseImageResize = true;
  811. /**
  812. * If set to true, images that contain certain the exif orientation tag will
  813. * be rotated accordingly. If set to null, try to auto-detect whether a scaler
  814. * is available that can rotate.
  815. */
  816. $wgEnableAutoRotation = null;
  817. /**
  818. * Internal name of virus scanner. This servers as a key to the
  819. * $wgAntivirusSetup array. Set this to NULL to disable virus scanning. If not
  820. * null, every file uploaded will be scanned for viruses.
  821. */
  822. $wgAntivirus = null;
  823. /**
  824. * Configuration for different virus scanners. This an associative array of
  825. * associative arrays. It contains one setup array per known scanner type.
  826. * The entry is selected by $wgAntivirus, i.e.
  827. * valid values for $wgAntivirus are the keys defined in this array.
  828. *
  829. * The configuration array for each scanner contains the following keys:
  830. * "command", "codemap", "messagepattern":
  831. *
  832. * "command" is the full command to call the virus scanner - %f will be
  833. * replaced with the name of the file to scan. If not present, the filename
  834. * will be appended to the command. Note that this must be overwritten if the
  835. * scanner is not in the system path; in that case, plase set
  836. * $wgAntivirusSetup[$wgAntivirus]['command'] to the desired command with full
  837. * path.
  838. *
  839. * "codemap" is a mapping of exit code to return codes of the detectVirus
  840. * function in SpecialUpload.
  841. * - An exit code mapped to AV_SCAN_FAILED causes the function to consider
  842. * the scan to be failed. This will pass the file if $wgAntivirusRequired
  843. * is not set.
  844. * - An exit code mapped to AV_SCAN_ABORTED causes the function to consider
  845. * the file to have an usupported format, which is probably imune to
  846. * virusses. This causes the file to pass.
  847. * - An exit code mapped to AV_NO_VIRUS will cause the file to pass, meaning
  848. * no virus was found.
  849. * - All other codes (like AV_VIRUS_FOUND) will cause the function to report
  850. * a virus.
  851. * - You may use "*" as a key in the array to catch all exit codes not mapped otherwise.
  852. *
  853. * "messagepattern" is a perl regular expression to extract the meaningful part of the scanners
  854. * output. The relevant part should be matched as group one (\1).
  855. * If not defined or the pattern does not match, the full message is shown to the user.
  856. */
  857. $wgAntivirusSetup = array(
  858. #setup for clamav
  859. 'clamav' => array (
  860. 'command' => "clamscan --no-summary ",
  861. 'codemap' => array (
  862. "0" => AV_NO_VIRUS, # no virus
  863. "1" => AV_VIRUS_FOUND, # virus found
  864. "52" => AV_SCAN_ABORTED, # unsupported file format (probably imune)
  865. "*" => AV_SCAN_FAILED, # else scan failed
  866. ),
  867. 'messagepattern' => '/.*?:(.*)/sim',
  868. ),
  869. );
  870. /** Determines if a failed virus scan (AV_SCAN_FAILED) will cause the file to be rejected. */
  871. $wgAntivirusRequired = true;
  872. /** Determines if the mime type of uploaded files should be checked */
  873. $wgVerifyMimeType = true;
  874. /** Sets the mime type definition file to use by MimeMagic.php. */
  875. $wgMimeTypeFile = "includes/mime.types";
  876. #$wgMimeTypeFile= "/etc/mime.types";
  877. #$wgMimeTypeFile= null; #use built-in defaults only.
  878. /** Sets the mime type info file to use by MimeMagic.php. */
  879. $wgMimeInfoFile= "includes/mime.info";
  880. #$wgMimeInfoFile= null; #use built-in defaults only.
  881. /**
  882. * Switch for loading the FileInfo extension by PECL at runtime.
  883. * This should be used only if fileinfo is installed as a shared object
  884. * or a dynamic library.
  885. */
  886. $wgLoadFileinfoExtension = false;
  887. /** Sets an external mime detector program. The command must print only
  888. * the mime type to standard output.
  889. * The name of the file to process will be appended to the command given here.
  890. * If not set or NULL, mime_content_type will be used if available.
  891. *
  892. * @par Example:
  893. * @code
  894. * #$wgMimeDetectorCommand = "file -bi"; # use external mime detector (Linux)
  895. * @endcode
  896. */
  897. $wgMimeDetectorCommand = null;
  898. /**
  899. * Switch for trivial mime detection. Used by thumb.php to disable all fancy
  900. * things, because only a few types of images are needed and file extensions
  901. * can be trusted.
  902. */
  903. $wgTrivialMimeDetection = false;
  904. /**
  905. * Additional XML types we can allow via mime-detection.
  906. * array = ( 'rootElement' => 'associatedMimeType' )
  907. */
  908. $wgXMLMimeTypes = array(
  909. 'http://www.w3.org/2000/svg:svg' => 'image/svg+xml',
  910. 'svg' => 'image/svg+xml',
  911. 'http://www.lysator.liu.se/~alla/dia/:diagram' => 'application/x-dia-diagram',
  912. 'http://www.w3.org/1999/xhtml:html' => 'text/html', // application/xhtml+xml?
  913. 'html' => 'text/html', // application/xhtml+xml?
  914. );
  915. /**
  916. * Limit images on image description pages to a user-selectable limit. In order
  917. * to reduce disk usage, limits can only be selected from a list.
  918. * The user preference is saved as an array offset in the database, by default
  919. * the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you
  920. * change it if you alter the array (see bug 8858).
  921. * This is the list of settings the user can choose from:
  922. */
  923. $wgImageLimits = array(
  924. array( 320, 240 ),
  925. array( 640, 480 ),
  926. array( 800, 600 ),
  927. array( 1024, 768 ),
  928. array( 1280, 1024 )
  929. );
  930. /**
  931. * Adjust thumbnails on image pages according to a user setting. In order to
  932. * reduce disk usage, the values can only be selected from a list. This is the
  933. * list of settings the user can choose from:
  934. */
  935. $wgThumbLimits = array(
  936. 120,
  937. 150,
  938. 180,
  939. 200,
  940. 250,
  941. 300
  942. );
  943. /**
  944. * Default parameters for the "<gallery>" tag
  945. */
  946. $wgGalleryOptions = array (
  947. 'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
  948. 'imageWidth' => 120, // Width of the cells containing images in galleries (in "px")
  949. 'imageHeight' => 120, // Height of the cells containing images in galleries (in "px")
  950. 'captionLength' => 25, // Length of caption to truncate (in characters)
  951. 'showBytes' => true, // Show the filesize in bytes in categories
  952. );
  953. /**
  954. * Adjust width of upright images when parameter 'upright' is used
  955. * This allows a nicer look for upright images without the need to fix the width
  956. * by hardcoded px in wiki sourcecode.
  957. */
  958. $wgThumbUpright = 0.75;
  959. /**
  960. * Default value for chmoding of new directories.
  961. */
  962. $wgDirectoryMode = 0777;
  963. /**
  964. * @name DJVU settings
  965. * @{
  966. */
  967. /**
  968. * Path of the djvudump executable
  969. * Enable this and $wgDjvuRenderer to enable djvu rendering
  970. */
  971. # $wgDjvuDump = 'djvudump';
  972. $wgDjvuDump = null;
  973. /**
  974. * Path of the ddjvu DJVU renderer
  975. * Enable this and $wgDjvuDump to enable djvu rendering
  976. */
  977. # $wgDjvuRenderer = 'ddjvu';
  978. $wgDjvuRenderer = null;
  979. /**
  980. * Path of the djvutxt DJVU text extraction utility
  981. * Enable this and $wgDjvuDump to enable text layer extraction from djvu files
  982. */
  983. # $wgDjvuTxt = 'djvutxt';
  984. $wgDjvuTxt = null;
  985. /**
  986. * Path of the djvutoxml executable
  987. * This works like djvudump except much, much slower as of version 3.5.
  988. *
  989. * For now we recommend you use djvudump instead. The djvuxml output is
  990. * probably more stable, so we'll switch back to it as soon as they fix
  991. * the efficiency problem.
  992. * http://sourceforge.net/tracker/index.php?func=detail&aid=1704049&group_id=32953&atid=406583
  993. *
  994. * @par Example:
  995. * @code
  996. * $wgDjvuToXML = 'djvutoxml';
  997. * @endcode
  998. */
  999. $wgDjvuToXML = null;
  1000. /**
  1001. * Shell command for the DJVU post processor
  1002. * Default: pnmtopng, since ddjvu generates ppm output
  1003. * Set this to false to output the ppm file directly.
  1004. */
  1005. $wgDjvuPostProcessor = 'pnmtojpeg';
  1006. /**
  1007. * File extension for the DJVU post processor output
  1008. */
  1009. $wgDjvuOutputExtension = 'jpg';
  1010. /** @} */ # end of DJvu }
  1011. /** @} */ # end of file uploads }
  1012. /************************************************************************//**
  1013. * @name Email settings
  1014. * @{
  1015. */
  1016. $serverName = substr( $wgServer, strrpos( $wgServer, '/' ) + 1 );
  1017. /**
  1018. * Site admin email address.
  1019. */
  1020. $wgEmergencyContact = 'wikiadmin@' . $serverName;
  1021. /**
  1022. * Password reminder email address.
  1023. *
  1024. * The address we should use as sender when a user is requesting his password.
  1025. */
  1026. $wgPasswordSender = 'apache@' . $serverName;
  1027. unset( $serverName ); # Don't leak local variables to global scope
  1028. /**
  1029. * Password reminder name
  1030. */
  1031. $wgPasswordSenderName = 'MediaWiki Mail';
  1032. /**
  1033. * Dummy address which should be accepted during mail send action.
  1034. * It might be necessary to adapt the address or to set it equal
  1035. * to the $wgEmergencyContact address.
  1036. */
  1037. $wgNoReplyAddress = 'reply@not.possible';
  1038. /**
  1039. * Set to true to enable the e-mail basic features:
  1040. * Password reminders, etc. If sending e-mail on your
  1041. * server doesn't work, you might want to disable this.
  1042. */
  1043. $wgEnableEmail = true;
  1044. /**
  1045. * Set to true to enable user-to-user e-mail.
  1046. * This can potentially be abused, as it's hard to track.
  1047. */
  1048. $wgEnableUserEmail = true;
  1049. /**
  1050. * Set to true to put the sending user's email in a Reply-To header
  1051. * instead of From. ($wgEmergencyContact will be used as From.)
  1052. *
  1053. * Some mailers (eg sSMTP) set the SMTP envelope sender to the From value,
  1054. * which can cause problems with SPF validation and leak recipient addressses
  1055. * when bounces are sent to the sender.
  1056. */
  1057. $wgUserEmailUseReplyTo = false;
  1058. /**
  1059. * Minimum time, in hours, which must elapse between password reminder
  1060. * emails for a given account. This is to prevent abuse by mail flooding.
  1061. */
  1062. $wgPasswordReminderResendTime = 24;
  1063. /**
  1064. * The time, in seconds, when an emailed temporary password expires.
  1065. */
  1066. $wgNewPasswordExpiry = 3600 * 24 * 7;
  1067. /**
  1068. * The time, in seconds, when an email confirmation email expires
  1069. */
  1070. $wgUserEmailConfirmationTokenExpiry = 7 * 24 * 60 * 60;
  1071. /**
  1072. * SMTP Mode.
  1073. *
  1074. * For using a direct (authenticated) SMTP server connection.
  1075. * Default to false or fill an array :
  1076. *
  1077. * @code
  1078. * $wgSMTP = array(
  1079. * 'host' => 'SMTP domain',
  1080. * 'IDHost' => 'domain for MessageID',
  1081. * 'port' => '25',
  1082. * 'auth' => [true|false],
  1083. * 'username' => [SMTP username],
  1084. * 'password' => [SMTP password],
  1085. * );
  1086. * @endcode
  1087. */
  1088. $wgSMTP = false;
  1089. /**
  1090. * Additional email parameters, will be passed as the last argument to mail() call.
  1091. * If using safe_mode this has no effect
  1092. */
  1093. $wgAdditionalMailParams = null;
  1094. /**
  1095. * True: from page editor if s/he opted-in. False: Enotif mails appear to come
  1096. * from $wgEmergencyContact
  1097. */
  1098. $wgEnotifFromEditor = false;
  1099. // TODO move UPO to preferences probably ?
  1100. # If set to true, users get a corresponding option in their preferences and can choose to enable or disable at their discretion
  1101. # If set to false, the corresponding input form on the user preference page is suppressed
  1102. # It call this to be a "user-preferences-option (UPO)"
  1103. /**
  1104. * Require email authentication before sending mail to an email address.
  1105. * This is highly recommended. It prevents MediaWiki from being used as an open
  1106. * spam relay.
  1107. */
  1108. $wgEmailAuthentication = true;
  1109. /**
  1110. * Allow users to enable email notification ("enotif") on watchlist changes.
  1111. */
  1112. $wgEnotifWatchlist = false;
  1113. /**
  1114. * Allow users to enable email notification ("enotif") when someone edits their
  1115. * user talk page.
  1116. */
  1117. $wgEnotifUserTalk = false;
  1118. /**
  1119. * Set the Reply-to address in notifications to the editor's address, if user
  1120. * allowed this in the preferences.
  1121. */
  1122. $wgEnotifRevealEditorAddress = false;
  1123. /**
  1124. * Send notification mails on minor edits to watchlist pages. This is enabled
  1125. * by default. Does not affect user talk notifications.
  1126. */
  1127. $wgEnotifMinorEdits = true;
  1128. /**
  1129. * Send a generic mail instead of a personalised mail for each user. This
  1130. * always uses UTC as the time zone, and doesn't include the username.
  1131. *
  1132. * For pages with many users watching, this can significantly reduce mail load.
  1133. * Has no effect when using sendmail rather than SMTP.
  1134. */
  1135. $wgEnotifImpersonal = false;
  1136. /**
  1137. * Maximum number of users to mail at once when using impersonal mail. Should
  1138. * match the limit on your mail server.
  1139. */
  1140. $wgEnotifMaxRecips = 500;
  1141. /**
  1142. * Send mails via the job queue. This can be useful to reduce the time it
  1143. * takes to save a page that a lot of people are watching.
  1144. */
  1145. $wgEnotifUseJobQ = false;
  1146. /**
  1147. * Use real name instead of username in e-mail "from" field.
  1148. */
  1149. $wgEnotifUseRealName = false;
  1150. /**
  1151. * Array of usernames who will be sent a notification email for every change
  1152. * which occurs on a wiki. Users will not be notified of their own changes.
  1153. */
  1154. $wgUsersNotifiedOnAllChanges = array();
  1155. /** @} */ # end of email settings
  1156. /************************************************************************//**
  1157. * @name Database settings
  1158. * @{
  1159. */
  1160. /** Database host name or IP address */
  1161. $wgDBserver = 'localhost';
  1162. /** Database port number (for PostgreSQL) */
  1163. $wgDBport = 5432;
  1164. /** Name of the database */
  1165. $wgDBname = 'my_wiki';
  1166. /** Database username */
  1167. $wgDBuser = 'wikiuser';
  1168. /** Database user's password */
  1169. $wgDBpassword = '';
  1170. /** Database type */
  1171. $wgDBtype = 'mysql';
  1172. /** Whether to use SSL in DB connection. */
  1173. $wgDBssl = false;
  1174. /** Whether to use compression in DB connection. */
  1175. $wgDBcompress = false;
  1176. /** Separate username for maintenance tasks. Leave as null to use the default. */
  1177. $wgDBadminuser = null;
  1178. /** Separate password for maintenance tasks. Leave as null to use the default. */
  1179. $wgDBadminpassword = null;
  1180. /**
  1181. * Search type.
  1182. * Leave as null to select the default search engine for the
  1183. * selected database type (eg SearchMySQL), or set to a class
  1184. * name to override to a custom search engine.
  1185. */
  1186. $wgSearchType = null;
  1187. /** Table name prefix */
  1188. $wgDBprefix = '';
  1189. /** MySQL table options to use during installation or update */
  1190. $wgDBTableOptions = 'ENGINE=InnoDB';
  1191. /**
  1192. * SQL Mode - default is turning off all modes, including strict, if set.
  1193. * null can be used to skip the setting for performance reasons and assume
  1194. * DBA has done his best job.
  1195. * String override can be used for some additional fun :-)
  1196. */
  1197. $wgSQLMode = '';
  1198. /** Mediawiki schema */
  1199. $wgDBmwschema = 'mediawiki';
  1200. /** To override default SQLite data directory ($docroot/../data) */
  1201. $wgSQLiteDataDir = '';
  1202. /**
  1203. * Make all database connections secretly go to localhost. Fool the load balancer
  1204. * thinking there is an arbitrarily large cluster of servers to connect to.
  1205. * Useful for debugging.
  1206. */
  1207. $wgAllDBsAreLocalhost = false;
  1208. /**
  1209. * Shared database for multiple wikis. Commonly used for storing a user table
  1210. * for single sign-on. The server for this database must be the same as for the
  1211. * main database.
  1212. *
  1213. * For backwards compatibility the shared prefix is set to the same as the local
  1214. * prefix, and the user table is listed in the default list of shared tables.
  1215. * The user_properties table is also added so that users will continue to have their
  1216. * preferences shared (preferences were stored in the user table prior to 1.16)
  1217. *
  1218. * $wgSharedTables may be customized with a list of tables to share in the shared
  1219. * datbase. However it is advised to limit what tables you do share as many of
  1220. * MediaWiki's tables may have side effects if you try to share them.
  1221. * EXPERIMENTAL
  1222. *
  1223. * $wgSharedPrefix is the table prefix for the shared database. It defaults to
  1224. * $wgDBprefix.
  1225. */
  1226. $wgSharedDB = null;
  1227. /** @see $wgSharedDB */
  1228. $wgSharedPrefix = false;
  1229. /** @see $wgSharedDB */
  1230. $wgSharedTables = array( 'user', 'user_properties' );
  1231. /**
  1232. * Database load balancer
  1233. * This is a two-dimensional array, an array of server info structures
  1234. * Fields are:
  1235. * - host: Host name
  1236. * - dbname: Default database name
  1237. * - user: DB user
  1238. * - password: DB password
  1239. * - type: "mysql" or "postgres"
  1240. * - load: ratio of DB_SLAVE load, must be >=0, the sum of all loads must be >0
  1241. * - groupLoads: array of load ratios, the key is the query group name. A query may belong
  1242. * to several groups, the most specific group defined here is used.
  1243. *
  1244. * - flags: bit field
  1245. * - DBO_DEFAULT -- turns on DBO_TRX only if !$wgCommandLineMode (recommended)
  1246. * - DBO_DEBUG -- equivalent of $wgDebugDumpSql
  1247. * - DBO_TRX -- wrap entire request in a transaction
  1248. * - DBO_IGNORE -- ignore errors (not useful in LocalSettings.php)
  1249. * - DBO_NOBUFFER -- turn off buffering (not useful in LocalSettings.php)
  1250. * - DBO_PERSISTENT -- enables persistent database connections
  1251. * - DBO_SSL -- uses SSL/TLS encryption in database connections, if available
  1252. * - DBO_COMPRESS -- uses internal compression in database connections, if available
  1253. *
  1254. * - max lag: (optional) Maximum replication lag before a slave will taken out of rotation
  1255. * - max threads: (optional) Maximum number of running threads
  1256. *
  1257. * These and any other user-defined properties will be assigned to the mLBInfo member
  1258. * variable of the Database object.
  1259. *
  1260. * Leave at false to use the single-server variables above. If you set this
  1261. * variable, the single-server variables will generally be ignored (except
  1262. * perhaps in some command-line scripts).
  1263. *
  1264. * The first server listed in this array (with key 0) will be the master. The
  1265. * rest of the servers will be slaves. To prevent writes to your slaves due to
  1266. * accidental misconfiguration or MediaWiki bugs, set read_only=1 on all your
  1267. * slaves in my.cnf. You can set read_only mode at runtime using:
  1268. *
  1269. * @code
  1270. * SET @@read_only=1;
  1271. * @endcode
  1272. *
  1273. * Since the effect of writing to a slave is so damaging and difficult to clean
  1274. * up, we at Wikimedia set read_only=1 in my.cnf on all our DB servers, even
  1275. * our masters, and then set read_only=0 on masters at runtime.
  1276. */
  1277. $wgDBservers = false;
  1278. /**
  1279. * Load balancer factory configuration
  1280. * To set up a multi-master wiki farm, set the class here to something that
  1281. * can return a LoadBalancer with an appropriate master on a call to getMainLB().
  1282. * The class identified here is responsible for reading $wgDBservers,
  1283. * $wgDBserver, etc., so overriding it may cause those globals to be ignored.
  1284. *
  1285. * The LBFactory_Multi class is provided for this purpose, please see
  1286. * includes/db/LBFactory_Multi.php for configuration information.
  1287. */
  1288. $wgLBFactoryConf = array( 'class' => 'LBFactory_Simple' );
  1289. /** How long to wait for a slave to catch up to the master */
  1290. $wgMasterWaitTimeout = 10;
  1291. /** File to log database errors to */
  1292. $wgDBerrorLog = false;
  1293. /**
  1294. * Timezone to use in the error log.
  1295. * Defaults to the wiki timezone ($wgLocaltimezone).
  1296. *
  1297. * A list of useable timezones can found at:
  1298. * http://php.net/manual/en/timezones.php
  1299. *
  1300. * @par Examples:
  1301. * @code
  1302. * $wgLocaltimezone = 'UTC';
  1303. * $wgLocaltimezone = 'GMT';
  1304. * $wgLocaltimezone = 'PST8PDT';
  1305. * $wgLocaltimezone = 'Europe/Sweden';
  1306. * $wgLocaltimezone = 'CET';
  1307. * @endcode
  1308. *
  1309. * @since 1.20
  1310. */
  1311. $wgDBerrorLogTZ = false;
  1312. /** When to give an error message */
  1313. $wgDBClusterTimeout = 10;
  1314. /**
  1315. * Scale load balancer polling time so that under overload conditions, the
  1316. * database server receives a SHOW STATUS query at an average interval of this
  1317. * many microseconds
  1318. */
  1319. $wgDBAvgStatusPoll = 2000;
  1320. /**
  1321. * Set to true to engage MySQL 4.1/5.0 charset-related features;
  1322. * for now will just cause sending of 'SET NAMES=utf8' on connect.
  1323. *
  1324. * @warning THIS IS EXPERIMENTAL!
  1325. *
  1326. * May break if you're not using the table defs from mysql5/tables.sql.
  1327. * May break if you're upgrading an existing wiki if set differently.
  1328. * Broken symptoms likely to include incorrect behavior with page titles,
  1329. * usernames, comments etc containing non-ASCII characters.
  1330. * Might also cause failures on the object cache and other things.
  1331. *
  1332. * Even correct usage may cause failures with Unicode supplementary
  1333. * characters (those not in the Basic Multilingual Plane) unless MySQL
  1334. * has enhanced their Unicode support.
  1335. */
  1336. $wgDBmysql5 = false;
  1337. /**
  1338. * Other wikis on this site, can be administered from a single developer
  1339. * account.
  1340. * Array numeric key => database name
  1341. */
  1342. $wgLocalDatabases = array();
  1343. /**
  1344. * If lag is higher than $wgSlaveLagWarning, show a warning in some special
  1345. * pages (like watchlist). If the lag is higher than $wgSlaveLagCritical,
  1346. * show a more obvious warning.
  1347. */
  1348. $wgSlaveLagWarning = 10;
  1349. /** @see $wgSlaveLagWarning */
  1350. $wgSlaveLagCritical = 30;
  1351. /**
  1352. * Use old names for change_tags indices.
  1353. */
  1354. $wgOldChangeTagsIndex = false;
  1355. /**@}*/ # End of DB settings }
  1356. /************************************************************************//**
  1357. * @name Text storage
  1358. * @{
  1359. */
  1360. /**
  1361. * We can also compress text stored in the 'text' table. If this is set on, new
  1362. * revisions will be compressed on page save if zlib support is available. Any
  1363. * compressed revisions will be decompressed on load regardless of this setting
  1364. * *but will not be readable at all* if zlib support is not available.
  1365. */
  1366. $wgCompressRevisions = false;
  1367. /**
  1368. * External stores allow including content
  1369. * from non database sources following URL links.
  1370. *
  1371. * Short names of ExternalStore classes may be specified in an array here:
  1372. * @code
  1373. * $wgExternalStores = array("http","file","custom")...
  1374. * @endcode
  1375. *
  1376. * CAUTION: Access to database might lead to code execution
  1377. */
  1378. $wgExternalStores = false;
  1379. /**
  1380. * An array of external MySQL servers.
  1381. *
  1382. * @par Example:
  1383. * Create a cluster named 'cluster1' containing three servers:
  1384. * @code
  1385. * $wgExternalServers = array(
  1386. * 'cluster1' => array( 'srv28', 'srv29', 'srv30' )
  1387. * );
  1388. * @endcode
  1389. *
  1390. * Used by LBFactory_Simple, may be ignored if $wgLBFactoryConf is set to
  1391. * another class.
  1392. */
  1393. $wgExternalServers = array();
  1394. /**
  1395. * The place to put new revisions, false to put them in the local text table.
  1396. * Part of a URL, e.g. DB://cluster1
  1397. *
  1398. * Can be an array instead of a single string, to enable data distribution. Keys
  1399. * must be consecutive integers, starting at zero.
  1400. *
  1401. * @par Example:
  1402. * @code
  1403. * $wgDefaultExternalStore = array( 'DB://cluster1', 'DB://cluster2' );
  1404. * @endcode
  1405. *
  1406. * @var array
  1407. */
  1408. $wgDefaultExternalStore = false;
  1409. /**
  1410. * Revision text may be cached in $wgMemc to reduce load on external storage
  1411. * servers and object extraction overhead for frequently-loaded revisions.
  1412. *
  1413. * Set to 0 to disable, or number of seconds before cache expiry.
  1414. */
  1415. $wgRevisionCacheExpiry = 0;
  1416. /** @} */ # end text storage }
  1417. /************************************************************************//**
  1418. * @name Performance hacks and limits
  1419. * @{
  1420. */
  1421. /** Disable database-intensive features */
  1422. $wgMiserMode = false;
  1423. /** Disable all query pages if miser mode is on, not just some */
  1424. $wgDisableQueryPages = false;
  1425. /** Number of rows to cache in 'querycache' table when miser mode is on */
  1426. $wgQueryCacheLimit = 1000;
  1427. /** Number of links to a page required before it is deemed "wanted" */
  1428. $wgWantedPagesThreshold = 1;
  1429. /** Enable slow parser functions */
  1430. $wgAllowSlowParserFunctions = false;
  1431. /** Allow schema updates */
  1432. $wgAllowSchemaUpdates = true;
  1433. /**
  1434. * Do DELETE/INSERT for link updates instead of incremental
  1435. */
  1436. $wgUseDumbLinkUpdate = false;
  1437. /**
  1438. * Anti-lock flags - bitfield
  1439. * - ALF_NO_LINK_LOCK:
  1440. * Don't use locking reads when updating the link table. This is
  1441. * necessary for wikis with a high edit rate for performance
  1442. * reasons, but may cause link table inconsistency
  1443. */
  1444. $wgAntiLockFlags = 0;
  1445. /**
  1446. * Maximum article size in kilobytes
  1447. */
  1448. $wgMaxArticleSize = 2048;
  1449. /**
  1450. * The minimum amount of memory that MediaWiki "needs"; MediaWiki will try to
  1451. * raise PHP's memory limit if it's below this amount.
  1452. */
  1453. $wgMemoryLimit = "50M";
  1454. /** @} */ # end performance hacks }
  1455. /************************************************************************//**
  1456. * @name Cache settings
  1457. * @{
  1458. */
  1459. /**
  1460. * Directory for caching data in the local filesystem. Should not be accessible
  1461. * from the web. Set this to false to not use any local caches.
  1462. *
  1463. * Note: if multiple wikis share the same localisation cache directory, they
  1464. * must all have the same set of extensions. You can set a directory just for
  1465. * the localisation cache using $wgLocalisationCacheConf['storeDirectory'].
  1466. */
  1467. $wgCacheDirectory = false;
  1468. /**
  1469. * Main cache type. This should be a cache with fast access, but it may have
  1470. * limited space. By default, it is disabled, since the database is not fast
  1471. * enough to make it worthwhile.
  1472. *
  1473. * The options are:
  1474. *
  1475. * - CACHE_ANYTHING: Use anything, as long as it works
  1476. * - CACHE_NONE: Do not cache
  1477. * - CACHE_DB: Store cache objects in the DB
  1478. * - CACHE_MEMCACHED: MemCached, must specify servers in $wgMemCachedServers
  1479. * - CACHE_ACCEL: APC, XCache or WinCache
  1480. * - CACHE_DBA: Use PHP's DBA extension to store in a DBM-style
  1481. * database. This is slow, and is not recommended for
  1482. * anything other than debugging.
  1483. * - (other): A string may be used which identifies a cache
  1484. * configuration in $wgObjectCaches.
  1485. *
  1486. * @see $wgMessageCacheType, $wgParserCacheType
  1487. */
  1488. $wgMainCacheType = CACHE_NONE;
  1489. /**
  1490. * The cache type for storing the contents of the MediaWiki namespace. This
  1491. * cache is used for a small amount of data which is expensive to regenerate.
  1492. *
  1493. * For available types see $wgMainCacheType.
  1494. */
  1495. $wgMessageCacheType = CACHE_ANYTHING;
  1496. /**
  1497. * The cache type for storing article HTML. This is used to store data which
  1498. * is expensive to regenerate, and benefits from having plenty of storage space.
  1499. *
  1500. * For available types see $wgMainCacheType.
  1501. */
  1502. $wgParserCacheType = CACHE_ANYTHING;
  1503. /**
  1504. * The cache type for storing session data. Used if $wgSessionsInObjectCache is true.
  1505. *
  1506. * For available types see $wgMainCacheType.
  1507. */
  1508. $wgSessionCacheType = CACHE_ANYTHING;
  1509. /**
  1510. * The cache type for storing language conversion tables,
  1511. * which are used when parsing certain text and interface messages.
  1512. *
  1513. * For available types see $wgMainCacheType.
  1514. *
  1515. * @since 1.20
  1516. */
  1517. $wgLanguageConverterCacheType = CACHE_ANYTHING;
  1518. /**
  1519. * Advanced object cache configuration.
  1520. *
  1521. * Use this to define the class names and constructor parameters which are used
  1522. * for the various cache types. Custom cache types may be defined here and
  1523. * referenced from $wgMainCacheType, $wgMessageCacheType, $wgParserCacheType,
  1524. * or $wgLanguageConverterCacheType.
  1525. *
  1526. * The format is an associative array where the key is a cache identifier, and
  1527. * the value is an associative array of parameters. The "class" parameter is the
  1528. * class name which will be used. Alternatively, a "factory" parameter may be
  1529. * given, giving a callable function which will generate a suitable cache object.
  1530. *
  1531. * The other parameters are dependent on the class used.
  1532. * - CACHE_DBA uses $wgTmpDirectory by default. The 'dir' parameter let you
  1533. * overrides that.
  1534. */
  1535. $wgObjectCaches = array(
  1536. CACHE_NONE => array( 'class' => 'EmptyBagOStuff' ),
  1537. CACHE_DB => array( 'class' => 'SqlBagOStuff', 'table' => 'objectcache' ),
  1538. CACHE_DBA => array( 'class' => 'DBABagOStuff' ),
  1539. CACHE_ANYTHING => array( 'factory' => 'ObjectCache::newAnything' ),
  1540. CACHE_ACCEL => array( 'factory' => 'ObjectCache::newAccelerator' ),
  1541. CACHE_MEMCACHED => array( 'factory' => 'ObjectCache::newMemcached' ),
  1542. 'apc' => array( 'class' => 'APCBagOStuff' ),
  1543. 'xcache' => array( 'class' => 'XCacheBagOStuff' ),
  1544. 'wincache' => array( 'class' => 'WinCacheBagOStuff' ),
  1545. 'memcached-php' => array( 'class' => 'MemcachedPhpBagOStuff' ),
  1546. 'memcached-pecl' => array( 'class' => 'MemcachedPeclBagOStuff' ),
  1547. 'hash' => array( 'class' => 'HashBagOStuff' ),
  1548. );
  1549. /**
  1550. * The expiry time for the parser cache, in seconds.
  1551. * The default is 86400 (one day).
  1552. */
  1553. $wgParserCacheExpireTime = 86400;
  1554. /**
  1555. * Select which DBA handler <http://www.php.net/manual/en/dba.requirements.php>
  1556. * to use as CACHE_DBA backend.
  1557. */
  1558. $wgDBAhandler = 'db3';
  1559. /**
  1560. * Deprecated alias for $wgSessionsInObjectCache.
  1561. *
  1562. * @deprecated Use $wgSessionsInObjectCache
  1563. */
  1564. $wgSessionsInMemcached = false;
  1565. /**
  1566. * Store sessions in an object cache, configured by $wgSessionCacheType. This
  1567. * can be useful to improve performance, or to avoid the locking behaviour of
  1568. * PHP's default session handler, which tends to prevent multiple requests for
  1569. * the same user from acting concurrently.
  1570. */
  1571. $wgSessionsInObjectCache = false;
  1572. /**
  1573. * The expiry time to use for session storage when $wgSessionsInObjectCache is
  1574. * enabled, in seconds.
  1575. */
  1576. $wgObjectCacheSessionExpiry = 3600;
  1577. /**
  1578. * This is used for setting php's session.save_handler. In practice, you will
  1579. * almost never need to change this ever. Other options might be 'user' or
  1580. * 'session_mysql.' Setting to null skips setting this entirely (which might be
  1581. * useful if you're doing cross-application sessions, see bug 11381)
  1582. */
  1583. $wgSessionHandler = null;
  1584. /** If enabled, will send MemCached debugging information to $wgDebugLogFile */
  1585. $wgMemCachedDebug = false;
  1586. /** The list of MemCached servers and port numbers */
  1587. $wgMemCachedServers = array( '127.0.0.1:11000' );
  1588. /**
  1589. * Use persistent connections to MemCached, which are shared across multiple
  1590. * requests.
  1591. */
  1592. $wgMemCachedPersistent = false;
  1593. /**
  1594. * Read/write timeout for MemCached server communication, in microseconds.
  1595. */
  1596. $wgMemCachedTimeout = 500000;
  1597. /**
  1598. * Set this to true to make a local copy of the message cache, for use in
  1599. * addition to memcached. The files will be put in $wgCacheDirectory.
  1600. */
  1601. $wgUseLocalMessageCache = false;
  1602. /**
  1603. * Defines format of local cache.
  1604. * - true: Serialized object
  1605. * - false: PHP source file (Warning - security risk)
  1606. */
  1607. $wgLocalMessageCacheSerialized = true;
  1608. /**
  1609. * Instead of caching everything, keep track which messages are requested and
  1610. * load only most used messages. This only makes sense if there is lots of
  1611. * interface messages customised in the wiki (like hundreds in many languages).
  1612. */
  1613. $wgAdaptiveMessageCache = false;
  1614. /**
  1615. * Localisation cache configuration. Associative array with keys:
  1616. * class: The class to use. May be overridden by extensions.
  1617. *
  1618. * store: The location to store cache data. May be 'files', 'db' or
  1619. * 'detect'. If set to "files", data will be in CDB files. If set
  1620. * to "db", data will be stored to the database. If set to
  1621. * "detect", files will be used if $wgCacheDirectory is set,
  1622. * otherwise the database will be used.
  1623. *
  1624. * storeClass: The class name for the underlying storage. If set to a class
  1625. * name, it overrides the "store" setting.
  1626. *
  1627. * storeDirectory: If the store class puts its data in files, this is the
  1628. * directory it will use. If this is false, $wgCacheDirectory
  1629. * will be used.
  1630. *
  1631. * manualRecache: Set this to true to disable cache updates on web requests.
  1632. * Use maintenance/rebuildLocalisationCache.php instead.
  1633. */
  1634. $wgLocalisationCacheConf = array(
  1635. 'class' => 'LocalisationCache',
  1636. 'store' => 'detect',
  1637. 'storeClass' => false,
  1638. 'storeDirectory' => false,
  1639. 'manualRecache' => false,
  1640. );
  1641. /** Allow client-side caching of pages */
  1642. $wgCachePages = true;
  1643. /**
  1644. * Set this to current time to invalidate all prior cached pages. Affects both
  1645. * client-side and server-side caching.
  1646. * You can get the current date on your server by using the command:
  1647. * @verbatim
  1648. * date +%Y%m%d%H%M%S
  1649. * @endverbatim
  1650. */
  1651. $wgCacheEpoch = '20030516000000';
  1652. /**
  1653. * Bump this number when changing the global style sheets and JavaScript.
  1654. *
  1655. * It should be appended in the query string of static CSS and JS includes,
  1656. * to ensure that client-side caches do not keep obsolete copies of global
  1657. * styles.
  1658. */
  1659. $wgStyleVersion = '303';
  1660. /**
  1661. * This will cache static pages for non-logged-in users to reduce
  1662. * database traffic on public sites.
  1663. * Must set $wgShowIPinHeader = false
  1664. * ResourceLoader requests to default language and skins are cached
  1665. * as well as single module requests.
  1666. */
  1667. $wgUseFileCache = false;
  1668. /**
  1669. * Depth of the subdirectory hierarchy to be created under
  1670. * $wgFileCacheDirectory. The subdirectories will be named based on
  1671. * the MD5 hash of the title. A value of 0 means all cache files will
  1672. * be put directly into the main file cache directory.
  1673. */
  1674. $wgFileCacheDepth = 2;
  1675. /**
  1676. * Keep parsed pages in a cache (objectcache table or memcached)
  1677. * to speed up output of the same page viewed by another user with the
  1678. * same options.
  1679. *
  1680. * This can provide a significant speedup for medium to large pages,
  1681. * so you probably want to keep it on. Extensions that conflict with the
  1682. * parser cache should disable the cache on a per-page basis instead.
  1683. */
  1684. $wgEnableParserCache = true;
  1685. /**
  1686. * Append a configured value to the parser cache and the sitenotice key so
  1687. * that they can be kept separate for some class of activity.
  1688. */
  1689. $wgRenderHashAppend = '';
  1690. /**
  1691. * If on, the sidebar navigation links are cached for users with the
  1692. * current language set. This can save a touch of load on a busy site
  1693. * by shaving off extra message lookups.
  1694. *
  1695. * However it is also fragile: changing the site configuration, or
  1696. * having a variable $wgArticlePath, can produce broken links that
  1697. * don't update as expected.
  1698. */
  1699. $wgEnableSidebarCache = false;
  1700. /**
  1701. * Expiry time for the sidebar cache, in seconds
  1702. */
  1703. $wgSidebarCacheExpiry = 86400;
  1704. /**
  1705. * When using the file cache, we can store the cached HTML gzipped to save disk
  1706. * space. Pages will then also be served compressed to clients that support it.
  1707. *
  1708. * Requires zlib support enabled in PHP.
  1709. */
  1710. $wgUseGzip = false;
  1711. /**
  1712. * Whether MediaWiki should send an ETag header. Seems to cause
  1713. * broken behavior with Squid 2.6, see bug 7098.
  1714. */
  1715. $wgUseETag = false;
  1716. /** Clock skew or the one-second resolution of time() can occasionally cause cache
  1717. * problems when the user requests two pages within a short period of time. This
  1718. * variable adds a given number of seconds to vulnerable timestamps, thereby giving
  1719. * a grace period.
  1720. */
  1721. $wgClockSkewFudge = 5;
  1722. /**
  1723. * Invalidate various caches when LocalSettings.php changes. This is equivalent
  1724. * to setting $wgCacheEpoch to the modification time of LocalSettings.php, as
  1725. * was previously done in the default LocalSettings.php file.
  1726. *
  1727. * On high-traffic wikis, this should be set to false, to avoid the need to
  1728. * check the file modification time, and to avoid the performance impact of
  1729. * unnecessary cache invalidations.
  1730. */
  1731. $wgInvalidateCacheOnLocalSettingsChange = true;
  1732. /** @} */ # end of cache settings
  1733. /************************************************************************//**
  1734. * @name HTTP proxy (Squid) settings
  1735. *
  1736. * Many of these settings apply to any HTTP proxy used in front of MediaWiki,
  1737. * although they are referred to as Squid settings for historical reasons.
  1738. *
  1739. * Achieving a high hit ratio with an HTTP proxy requires special
  1740. * configuration. See http://www.mediawiki.org/wiki/Manual:Squid_caching for
  1741. * more details.
  1742. *
  1743. * @{
  1744. */
  1745. /**
  1746. * Enable/disable Squid.
  1747. * See http://www.mediawiki.org/wiki/Manual:Squid_caching
  1748. */
  1749. $wgUseSquid = false;
  1750. /** If you run Squid3 with ESI support, enable this (default:false): */
  1751. $wgUseESI = false;
  1752. /** Send X-Vary-Options header for better caching (requires patched Squid) */
  1753. $wgUseXVO = false;
  1754. /** Add X-Forwarded-Proto to the Vary and X-Vary-Options headers for API
  1755. * requests and RSS/Atom feeds. Use this if you have an SSL termination setup
  1756. * and need to split the cache between HTTP and HTTPS for API requests,
  1757. * feed requests and HTTP redirect responses in order to prevent cache
  1758. * pollution. This does not affect 'normal' requests to index.php other than
  1759. * HTTP redirects.
  1760. */
  1761. $wgVaryOnXFP = false;
  1762. /**
  1763. * Internal server name as known to Squid, if different.
  1764. *
  1765. * @par Example:
  1766. * @code
  1767. * $wgInternalServer = 'http://yourinternal.tld:8000';
  1768. * @endcode
  1769. */
  1770. $wgInternalServer = false;
  1771. /**
  1772. * Cache timeout for the squid, will be sent as s-maxage (without ESI) or
  1773. * Surrogate-Control (with ESI). Without ESI, you should strip out s-maxage in
  1774. * the Squid config. 18000 seconds = 5 hours, more cache hits with 2678400 = 31
  1775. * days
  1776. */
  1777. $wgSquidMaxage = 18000;
  1778. /**
  1779. * Default maximum age for raw CSS/JS accesses
  1780. */
  1781. $wgForcedRawSMaxage = 300;
  1782. /**
  1783. * List of proxy servers to purge on changes; default port is 80. Use IP addresses.
  1784. *
  1785. * When MediaWiki is running behind a proxy, it will trust X-Forwarded-For
  1786. * headers sent/modified from these proxies when obtaining the remote IP address
  1787. *
  1788. * For a list of trusted servers which *aren't* purged, see $wgSquidServersNoPurge.
  1789. */
  1790. $wgSquidServers = array();
  1791. /**
  1792. * As above, except these servers aren't purged on page changes; use to set a
  1793. * list of trusted proxies, etc.
  1794. */
  1795. $wgSquidServersNoPurge = array();
  1796. /** Maximum number of titles to purge in any one client operation */
  1797. $wgMaxSquidPurgeTitles = 400;
  1798. /**
  1799. * Routing configuration for HTCP multicast purging. Add elements here to
  1800. * enable HTCP and determine which purges are sent where. If set to an empty
  1801. * array, HTCP is disabled.
  1802. *
  1803. * Each key in this array is a regular expression to match against the purged
  1804. * URL, or an empty string to match all URLs. The purged URL is matched against
  1805. * the regexes in the order specified, and the first rule whose regex matches
  1806. * is used.
  1807. *
  1808. * Example configuration to send purges for upload.wikimedia.org to one
  1809. * multicast group and all other purges to another:
  1810. * @code
  1811. * $wgHTCPMulticastRouting = array(
  1812. * '|^https?://upload\.wikimedia\.org|' => array(
  1813. * 'host' => '239.128.0.113',
  1814. * 'port' => 4827,
  1815. * ),
  1816. * '' => array(
  1817. * 'host' => '239.128.0.112',
  1818. * 'port' => 4827,
  1819. * ),
  1820. * );
  1821. * @endcode
  1822. *
  1823. * @since 1.20
  1824. *
  1825. * @see $wgHTCPMulticastTTL
  1826. */
  1827. $wgHTCPMulticastRouting = array();
  1828. /**
  1829. * HTCP multicast address. Set this to a multicast IP address to enable HTCP.
  1830. *
  1831. * Note that MediaWiki uses the old non-RFC compliant HTCP format, which was
  1832. * present in the earliest Squid implementations of the protocol.
  1833. *
  1834. * This setting is DEPRECATED in favor of $wgHTCPMulticastRouting , and kept
  1835. * for backwards compatibility only. If $wgHTCPMulticastRouting is set, this
  1836. * setting is ignored. If $wgHTCPMulticastRouting is not set and this setting
  1837. * is, it is used to populate $wgHTCPMulticastRouting.
  1838. *
  1839. * @deprecated in favor of $wgHTCPMulticastRouting
  1840. */
  1841. $wgHTCPMulticastAddress = false;
  1842. /**
  1843. * HTCP multicast port.
  1844. * @deprecated in favor of $wgHTCPMulticastRouting
  1845. * @see $wgHTCPMulticastAddress
  1846. */
  1847. $wgHTCPPort = 4827;
  1848. /**
  1849. * HTCP multicast TTL.
  1850. * @see $wgHTCPMulticastRouting
  1851. */
  1852. $wgHTCPMulticastTTL = 1;
  1853. /** Should forwarded Private IPs be accepted? */
  1854. $wgUsePrivateIPs = false;
  1855. /** @} */ # end of HTTP proxy settings
  1856. /************************************************************************//**
  1857. * @name Language, regional and character encoding settings
  1858. * @{
  1859. */
  1860. /** Site language code, should be one of ./languages/Language(.*).php */
  1861. $wgLanguageCode = 'en';
  1862. /**
  1863. * Some languages need different word forms, usually for different cases.
  1864. * Used in Language::convertGrammar().
  1865. *
  1866. * @par Example:
  1867. * @code
  1868. * $wgGrammarForms['en']['genitive']['car'] = 'car\'s';
  1869. * @endcode
  1870. */
  1871. $wgGrammarForms = array();
  1872. /** Treat language links as magic connectors, not inline links */
  1873. $wgInterwikiMagic = true;
  1874. /** Hide interlanguage links from the sidebar */
  1875. $wgHideInterlanguageLinks = false;
  1876. /** List of language names or overrides for default names in Names.php */
  1877. $wgExtraLanguageNames = array();
  1878. /**
  1879. * List of language codes that don't correspond to an actual language.
  1880. * These codes are mostly leftoffs from renames, or other legacy things.
  1881. * This array makes them not appear as a selectable language on the installer,
  1882. * and excludes them when running the transstat.php script.
  1883. */
  1884. $wgDummyLanguageCodes = array(
  1885. 'als' => 'gsw',
  1886. 'bat-smg' => 'sgs',
  1887. 'be-x-old' => 'be-tarask',
  1888. 'bh' => 'bho',
  1889. 'fiu-vro' => 'vro',
  1890. 'no' => 'nb',
  1891. 'qqq' => 'qqq', # Used for message documentation.
  1892. 'qqx' => 'qqx', # Used for viewing message keys.
  1893. 'roa-rup' => 'rup',
  1894. 'simple' => 'en',
  1895. 'zh-classical' => 'lzh',
  1896. 'zh-min-nan' => 'nan',
  1897. 'zh-yue' => 'yue',
  1898. );
  1899. /**
  1900. * Character set for use in the article edit box. Language-specific encodings
  1901. * may be defined.
  1902. *
  1903. * This historic feature is one of the first that was added by former MediaWiki
  1904. * team leader Brion Vibber, and is used to support the Esperanto x-system.
  1905. */
  1906. $wgEditEncoding = '';
  1907. /**
  1908. * Set this to true to replace Arabic presentation forms with their standard
  1909. * forms in the U+0600-U+06FF block. This only works if $wgLanguageCode is
  1910. * set to "ar".
  1911. *
  1912. * Note that pages with titles containing presentation forms will become
  1913. * inaccessible, run maintenance/cleanupTitles.php to fix this.
  1914. */
  1915. $wgFixArabicUnicode = true;
  1916. /**
  1917. * Set this to true to replace ZWJ-based chillu sequences in Malayalam text
  1918. * with their Unicode 5.1 equivalents. This only works if $wgLanguageCode is
  1919. * set to "ml". Note that some clients (even new clients as of 2010) do not
  1920. * support these characters.
  1921. *
  1922. * If you enable this on an existing wiki, run maintenance/cleanupTitles.php to
  1923. * fix any ZWJ sequences in existing page titles.
  1924. */
  1925. $wgFixMalayalamUnicode = true;
  1926. /**
  1927. * Set this to always convert certain Unicode sequences to modern ones
  1928. * regardless of the content language. This has a small performance
  1929. * impact.
  1930. *
  1931. * See $wgFixArabicUnicode and $wgFixMalayalamUnicode for conversion
  1932. * details.
  1933. *
  1934. * @since 1.17
  1935. */
  1936. $wgAllUnicodeFixes = false;
  1937. /**
  1938. * Set this to eg 'ISO-8859-1' to perform character set conversion when
  1939. * loading old revisions not marked with "utf-8" flag. Use this when
  1940. * converting a wiki from MediaWiki 1.4 or earlier to UTF-8 without the
  1941. * burdensome mass conversion of old text data.
  1942. *
  1943. * @note This DOES NOT touch any fields other than old_text. Titles, comments,
  1944. * user names, etc still must be converted en masse in the database before
  1945. * continuing as a UTF-8 wiki.
  1946. */
  1947. $wgLegacyEncoding = false;
  1948. /**
  1949. * Browser Blacklist for unicode non compliant browsers. Contains a list of
  1950. * regexps : "/regexp/" matching problematic browsers. These browsers will
  1951. * be served encoded unicode in the edit box instead of real unicode.
  1952. */
  1953. $wgBrowserBlackList = array(
  1954. /**
  1955. * Netscape 2-4 detection
  1956. * The minor version may contain strings such as "Gold" or "SGoldC-SGI"
  1957. * Lots of non-netscape user agents have "compatible", so it's useful to check for that
  1958. * with a negative assertion. The [UIN] identifier specifies the level of security
  1959. * in a Netscape/Mozilla browser, checking for it rules out a number of fakers.
  1960. * The language string is unreliable, it is missing on NS4 Mac.
  1961. *
  1962. * Reference: http://www.psychedelix.com/agents/index.shtml
  1963. */
  1964. '/^Mozilla\/2\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
  1965. '/^Mozilla\/3\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
  1966. '/^Mozilla\/4\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
  1967. /**
  1968. * MSIE on Mac OS 9 is teh sux0r, converts þ to <thorn>, ð to <eth>, Þ to <THORN> and Ð to <ETH>
  1969. *
  1970. * Known useragents:
  1971. * - Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
  1972. * - Mozilla/4.0 (compatible; MSIE 5.15; Mac_PowerPC)
  1973. * - Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)
  1974. * - [...]
  1975. *
  1976. * @link http://en.wikipedia.org/w/index.php?title=User%3A%C6var_Arnfj%F6r%F0_Bjarmason%2Ftestme&diff=12356041&oldid=12355864
  1977. * @link http://en.wikipedia.org/wiki/Template%3AOS9
  1978. */
  1979. '/^Mozilla\/4\.0 \(compatible; MSIE \d+\.\d+; Mac_PowerPC\)/',
  1980. /**
  1981. * Google wireless transcoder, seems to eat a lot of chars alive
  1982. * http://it.wikipedia.org/w/index.php?title=Luciano_Ligabue&diff=prev&oldid=8857361
  1983. */
  1984. '/^Mozilla\/4\.0 \(compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;\)/'
  1985. );
  1986. /**
  1987. * If set to true, the MediaWiki 1.4 to 1.5 schema conversion will
  1988. * create stub reference rows in the text table instead of copying
  1989. * the full text of all current entries from 'cur' to 'text'.
  1990. *
  1991. * This will speed up the conversion step for large sites, but
  1992. * requires that the cur table be kept around for those revisions
  1993. * to remain viewable.
  1994. *
  1995. * maintenance/migrateCurStubs.php can be used to complete the
  1996. * migration in the background once the wiki is back online.
  1997. *
  1998. * This option affects the updaters *only*. Any present cur stub
  1999. * revisions will be readable at runtime regardless of this setting.
  2000. */
  2001. $wgLegacySchemaConversion = false;
  2002. /**
  2003. * Enable to allow rewriting dates in page text.
  2004. * DOES NOT FORMAT CORRECTLY FOR MOST LANGUAGES.
  2005. */
  2006. $wgUseDynamicDates = false;
  2007. /**
  2008. * Enable dates like 'May 12' instead of '12 May', this only takes effect if
  2009. * the interface is set to English.
  2010. */
  2011. $wgAmericanDates = false;
  2012. /**
  2013. * For Hindi and Arabic use local numerals instead of Western style (0-9)
  2014. * numerals in interface.
  2015. */
  2016. $wgTranslateNumerals = true;
  2017. /**
  2018. * Translation using MediaWiki: namespace.
  2019. * Interface messages will be loaded from the database.
  2020. */
  2021. $wgUseDatabaseMessages = true;
  2022. /**
  2023. * Expiry time for the message cache key
  2024. */
  2025. $wgMsgCacheExpiry = 86400;
  2026. /**
  2027. * Maximum entry size in the message cache, in bytes
  2028. */
  2029. $wgMaxMsgCacheEntrySize = 10000;
  2030. /** Whether to enable language variant conversion. */
  2031. $wgDisableLangConversion = false;
  2032. /** Whether to enable language variant conversion for links. */
  2033. $wgDisableTitleConversion = false;
  2034. /** Whether to enable cononical language links in meta data. */
  2035. $wgCanonicalLanguageLinks = true;
  2036. /** Default variant code, if false, the default will be the language code */
  2037. $wgDefaultLanguageVariant = false;
  2038. /**
  2039. * Disabled variants array of language variant conversion.
  2040. *
  2041. * @par Example:
  2042. * @code
  2043. * $wgDisabledVariants[] = 'zh-mo';
  2044. * $wgDisabledVariants[] = 'zh-my';
  2045. * @endcode
  2046. */
  2047. $wgDisabledVariants = array();
  2048. /**
  2049. * Like $wgArticlePath, but on multi-variant wikis, this provides a
  2050. * path format that describes which parts of the URL contain the
  2051. * language variant.
  2052. *
  2053. * @par Example:
  2054. * @code
  2055. * $wgLanguageCode = 'sr';
  2056. * $wgVariantArticlePath = '/$2/$1';
  2057. * $wgArticlePath = '/wiki/$1';
  2058. * @endcode
  2059. *
  2060. * A link to /wiki/ would be redirected to /sr/Главна_страна
  2061. *
  2062. * It is important that $wgArticlePath not overlap with possible values
  2063. * of $wgVariantArticlePath.
  2064. */
  2065. $wgVariantArticlePath = false;
  2066. /**
  2067. * Show a bar of language selection links in the user login and user
  2068. * registration forms; edit the "loginlanguagelinks" message to
  2069. * customise these.
  2070. */
  2071. $wgLoginLanguageSelector = false;
  2072. /**
  2073. * When translating messages with wfMessage(), it is not always clear what
  2074. * should be considered UI messages and what should be content messages.
  2075. *
  2076. * For example, for the English Wikipedia, there should be only one 'mainpage',
  2077. * so when getting the link for 'mainpage', we should treat it as site content
  2078. * and call ->inContentLanguage()->text(), but for rendering the text of the
  2079. * link, we call ->text(). The code behaves this way by default. However,
  2080. * sites like the Wikimedia Commons do offer different versions of 'mainpage'
  2081. * and the like for different languages. This array provides a way to override
  2082. * the default behavior.
  2083. *
  2084. * @par Example:
  2085. * To allow language-specific main page and community
  2086. * portal:
  2087. * @code
  2088. * $wgForceUIMsgAsContentMsg = array( 'mainpage', 'portal-url' );
  2089. * @endcode
  2090. */
  2091. $wgForceUIMsgAsContentMsg = array();
  2092. /**
  2093. * Fake out the timezone that the server thinks it's in. This will be used for
  2094. * date display and not for what's stored in the DB. Leave to null to retain
  2095. * your server's OS-based timezone value.
  2096. *
  2097. * This variable is currently used only for signature formatting and for local
  2098. * time/date parser variables ({{LOCALTIME}} etc.)
  2099. *
  2100. * Timezones can be translated by editing MediaWiki messages of type
  2101. * timezone-nameinlowercase like timezone-utc.
  2102. *
  2103. * A list of useable timezones can found at:
  2104. * http://php.net/manual/en/timezones.php
  2105. *
  2106. * @par Examples:
  2107. * @code
  2108. * $wgLocaltimezone = 'UTC';
  2109. * $wgLocaltimezone = 'GMT';
  2110. * $wgLocaltimezone = 'PST8PDT';
  2111. * $wgLocaltimezone = 'Europe/Sweden';
  2112. * $wgLocaltimezone = 'CET';
  2113. * @endcode
  2114. */
  2115. $wgLocaltimezone = null;
  2116. /**
  2117. * Set an offset from UTC in minutes to use for the default timezone setting
  2118. * for anonymous users and new user accounts.
  2119. *
  2120. * This setting is used for most date/time displays in the software, and is
  2121. * overrideable in user preferences. It is *not* used for signature timestamps.
  2122. *
  2123. * By default, this will be set to match $wgLocaltimezone.
  2124. */
  2125. $wgLocalTZoffset = null;
  2126. /**
  2127. * If set to true, this will roll back a few bug fixes introduced in 1.19,
  2128. * emulating the 1.18 behaviour, to avoid introducing bug 34832. In 1.19,
  2129. * language variant conversion is disabled in interface messages. Setting this
  2130. * to true re-enables it.
  2131. *
  2132. * @todo This variable should be removed (implicitly false) in 1.20 or earlier.
  2133. */
  2134. $wgBug34832TransitionalRollback = true;
  2135. /** @} */ # End of language/charset settings
  2136. /*************************************************************************//**
  2137. * @name Output format and skin settings
  2138. * @{
  2139. */
  2140. /** The default Content-Type header. */
  2141. $wgMimeType = 'text/html';
  2142. /**
  2143. * The content type used in script tags. This is mostly going to be ignored if
  2144. * $wgHtml5 is true, at least for actual HTML output, since HTML5 doesn't
  2145. * require a MIME type for JavaScript or CSS (those are the default script and
  2146. * style languages).
  2147. */
  2148. $wgJsMimeType = 'text/javascript';
  2149. /**
  2150. * The HTML document type. Ignored if $wgHtml5 is true, since <!DOCTYPE html>
  2151. * doesn't actually have a doctype part to put this variable's contents in.
  2152. */
  2153. $wgDocType = '-//W3C//DTD XHTML 1.0 Transitional//EN';
  2154. /**
  2155. * The URL of the document type declaration. Ignored if $wgHtml5 is true,
  2156. * since HTML5 has no DTD, and <!DOCTYPE html> doesn't actually have a DTD part
  2157. * to put this variable's contents in.
  2158. */
  2159. $wgDTD = 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd';
  2160. /**
  2161. * The default xmlns attribute. Ignored if $wgHtml5 is true (or it's supposed
  2162. * to be), since we don't currently support XHTML5, and in HTML5 (i.e., served
  2163. * as text/html) the attribute has no effect, so why bother?
  2164. */
  2165. $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml';
  2166. /**
  2167. * Should we output an HTML5 doctype? If false, use XHTML 1.0 Transitional
  2168. * instead, and disable HTML5 features. This may eventually be removed and set
  2169. * to always true. If it's true, a number of other settings will be irrelevant
  2170. * and have no effect.
  2171. */
  2172. $wgHtml5 = true;
  2173. /**
  2174. * Defines the value of the version attribute in the &lt;html&gt; tag, if any.
  2175. * This is ignored if $wgHtml5 is false. If $wgAllowRdfaAttributes and
  2176. * $wgHtml5 are both true, and this evaluates to boolean false (like if it's
  2177. * left at the default null value), it will be auto-initialized to the correct
  2178. * value for RDFa+HTML5. As such, you should have no reason to ever actually
  2179. * set this to anything.
  2180. */
  2181. $wgHtml5Version = null;
  2182. /**
  2183. * Enabled RDFa attributes for use in wikitext.
  2184. * NOTE: Interaction with HTML5 is somewhat underspecified.
  2185. */
  2186. $wgAllowRdfaAttributes = false;
  2187. /**
  2188. * Enabled HTML5 microdata attributes for use in wikitext, if $wgHtml5 is also true.
  2189. */
  2190. $wgAllowMicrodataAttributes = false;
  2191. /**
  2192. * Cleanup as much presentational html like valign -> css vertical-align as we can
  2193. */
  2194. $wgCleanupPresentationalAttributes = true;
  2195. /**
  2196. * Should we try to make our HTML output well-formed XML? If set to false,
  2197. * output will be a few bytes shorter, and the HTML will arguably be more
  2198. * readable. If set to true, life will be much easier for the authors of
  2199. * screen-scraping bots, and the HTML will arguably be more readable.
  2200. *
  2201. * Setting this to false may omit quotation marks on some attributes, omit
  2202. * slashes from some self-closing tags, omit some ending tags, etc., where
  2203. * permitted by HTML5. Setting it to true will not guarantee that all pages
  2204. * will be well-formed, although non-well-formed pages should be rare and it's
  2205. * a bug if you find one. Conversely, setting it to false doesn't mean that
  2206. * all XML-y constructs will be omitted, just that they might be.
  2207. *
  2208. * Because of compatibility with screen-scraping bots, and because it's
  2209. * controversial, this is currently left to true by default.
  2210. */
  2211. $wgWellFormedXml = true;
  2212. /**
  2213. * Permit other namespaces in addition to the w3.org default.
  2214. *
  2215. * Use the prefix for the key and the namespace for the value.
  2216. *
  2217. * @par Example:
  2218. * @code
  2219. * $wgXhtmlNamespaces['svg'] = 'http://www.w3.org/2000/svg';
  2220. * @endCode
  2221. * Normally we wouldn't have to define this in the root "<html>"
  2222. * element, but IE needs it there in some circumstances.
  2223. *
  2224. * This is ignored if $wgHtml5 is true, for the same reason as
  2225. * $wgXhtmlDefaultNamespace.
  2226. */
  2227. $wgXhtmlNamespaces = array();
  2228. /**
  2229. * Show IP address, for non-logged in users. It's necessary to switch this off
  2230. * for some forms of caching.
  2231. * @warning Will disable file cache.
  2232. */
  2233. $wgShowIPinHeader = true;
  2234. /**
  2235. * Site notice shown at the top of each page
  2236. *
  2237. * MediaWiki:Sitenotice page, which will override this. You can also
  2238. * provide a separate message for logged-out users using the
  2239. * MediaWiki:Anonnotice page.
  2240. */
  2241. $wgSiteNotice = '';
  2242. /**
  2243. * A subtitle to add to the tagline, for skins that have it/
  2244. */
  2245. $wgExtraSubtitle = '';
  2246. /**
  2247. * If this is set, a "donate" link will appear in the sidebar. Set it to a URL.
  2248. */
  2249. $wgSiteSupportPage = '';
  2250. /**
  2251. * Validate the overall output using tidy and refuse
  2252. * to display the page if it's not valid.
  2253. */
  2254. $wgValidateAllHtml = false;
  2255. /**
  2256. * Default skin, for new users and anonymous visitors. Registered users may
  2257. * change this to any one of the other available skins in their preferences.
  2258. * This has to be completely lowercase; see the "skins" directory for the list
  2259. * of available skins.
  2260. */
  2261. $wgDefaultSkin = 'vector';
  2262. /**
  2263. * Specify the name of a skin that should not be presented in the list of
  2264. * available skins. Use for blacklisting a skin which you do not want to
  2265. * remove from the .../skins/ directory
  2266. */
  2267. $wgSkipSkin = '';
  2268. /** Array for more like $wgSkipSkin. */
  2269. $wgSkipSkins = array();
  2270. /**
  2271. * Optionally, we can specify a stylesheet to use for media="handheld".
  2272. * This is recognized by some, but not all, handheld/mobile/PDA browsers.
  2273. * If left empty, compliant handheld browsers won't pick up the skin
  2274. * stylesheet, which is specified for 'screen' media.
  2275. *
  2276. * Can be a complete URL, base-relative path, or $wgStylePath-relative path.
  2277. * Try 'chick/main.css' to apply the Chick styles to the MonoBook HTML.
  2278. *
  2279. * Will also be switched in when 'handheld=yes' is added to the URL, like
  2280. * the 'printable=yes' mode for print media.
  2281. */
  2282. $wgHandheldStyle = false;
  2283. /**
  2284. * If set, 'screen' and 'handheld' media specifiers for stylesheets are
  2285. * transformed such that they apply to the iPhone/iPod Touch Mobile Safari,
  2286. * which doesn't recognize 'handheld' but does support media queries on its
  2287. * screen size.
  2288. *
  2289. * Consider only using this if you have a *really good* handheld stylesheet,
  2290. * as iPhone users won't have any way to disable it and use the "grown-up"
  2291. * styles instead.
  2292. */
  2293. $wgHandheldForIPhone = false;
  2294. /**
  2295. * Allow user Javascript page?
  2296. * This enables a lot of neat customizations, but may
  2297. * increase security risk to users and server load.
  2298. */
  2299. $wgAllowUserJs = false;
  2300. /**
  2301. * Allow user Cascading Style Sheets (CSS)?
  2302. * This enables a lot of neat customizations, but may
  2303. * increase security risk to users and server load.
  2304. */
  2305. $wgAllowUserCss = false;
  2306. /**
  2307. * Allow user-preferences implemented in CSS?
  2308. * This allows users to customise the site appearance to a greater
  2309. * degree; disabling it will improve page load times.
  2310. */
  2311. $wgAllowUserCssPrefs = true;
  2312. /** Use the site's Javascript page? */
  2313. $wgUseSiteJs = true;
  2314. /** Use the site's Cascading Style Sheets (CSS)? */
  2315. $wgUseSiteCss = true;
  2316. /**
  2317. * Break out of framesets. This can be used to prevent clickjacking attacks,
  2318. * or to prevent external sites from framing your site with ads.
  2319. */
  2320. $wgBreakFrames = false;
  2321. /**
  2322. * The X-Frame-Options header to send on pages sensitive to clickjacking
  2323. * attacks, such as edit pages. This prevents those pages from being displayed
  2324. * in a frame or iframe. The options are:
  2325. *
  2326. * - 'DENY': Do not allow framing. This is recommended for most wikis.
  2327. *
  2328. * - 'SAMEORIGIN': Allow framing by pages on the same domain. This can be used
  2329. * to allow framing within a trusted domain. This is insecure if there
  2330. * is a page on the same domain which allows framing of arbitrary URLs.
  2331. *
  2332. * - false: Allow all framing. This opens up the wiki to XSS attacks and thus
  2333. * full compromise of local user accounts. Private wikis behind a
  2334. * corporate firewall are especially vulnerable. This is not
  2335. * recommended.
  2336. *
  2337. * For extra safety, set $wgBreakFrames = true, to prevent framing on all pages,
  2338. * not just edit pages.
  2339. */
  2340. $wgEditPageFrameOptions = 'DENY';
  2341. /**
  2342. * Disallow framing of API pages directly, by setting the X-Frame-Options
  2343. * header. Since the API returns CSRF tokens, allowing the results to be
  2344. * framed can compromise your user's account security.
  2345. * Options are:
  2346. * - 'DENY': Do not allow framing. This is recommended for most wikis.
  2347. * - 'SAMEORIGIN': Allow framing by pages on the same domain.
  2348. * - false: Allow all framing.
  2349. */
  2350. $wgApiFrameOptions = 'DENY';
  2351. /**
  2352. * Disable output compression (enabled by default if zlib is available)
  2353. */
  2354. $wgDisableOutputCompression = false;
  2355. /**
  2356. * Should we allow a broader set of characters in id attributes, per HTML5? If
  2357. * not, use only HTML 4-compatible IDs. This option is for testing -- when the
  2358. * functionality is ready, it will be on by default with no option.
  2359. *
  2360. * Currently this appears to work fine in all browsers, but it's disabled by
  2361. * default because it normalizes id's a bit too aggressively, breaking preexisting
  2362. * content (particularly Cite). See bug 27733, bug 27694, bug 27474.
  2363. */
  2364. $wgExperimentalHtmlIds = false;
  2365. /**
  2366. * Abstract list of footer icons for skins in place of old copyrightico and poweredbyico code
  2367. * You can add new icons to the built in copyright or poweredby, or you can create
  2368. * a new block. Though note that you may need to add some custom css to get good styling
  2369. * of new blocks in monobook. vector and modern should work without any special css.
  2370. *
  2371. * $wgFooterIcons itself is a key/value array.
  2372. * The key is the name of a block that the icons will be wrapped in. The final id varies
  2373. * by skin; Monobook and Vector will turn poweredby into f-poweredbyico while Modern
  2374. * turns it into mw_poweredby.
  2375. * The value is either key/value array of icons or a string.
  2376. * In the key/value array the key may or may not be used by the skin but it can
  2377. * be used to find the icon and unset it or change the icon if needed.
  2378. * This is useful for disabling icons that are set by extensions.
  2379. * The value should be either a string or an array. If it is a string it will be output
  2380. * directly as html, however some skins may choose to ignore it. An array is the preferred format
  2381. * for the icon, the following keys are used:
  2382. * - src: An absolute url to the image to use for the icon, this is recommended
  2383. * but not required, however some skins will ignore icons without an image
  2384. * - url: The url to use in the a element arround the text or icon, if not set an a element will not be outputted
  2385. * - alt: This is the text form of the icon, it will be displayed without an image in
  2386. * skins like Modern or if src is not set, and will otherwise be used as
  2387. * the alt="" for the image. This key is required.
  2388. * - width and height: If the icon specified by src is not of the standard size
  2389. * you can specify the size of image to use with these keys.
  2390. * Otherwise they will default to the standard 88x31.
  2391. * @todo Reformat documentation.
  2392. */
  2393. $wgFooterIcons = array(
  2394. "copyright" => array(
  2395. "copyright" => array(), // placeholder for the built in copyright icon
  2396. ),
  2397. "poweredby" => array(
  2398. "mediawiki" => array(
  2399. "src" => null, // Defaults to "$wgStylePath/common/images/poweredby_mediawiki_88x31.png"
  2400. "url" => "//www.mediawiki.org/",
  2401. "alt" => "Powered by MediaWiki",
  2402. )
  2403. ),
  2404. );
  2405. /**
  2406. * Login / create account link behavior when it's possible for anonymous users
  2407. * to create an account.
  2408. * - true = use a combined login / create account link
  2409. * - false = split login and create account into two separate links
  2410. */
  2411. $wgUseCombinedLoginLink = false;
  2412. /**
  2413. * Search form look for Vector skin only.
  2414. * - true = use an icon search button
  2415. * - false = use Go & Search buttons
  2416. */
  2417. $wgVectorUseSimpleSearch = false;
  2418. /**
  2419. * Watch and unwatch as an icon rather than a link for Vector skin only.
  2420. * - true = use an icon watch/unwatch button
  2421. * - false = use watch/unwatch text link
  2422. */
  2423. $wgVectorUseIconWatch = false;
  2424. /**
  2425. * Display user edit counts in various prominent places.
  2426. */
  2427. $wgEdititis = false;
  2428. /**
  2429. * Better directionality support (bug 6100 and related).
  2430. * Removed in 1.18, still kept here for LiquidThreads backwards compatibility.
  2431. *
  2432. * @deprecated since 1.18
  2433. */
  2434. $wgBetterDirectionality = true;
  2435. /**
  2436. * Some web hosts attempt to rewrite all responses with a 404 (not found)
  2437. * status code, mangling or hiding MediaWiki's output. If you are using such a
  2438. * host, you should start looking for a better one. While you're doing that,
  2439. * set this to false to convert some of MediaWiki's 404 responses to 200 so
  2440. * that the generated error pages can be seen.
  2441. *
  2442. * In cases where for technical reasons it is more important for MediaWiki to
  2443. * send the correct status code than for the body to be transmitted intact,
  2444. * this configuration variable is ignored.
  2445. */
  2446. $wgSend404Code = true;
  2447. /**
  2448. * The $wgShowRollbackEditCount variable is used to show how many edits will be
  2449. * rollback. The numeric value of the varible are the limit up to are counted.
  2450. * If the value is false or 0, the edits are not counted.
  2451. *
  2452. * @since 1.20
  2453. */
  2454. $wgShowRollbackEditCount = 10;
  2455. /** @} */ # End of output format settings }
  2456. /*************************************************************************//**
  2457. * @name Resource loader settings
  2458. * @{
  2459. */
  2460. /**
  2461. * Client-side resource modules.
  2462. *
  2463. * Extensions should add their resource loader module definitions
  2464. * to the $wgResourceModules variable.
  2465. *
  2466. * @par Example:
  2467. * @code
  2468. * $wgResourceModules['ext.myExtension'] = array(
  2469. * 'scripts' => 'myExtension.js',
  2470. * 'styles' => 'myExtension.css',
  2471. * 'dependencies' => array( 'jquery.cookie', 'jquery.tabIndex' ),
  2472. * 'localBasePath' => __DIR__,
  2473. * 'remoteExtPath' => 'MyExtension',
  2474. * );
  2475. * @endcode
  2476. */
  2477. $wgResourceModules = array();
  2478. /**
  2479. * Extensions should register foreign module sources here. 'local' is a
  2480. * built-in source that is not in this array, but defined by
  2481. * ResourceLoader::__construct() so that it cannot be unset.
  2482. *
  2483. * @par Example:
  2484. * @code
  2485. * $wgResourceLoaderSources['foo'] = array(
  2486. * 'loadScript' => 'http://example.org/w/load.php',
  2487. * 'apiScript' => 'http://example.org/w/api.php'
  2488. * );
  2489. * @endcode
  2490. */
  2491. $wgResourceLoaderSources = array();
  2492. /**
  2493. * Default 'remoteBasePath' value for instances of ResourceLoaderFileModule.
  2494. * If not set, then $wgScriptPath will be used as a fallback.
  2495. */
  2496. $wgResourceBasePath = null;
  2497. /**
  2498. * Maximum time in seconds to cache resources served by the resource loader.
  2499. *
  2500. * @todo Document array structure
  2501. */
  2502. $wgResourceLoaderMaxage = array(
  2503. 'versioned' => array(
  2504. // Squid/Varnish but also any other public proxy cache between the client and MediaWiki
  2505. 'server' => 30 * 24 * 60 * 60, // 30 days
  2506. // On the client side (e.g. in the browser cache).
  2507. 'client' => 30 * 24 * 60 * 60, // 30 days
  2508. ),
  2509. 'unversioned' => array(
  2510. 'server' => 5 * 60, // 5 minutes
  2511. 'client' => 5 * 60, // 5 minutes
  2512. ),
  2513. );
  2514. /**
  2515. * The default debug mode (on/off) for of ResourceLoader requests.
  2516. *
  2517. * This will still be overridden when the debug URL parameter is used.
  2518. */
  2519. $wgResourceLoaderDebug = false;
  2520. /**
  2521. * Enable embedding of certain resources using Edge Side Includes. This will
  2522. * improve performance but only works if there is something in front of the
  2523. * web server (e..g a Squid or Varnish server) configured to process the ESI.
  2524. */
  2525. $wgResourceLoaderUseESI = false;
  2526. /**
  2527. * Put each statement on its own line when minifying JavaScript. This makes
  2528. * debugging in non-debug mode a bit easier.
  2529. */
  2530. $wgResourceLoaderMinifierStatementsOnOwnLine = false;
  2531. /**
  2532. * Maximum line length when minifying JavaScript. This is not a hard maximum:
  2533. * the minifier will try not to produce lines longer than this, but may be
  2534. * forced to do so in certain cases.
  2535. */
  2536. $wgResourceLoaderMinifierMaxLineLength = 1000;
  2537. /**
  2538. * Whether to include the mediawiki.legacy JS library (old wikibits.js), and its
  2539. * dependencies.
  2540. */
  2541. $wgIncludeLegacyJavaScript = true;
  2542. /**
  2543. * Whether to preload the mediawiki.util module as blocking module in the top
  2544. * queue.
  2545. *
  2546. * Before MediaWiki 1.19, modules used to load slower/less asynchronous which
  2547. * allowed modules to lack dependencies on 'popular' modules that were likely
  2548. * loaded already.
  2549. *
  2550. * This setting is to aid scripts during migration by providing mediawiki.util
  2551. * unconditionally (which was the most commonly missed dependency).
  2552. * It doesn't cover all missing dependencies obviously but should fix most of
  2553. * them.
  2554. *
  2555. * This should be removed at some point after site/user scripts have been fixed.
  2556. * Enable this if your wiki has a large amount of user/site scripts that are
  2557. * lacking dependencies.
  2558. * @todo Deprecate
  2559. */
  2560. $wgPreloadJavaScriptMwUtil = false;
  2561. /**
  2562. * Whether or not to assign configuration variables to the global window object.
  2563. *
  2564. * If this is set to false, old code using deprecated variables will no longer
  2565. * work.
  2566. *
  2567. * @par Example of legacy code:
  2568. * @code{,js}
  2569. * if ( window.wgRestrictionEdit ) { ... }
  2570. * @endcode
  2571. * or:
  2572. * @code{,js}
  2573. * if ( wgIsArticle ) { ... }
  2574. * @endcode
  2575. *
  2576. * Instead, one needs to use mw.config.
  2577. * @par Example using mw.config global configuration:
  2578. * @code{,js}
  2579. * if ( mw.config.exists('wgRestrictionEdit') ) { ... }
  2580. * @endcode
  2581. * or:
  2582. * @code{,js}
  2583. * if ( mw.config.get('wgIsArticle') ) { ... }
  2584. * @endcode
  2585. */
  2586. $wgLegacyJavaScriptGlobals = true;
  2587. /**
  2588. * If set to a positive number, ResourceLoader will not generate URLs whose
  2589. * query string is more than this many characters long, and will instead use
  2590. * multiple requests with shorter query strings. This degrades performance,
  2591. * but may be needed if your web server has a low (less than, say 1024)
  2592. * query string length limit or a low value for suhosin.get.max_value_length
  2593. * that you can't increase.
  2594. *
  2595. * If set to a negative number, ResourceLoader will assume there is no query
  2596. * string length limit.
  2597. */
  2598. $wgResourceLoaderMaxQueryLength = -1;
  2599. /**
  2600. * If set to true, JavaScript modules loaded from wiki pages will be parsed
  2601. * prior to minification to validate it.
  2602. *
  2603. * Parse errors will result in a JS exception being thrown during module load,
  2604. * which avoids breaking other modules loaded in the same request.
  2605. */
  2606. $wgResourceLoaderValidateJS = true;
  2607. /**
  2608. * If set to true, statically-sourced (file-backed) JavaScript resources will
  2609. * be parsed for validity before being bundled up into ResourceLoader modules.
  2610. *
  2611. * This can be helpful for development by providing better error messages in
  2612. * default (non-debug) mode, but JavaScript parsing is slow and memory hungry
  2613. * and may fail on large pre-bundled frameworks.
  2614. */
  2615. $wgResourceLoaderValidateStaticJS = false;
  2616. /**
  2617. * If set to true, asynchronous loading of bottom-queue scripts in the "<head>"
  2618. * will be enabled. This is an experimental feature that's supposed to make
  2619. * JavaScript load faster.
  2620. */
  2621. $wgResourceLoaderExperimentalAsyncLoading = false;
  2622. /** @} */ # End of resource loader settings }
  2623. /*************************************************************************//**
  2624. * @name Page title and interwiki link settings
  2625. * @{
  2626. */
  2627. /**
  2628. * Name of the project namespace. If left set to false, $wgSitename will be
  2629. * used instead.
  2630. */
  2631. $wgMetaNamespace = false;
  2632. /**
  2633. * Name of the project talk namespace.
  2634. *
  2635. * Normally you can ignore this and it will be something like
  2636. * $wgMetaNamespace . "_talk". In some languages, you may want to set this
  2637. * manually for grammatical reasons.
  2638. */
  2639. $wgMetaNamespaceTalk = false;
  2640. /**
  2641. * Additional namespaces. If the namespaces defined in Language.php and
  2642. * Namespace.php are insufficient, you can create new ones here, for example,
  2643. * to import Help files in other languages. You can also override the namespace
  2644. * names of existing namespaces. Extensions developers should use
  2645. * $wgCanonicalNamespaceNames.
  2646. *
  2647. * @warning Once you delete a namespace, the pages in that namespace will
  2648. * no longer be accessible. If you rename it, then you can access them through
  2649. * the new namespace name.
  2650. *
  2651. * Custom namespaces should start at 100 to avoid conflicting with standard
  2652. * namespaces, and should always follow the even/odd main/talk pattern.
  2653. *
  2654. * @par Example:
  2655. * @code
  2656. * $wgExtraNamespaces = array(
  2657. * 100 => "Hilfe",
  2658. * 101 => "Hilfe_Diskussion",
  2659. * 102 => "Aide",
  2660. * 103 => "Discussion_Aide"
  2661. * );
  2662. * @endcode
  2663. *
  2664. * @todo Add a note about maintenance/namespaceDupes.php
  2665. */
  2666. $wgExtraNamespaces = array();
  2667. /**
  2668. * Same as above, but for namespaces with gender distinction.
  2669. * Note: the default form for the namespace should also be set
  2670. * using $wgExtraNamespaces for the same index.
  2671. * @since 1.18
  2672. */
  2673. $wgExtraGenderNamespaces = array();
  2674. /**
  2675. * Namespace aliases.
  2676. *
  2677. * These are alternate names for the primary localised namespace names, which
  2678. * are defined by $wgExtraNamespaces and the language file. If a page is
  2679. * requested with such a prefix, the request will be redirected to the primary
  2680. * name.
  2681. *
  2682. * Set this to a map from namespace names to IDs.
  2683. *
  2684. * @par Example:
  2685. * @code
  2686. * $wgNamespaceAliases = array(
  2687. * 'Wikipedian' => NS_USER,
  2688. * 'Help' => 100,
  2689. * );
  2690. * @endcode
  2691. */
  2692. $wgNamespaceAliases = array();
  2693. /**
  2694. * Allowed title characters -- regex character class
  2695. * Don't change this unless you know what you're doing
  2696. *
  2697. * Problematic punctuation:
  2698. * - []{}|# Are needed for link syntax, never enable these
  2699. * - <> Causes problems with HTML escaping, don't use
  2700. * - % Enabled by default, minor problems with path to query rewrite rules, see below
  2701. * - + Enabled by default, but doesn't work with path to query rewrite rules, corrupted by apache
  2702. * - ? Enabled by default, but doesn't work with path to PATH_INFO rewrites
  2703. *
  2704. * All three of these punctuation problems can be avoided by using an alias,
  2705. * instead of a rewrite rule of either variety.
  2706. *
  2707. * The problem with % is that when using a path to query rewrite rule, URLs are
  2708. * double-unescaped: once by Apache's path conversion code, and again by PHP. So
  2709. * %253F, for example, becomes "?". Our code does not double-escape to compensate
  2710. * for this, indeed double escaping would break if the double-escaped title was
  2711. * passed in the query string rather than the path. This is a minor security issue
  2712. * because articles can be created such that they are hard to view or edit.
  2713. *
  2714. * In some rare cases you may wish to remove + for compatibility with old links.
  2715. *
  2716. * Theoretically 0x80-0x9F of ISO 8859-1 should be disallowed, but
  2717. * this breaks interlanguage links
  2718. */
  2719. $wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+";
  2720. /**
  2721. * The interwiki prefix of the current wiki, or false if it doesn't have one.
  2722. */
  2723. $wgLocalInterwiki = false;
  2724. /**
  2725. * Expiry time for cache of interwiki table
  2726. */
  2727. $wgInterwikiExpiry = 10800;
  2728. /**
  2729. * @name Interwiki caching settings.
  2730. * @{
  2731. */
  2732. /**
  2733. *$wgInterwikiCache specifies path to constant database file.
  2734. *
  2735. * This cdb database is generated by dumpInterwiki from maintenance and has
  2736. * such key formats:
  2737. * - dbname:key - a simple key (e.g. enwiki:meta)
  2738. * - _sitename:key - site-scope key (e.g. wiktionary:meta)
  2739. * - __global:key - global-scope key (e.g. __global:meta)
  2740. * - __sites:dbname - site mapping (e.g. __sites:enwiki)
  2741. *
  2742. * Sites mapping just specifies site name, other keys provide "local url"
  2743. * data layout.
  2744. */
  2745. $wgInterwikiCache = false;
  2746. /**
  2747. * Specify number of domains to check for messages.
  2748. * - 1: Just wiki(db)-level
  2749. * - 2: wiki and global levels
  2750. * - 3: site levels
  2751. */
  2752. $wgInterwikiScopes = 3;
  2753. /**
  2754. * $wgInterwikiFallbackSite - if unable to resolve from cache
  2755. */
  2756. $wgInterwikiFallbackSite = 'wiki';
  2757. /** @} */ # end of Interwiki caching settings.
  2758. /**
  2759. * If local interwikis are set up which allow redirects,
  2760. * set this regexp to restrict URLs which will be displayed
  2761. * as 'redirected from' links.
  2762. *
  2763. * @par Example:
  2764. * It might look something like this:
  2765. * @code
  2766. * $wgRedirectSources = '!^https?://[a-z-]+\.wikipedia\.org/!';
  2767. * @endcode
  2768. *
  2769. * Leave at false to avoid displaying any incoming redirect markers.
  2770. * This does not affect intra-wiki redirects, which don't change
  2771. * the URL.
  2772. */
  2773. $wgRedirectSources = false;
  2774. /**
  2775. * Set this to false to avoid forcing the first letter of links to capitals.
  2776. *
  2777. * @warning may break links! This makes links COMPLETELY case-sensitive. Links
  2778. * appearing with a capital at the beginning of a sentence will *not* go to the
  2779. * same place as links in the middle of a sentence using a lowercase initial.
  2780. */
  2781. $wgCapitalLinks = true;
  2782. /**
  2783. * @since 1.16 - This can now be set per-namespace. Some special namespaces (such
  2784. * as Special, see MWNamespace::$alwaysCapitalizedNamespaces for the full list) must be
  2785. * true by default (and setting them has no effect), due to various things that
  2786. * require them to be so. Also, since Talk namespaces need to directly mirror their
  2787. * associated content namespaces, the values for those are ignored in favor of the
  2788. * subject namespace's setting. Setting for NS_MEDIA is taken automatically from
  2789. * NS_FILE.
  2790. *
  2791. * @par Example:
  2792. * @code
  2793. * $wgCapitalLinkOverrides[ NS_FILE ] = false;
  2794. * @endcode
  2795. */
  2796. $wgCapitalLinkOverrides = array();
  2797. /** Which namespaces should support subpages?
  2798. * See Language.php for a list of namespaces.
  2799. */
  2800. $wgNamespacesWithSubpages = array(
  2801. NS_TALK => true,
  2802. NS_USER => true,
  2803. NS_USER_TALK => true,
  2804. NS_PROJECT_TALK => true,
  2805. NS_FILE_TALK => true,
  2806. NS_MEDIAWIKI => true,
  2807. NS_MEDIAWIKI_TALK => true,
  2808. NS_TEMPLATE_TALK => true,
  2809. NS_HELP_TALK => true,
  2810. NS_CATEGORY_TALK => true
  2811. );
  2812. /**
  2813. * Array of namespaces which can be deemed to contain valid "content", as far
  2814. * as the site statistics are concerned. Useful if additional namespaces also
  2815. * contain "content" which should be considered when generating a count of the
  2816. * number of articles in the wiki.
  2817. */
  2818. $wgContentNamespaces = array( NS_MAIN );
  2819. /**
  2820. * Max number of redirects to follow when resolving redirects.
  2821. * 1 means only the first redirect is followed (default behavior).
  2822. * 0 or less means no redirects are followed.
  2823. */
  2824. $wgMaxRedirects = 1;
  2825. /**
  2826. * Array of invalid page redirect targets.
  2827. * Attempting to create a redirect to any of the pages in this array
  2828. * will make the redirect fail.
  2829. * Userlogout is hard-coded, so it does not need to be listed here.
  2830. * (bug 10569) Disallow Mypage and Mytalk as well.
  2831. *
  2832. * As of now, this only checks special pages. Redirects to pages in
  2833. * other namespaces cannot be invalidated by this variable.
  2834. */
  2835. $wgInvalidRedirectTargets = array( 'Filepath', 'Mypage', 'Mytalk' );
  2836. /** @} */ # End of title and interwiki settings }
  2837. /************************************************************************//**
  2838. * @name Parser settings
  2839. * These settings configure the transformation from wikitext to HTML.
  2840. * @{
  2841. */
  2842. /**
  2843. * Parser configuration. Associative array with the following members:
  2844. *
  2845. * class The class name
  2846. *
  2847. * preprocessorClass The preprocessor class. Two classes are currently available:
  2848. * Preprocessor_Hash, which uses plain PHP arrays for tempoarary
  2849. * storage, and Preprocessor_DOM, which uses the DOM module for
  2850. * temporary storage. Preprocessor_DOM generally uses less memory;
  2851. * the speed of the two is roughly the same.
  2852. *
  2853. * If this parameter is not given, it uses Preprocessor_DOM if the
  2854. * DOM module is available, otherwise it uses Preprocessor_Hash.
  2855. *
  2856. * The entire associative array will be passed through to the constructor as
  2857. * the first parameter. Note that only Setup.php can use this variable --
  2858. * the configuration will change at runtime via $wgParser member functions, so
  2859. * the contents of this variable will be out-of-date. The variable can only be
  2860. * changed during LocalSettings.php, in particular, it can't be changed during
  2861. * an extension setup function.
  2862. */
  2863. $wgParserConf = array(
  2864. 'class' => 'Parser',
  2865. #'preprocessorClass' => 'Preprocessor_Hash',
  2866. );
  2867. /** Maximum indent level of toc. */
  2868. $wgMaxTocLevel = 999;
  2869. /**
  2870. * A complexity limit on template expansion: the maximum number of nodes visited
  2871. * by PPFrame::expand()
  2872. */
  2873. $wgMaxPPNodeCount = 1000000;
  2874. /**
  2875. * A complexity limit on template expansion: the maximum number of nodes
  2876. * generated by Preprocessor::preprocessToObj()
  2877. */
  2878. $wgMaxGeneratedPPNodeCount = 1000000;
  2879. /**
  2880. * Maximum recursion depth for templates within templates.
  2881. * The current parser adds two levels to the PHP call stack for each template,
  2882. * and xdebug limits the call stack to 100 by default. So this should hopefully
  2883. * stop the parser before it hits the xdebug limit.
  2884. */
  2885. $wgMaxTemplateDepth = 40;
  2886. /** @see $wgMaxTemplateDepth */
  2887. $wgMaxPPExpandDepth = 40;
  2888. /** The external URL protocols */
  2889. $wgUrlProtocols = array(
  2890. 'http://',
  2891. 'https://',
  2892. 'ftp://',
  2893. 'irc://',
  2894. 'ircs://', // @bug 28503
  2895. 'gopher://',
  2896. 'telnet://', // Well if we're going to support the above.. -ævar
  2897. 'nntp://', // @bug 3808 RFC 1738
  2898. 'worldwind://',
  2899. 'mailto:',
  2900. 'news:',
  2901. 'svn://',
  2902. 'git://',
  2903. 'mms://',
  2904. '//', // for protocol-relative URLs
  2905. );
  2906. /**
  2907. * If true, removes (substitutes) templates in "~~~~" signatures.
  2908. */
  2909. $wgCleanSignatures = true;
  2910. /** Whether to allow inline image pointing to other websites */
  2911. $wgAllowExternalImages = false;
  2912. /**
  2913. * If the above is false, you can specify an exception here. Image URLs
  2914. * that start with this string are then rendered, while all others are not.
  2915. * You can use this to set up a trusted, simple repository of images.
  2916. * You may also specify an array of strings to allow multiple sites
  2917. *
  2918. * @par Examples:
  2919. * @code
  2920. * $wgAllowExternalImagesFrom = 'http://127.0.0.1/';
  2921. * $wgAllowExternalImagesFrom = array( 'http://127.0.0.1/', 'http://example.com' );
  2922. * @endcode
  2923. */
  2924. $wgAllowExternalImagesFrom = '';
  2925. /** If $wgAllowExternalImages is false, you can allow an on-wiki
  2926. * whitelist of regular expression fragments to match the image URL
  2927. * against. If the image matches one of the regular expression fragments,
  2928. * The image will be displayed.
  2929. *
  2930. * Set this to true to enable the on-wiki whitelist (MediaWiki:External image whitelist)
  2931. * Or false to disable it
  2932. */
  2933. $wgEnableImageWhitelist = true;
  2934. /**
  2935. * A different approach to the above: simply allow the "<img>" tag to be used.
  2936. * This allows you to specify alt text and other attributes, copy-paste HTML to
  2937. * your wiki more easily, etc. However, allowing external images in any manner
  2938. * will allow anyone with editing rights to snoop on your visitors' IP
  2939. * addresses and so forth, if they wanted to, by inserting links to images on
  2940. * sites they control.
  2941. */
  2942. $wgAllowImageTag = false;
  2943. /**
  2944. * $wgUseTidy: use tidy to make sure HTML output is sane.
  2945. * Tidy is a free tool that fixes broken HTML.
  2946. * See http://www.w3.org/People/Raggett/tidy/
  2947. *
  2948. * - $wgTidyBin should be set to the path of the binary and
  2949. * - $wgTidyConf to the path of the configuration file.
  2950. * - $wgTidyOpts can include any number of parameters.
  2951. * - $wgTidyInternal controls the use of the PECL extension or the
  2952. * libtidy (PHP >= 5) extension to use an in-process tidy library instead
  2953. * of spawning a separate program.
  2954. * Normally you shouldn't need to override the setting except for
  2955. * debugging. To install, use 'pear install tidy' and add a line
  2956. * 'extension=tidy.so' to php.ini.
  2957. */
  2958. $wgUseTidy = false;
  2959. /** @see $wgUseTidy */
  2960. $wgAlwaysUseTidy = false;
  2961. /** @see $wgUseTidy */
  2962. $wgTidyBin = 'tidy';
  2963. /** @see $wgUseTidy */
  2964. $wgTidyConf = $IP.'/includes/tidy.conf';
  2965. /** @see $wgUseTidy */
  2966. $wgTidyOpts = '';
  2967. /** @see $wgUseTidy */
  2968. $wgTidyInternal = extension_loaded( 'tidy' );
  2969. /**
  2970. * Put tidy warnings in HTML comments
  2971. * Only works for internal tidy.
  2972. */
  2973. $wgDebugTidy = false;
  2974. /** Allow raw, unchecked HTML in "<html>...</html>" sections.
  2975. * THIS IS VERY DANGEROUS on a publicly editable site, so USE wgGroupPermissions
  2976. * TO RESTRICT EDITING to only those that you trust
  2977. */
  2978. $wgRawHtml = false;
  2979. /**
  2980. * Set a default target for external links, e.g. _blank to pop up a new window
  2981. */
  2982. $wgExternalLinkTarget = false;
  2983. /**
  2984. * If true, external URL links in wiki text will be given the
  2985. * rel="nofollow" attribute as a hint to search engines that
  2986. * they should not be followed for ranking purposes as they
  2987. * are user-supplied and thus subject to spamming.
  2988. */
  2989. $wgNoFollowLinks = true;
  2990. /**
  2991. * Namespaces in which $wgNoFollowLinks doesn't apply.
  2992. * See Language.php for a list of namespaces.
  2993. */
  2994. $wgNoFollowNsExceptions = array();
  2995. /**
  2996. * If this is set to an array of domains, external links to these domain names
  2997. * (or any subdomains) will not be set to rel="nofollow" regardless of the
  2998. * value of $wgNoFollowLinks. For instance:
  2999. *
  3000. * $wgNoFollowDomainExceptions = array( 'en.wikipedia.org', 'wiktionary.org' );
  3001. *
  3002. * This would add rel="nofollow" to links to de.wikipedia.org, but not
  3003. * en.wikipedia.org, wiktionary.org, en.wiktionary.org, us.en.wikipedia.org,
  3004. * etc.
  3005. */
  3006. $wgNoFollowDomainExceptions = array();
  3007. /**
  3008. * Allow DISPLAYTITLE to change title display
  3009. */
  3010. $wgAllowDisplayTitle = true;
  3011. /**
  3012. * For consistency, restrict DISPLAYTITLE to titles that normalize to the same
  3013. * canonical DB key.
  3014. */
  3015. $wgRestrictDisplayTitle = true;
  3016. /**
  3017. * Maximum number of calls per parse to expensive parser functions such as
  3018. * PAGESINCATEGORY.
  3019. */
  3020. $wgExpensiveParserFunctionLimit = 100;
  3021. /**
  3022. * Preprocessor caching threshold
  3023. * Setting it to 'false' will disable the preprocessor cache.
  3024. */
  3025. $wgPreprocessorCacheThreshold = 1000;
  3026. /**
  3027. * Enable interwiki transcluding. Only when iw_trans=1.
  3028. */
  3029. $wgEnableScaryTranscluding = false;
  3030. /**
  3031. * (see next option $wgGlobalDatabase).
  3032. */
  3033. $wgTranscludeCacheExpiry = 3600;
  3034. /** @} */ # end of parser settings }
  3035. /************************************************************************//**
  3036. * @name Statistics
  3037. * @{
  3038. */
  3039. /**
  3040. * Method used to determine if a page in a content namespace should be counted
  3041. * as a valid article.
  3042. *
  3043. * Redirect pages will never be counted as valid articles.
  3044. *
  3045. * This variable can have the following values:
  3046. * - 'any': all pages as considered as valid articles
  3047. * - 'comma': the page must contain a comma to be considered valid
  3048. * - 'link': the page must contain a [[wiki link]] to be considered valid
  3049. * - null: the value will be set at run time depending on $wgUseCommaCount:
  3050. * if $wgUseCommaCount is false, it will be 'link', if it is true
  3051. * it will be 'comma'
  3052. *
  3053. * See also See http://www.mediawiki.org/wiki/Manual:Article_count
  3054. *
  3055. * Retroactively changing this variable will not affect the existing count,
  3056. * to update it, you will need to run the maintenance/updateArticleCount.php
  3057. * script.
  3058. */
  3059. $wgArticleCountMethod = null;
  3060. /**
  3061. * Backward compatibility setting, will set $wgArticleCountMethod if it is null.
  3062. * @deprecated since 1.18; use $wgArticleCountMethod instead
  3063. */
  3064. $wgUseCommaCount = false;
  3065. /**
  3066. * wgHitcounterUpdateFreq sets how often page counters should be updated, higher
  3067. * values are easier on the database. A value of 1 causes the counters to be
  3068. * updated on every hit, any higher value n cause them to update *on average*
  3069. * every n hits. Should be set to either 1 or something largish, eg 1000, for
  3070. * maximum efficiency.
  3071. */
  3072. $wgHitcounterUpdateFreq = 1;
  3073. /**
  3074. * How many days user must be idle before he is considered inactive. Will affect
  3075. * the number shown on Special:Statistics and Special:ActiveUsers special page.
  3076. * You might want to leave this as the default value, to provide comparable
  3077. * numbers between different wikis.
  3078. */
  3079. $wgActiveUserDays = 30;
  3080. /** @} */ # End of statistics }
  3081. /************************************************************************//**
  3082. * @name User accounts, authentication
  3083. * @{
  3084. */
  3085. /** For compatibility with old installations set to false */
  3086. $wgPasswordSalt = true;
  3087. /**
  3088. * Specifies the minimal length of a user password. If set to 0, empty pass-
  3089. * words are allowed.
  3090. */
  3091. $wgMinimalPasswordLength = 1;
  3092. /**
  3093. * Whether to allow password resets ("enter some identifying data, and we'll send an email
  3094. * with a temporary password you can use to get back into the account") identified by
  3095. * various bits of data. Setting all of these to false (or the whole variable to false)
  3096. * has the effect of disabling password resets entirely
  3097. */
  3098. $wgPasswordResetRoutes = array(
  3099. 'username' => true,
  3100. 'email' => false,
  3101. );
  3102. /**
  3103. * Maximum number of Unicode characters in signature
  3104. */
  3105. $wgMaxSigChars = 255;
  3106. /**
  3107. * Maximum number of bytes in username. You want to run the maintenance
  3108. * script ./maintenance/checkUsernames.php once you have changed this value.
  3109. */
  3110. $wgMaxNameChars = 255;
  3111. /**
  3112. * Array of usernames which may not be registered or logged in from
  3113. * Maintenance scripts can still use these
  3114. */
  3115. $wgReservedUsernames = array(
  3116. 'MediaWiki default', // Default 'Main Page' and MediaWiki: message pages
  3117. 'Conversion script', // Used for the old Wikipedia software upgrade
  3118. 'Maintenance script', // Maintenance scripts which perform editing, image import script
  3119. 'Template namespace initialisation script', // Used in 1.2->1.3 upgrade
  3120. 'ScriptImporter', // Default user name used by maintenance/importSiteScripts.php
  3121. 'msg:double-redirect-fixer', // Automatic double redirect fix
  3122. 'msg:usermessage-editor', // Default user for leaving user messages
  3123. 'msg:proxyblocker', // For Special:Blockme
  3124. );
  3125. /**
  3126. * Settings added to this array will override the default globals for the user
  3127. * preferences used by anonymous visitors and newly created accounts.
  3128. * For instance, to disable section editing links:
  3129. * $wgDefaultUserOptions ['editsection'] = 0;
  3130. *
  3131. */
  3132. $wgDefaultUserOptions = array(
  3133. 'ccmeonemails' => 0,
  3134. 'cols' => 80,
  3135. 'date' => 'default',
  3136. 'diffonly' => 0,
  3137. 'disablemail' => 0,
  3138. 'disablesuggest' => 0,
  3139. 'editfont' => 'default',
  3140. 'editondblclick' => 0,
  3141. 'editsection' => 1,
  3142. 'editsectiononrightclick' => 0,
  3143. 'enotifminoredits' => 0,
  3144. 'enotifrevealaddr' => 0,
  3145. 'enotifusertalkpages' => 1,
  3146. 'enotifwatchlistpages' => 0,
  3147. 'extendwatchlist' => 0,
  3148. 'externaldiff' => 0,
  3149. 'externaleditor' => 0,
  3150. 'fancysig' => 0,
  3151. 'forceeditsummary' => 0,
  3152. 'gender' => 'unknown',
  3153. 'hideminor' => 0,
  3154. 'hidepatrolled' => 0,
  3155. 'imagesize' => 2,
  3156. 'justify' => 0,
  3157. 'math' => 1,
  3158. 'minordefault' => 0,
  3159. 'newpageshidepatrolled' => 0,
  3160. 'nocache' => 0,
  3161. 'noconvertlink' => 0,
  3162. 'norollbackdiff' => 0,
  3163. 'numberheadings' => 0,
  3164. 'previewonfirst' => 0,
  3165. 'previewontop' => 1,
  3166. 'quickbar' => 5,
  3167. 'rcdays' => 7,
  3168. 'rclimit' => 50,
  3169. 'rememberpassword' => 0,
  3170. 'rows' => 25,
  3171. 'searchlimit' => 20,
  3172. 'showhiddencats' => 0,
  3173. 'showjumplinks' => 1,
  3174. 'shownumberswatching' => 1,
  3175. 'showtoc' => 1,
  3176. 'showtoolbar' => 1,
  3177. 'skin' => false,
  3178. 'stubthreshold' => 0,
  3179. 'thumbsize' => 2,
  3180. 'underline' => 2,
  3181. 'uselivepreview' => 0,
  3182. 'usenewrc' => 0,
  3183. 'watchcreations' => 0,
  3184. 'watchdefault' => 0,
  3185. 'watchdeletion' => 0,
  3186. 'watchlistdays' => 3.0,
  3187. 'watchlisthideanons' => 0,
  3188. 'watchlisthidebots' => 0,
  3189. 'watchlisthideliu' => 0,
  3190. 'watchlisthideminor' => 0,
  3191. 'watchlisthideown' => 0,
  3192. 'watchlisthidepatrolled' => 0,
  3193. 'watchmoves' => 0,
  3194. 'wllimit' => 250,
  3195. );
  3196. /**
  3197. * Whether or not to allow and use real name fields.
  3198. * @deprecated since 1.16, use $wgHiddenPrefs[] = 'realname' below to disable real
  3199. * names
  3200. */
  3201. $wgAllowRealName = true;
  3202. /** An array of preferences to not show for the user */
  3203. $wgHiddenPrefs = array();
  3204. /**
  3205. * Characters to prevent during new account creations.
  3206. * This is used in a regular expression character class during
  3207. * registration (regex metacharacters like / are escaped).
  3208. */
  3209. $wgInvalidUsernameCharacters = '@';
  3210. /**
  3211. * Character used as a delimiter when testing for interwiki userrights
  3212. * (In Special:UserRights, it is possible to modify users on different
  3213. * databases if the delimiter is used, e.g. "Someuser@enwiki").
  3214. *
  3215. * It is recommended that you have this delimiter in
  3216. * $wgInvalidUsernameCharacters above, or you will not be able to
  3217. * modify the user rights of those users via Special:UserRights
  3218. */
  3219. $wgUserrightsInterwikiDelimiter = '@';
  3220. /**
  3221. * Use some particular type of external authentication. The specific
  3222. * authentication module you use will normally require some extra settings to
  3223. * be specified.
  3224. *
  3225. * null indicates no external authentication is to be used. Otherwise,
  3226. * $wgExternalAuthType must be the name of a non-abstract class that extends
  3227. * ExternalUser.
  3228. *
  3229. * Core authentication modules can be found in includes/extauth/.
  3230. */
  3231. $wgExternalAuthType = null;
  3232. /**
  3233. * Configuration for the external authentication. This may include arbitrary
  3234. * keys that depend on the authentication mechanism. For instance,
  3235. * authentication against another web app might require that the database login
  3236. * info be provided. Check the file where your auth mechanism is defined for
  3237. * info on what to put here.
  3238. */
  3239. $wgExternalAuthConf = array();
  3240. /**
  3241. * When should we automatically create local accounts when external accounts
  3242. * already exist, if using ExternalAuth? Can have three values: 'never',
  3243. * 'login', 'view'. 'view' requires the external database to support cookies,
  3244. * and implies 'login'.
  3245. *
  3246. * TODO: Implement 'view' (currently behaves like 'login').
  3247. */
  3248. $wgAutocreatePolicy = 'login';
  3249. /**
  3250. * Policies for how each preference is allowed to be changed, in the presence
  3251. * of external authentication. The keys are preference keys, e.g., 'password'
  3252. * or 'emailaddress' (see Preferences.php et al.). The value can be one of the
  3253. * following:
  3254. *
  3255. * - local: Allow changes to this pref through the wiki interface but only
  3256. * apply them locally (default).
  3257. * - semiglobal: Allow changes through the wiki interface and try to apply them
  3258. * to the foreign database, but continue on anyway if that fails.
  3259. * - global: Allow changes through the wiki interface, but only let them go
  3260. * through if they successfully update the foreign database.
  3261. * - message: Allow no local changes for linked accounts; replace the change
  3262. * form with a message provided by the auth plugin, telling the user how to
  3263. * change the setting externally (maybe providing a link, etc.). If the auth
  3264. * plugin provides no message for this preference, hide it entirely.
  3265. *
  3266. * Accounts that are not linked to an external account are never affected by
  3267. * this setting. You may want to look at $wgHiddenPrefs instead.
  3268. * $wgHiddenPrefs supersedes this option.
  3269. *
  3270. * TODO: Implement message, global.
  3271. */
  3272. $wgAllowPrefChange = array();
  3273. /**
  3274. * This is to let user authenticate using https when they come from http.
  3275. * Based on an idea by George Herbert on wikitech-l:
  3276. * http://lists.wikimedia.org/pipermail/wikitech-l/2010-October/050065.html
  3277. * @since 1.17
  3278. */
  3279. $wgSecureLogin = false;
  3280. /** @} */ # end user accounts }
  3281. /************************************************************************//**
  3282. * @name User rights, access control and monitoring
  3283. * @{
  3284. */
  3285. /**
  3286. * Number of seconds before autoblock entries expire. Default 86400 = 1 day.
  3287. */
  3288. $wgAutoblockExpiry = 86400;
  3289. /**
  3290. * Set this to true to allow blocked users to edit their own user talk page.
  3291. */
  3292. $wgBlockAllowsUTEdit = false;
  3293. /** Allow sysops to ban users from accessing Emailuser */
  3294. $wgSysopEmailBans = true;
  3295. /**
  3296. * Limits on the possible sizes of range blocks.
  3297. *
  3298. * CIDR notation is hard to understand, it's easy to mistakenly assume that a
  3299. * /1 is a small range and a /31 is a large range. For IPv4, setting a limit of
  3300. * half the number of bits avoids such errors, and allows entire ISPs to be
  3301. * blocked using a small number of range blocks.
  3302. *
  3303. * For IPv6, RFC 3177 recommends that a /48 be allocated to every residential
  3304. * customer, so range blocks larger than /64 (half the number of bits) will
  3305. * plainly be required. RFC 4692 implies that a very large ISP may be
  3306. * allocated a /19 if a generous HD-Ratio of 0.8 is used, so we will use that
  3307. * as our limit. As of 2012, blocking the whole world would require a /4 range.
  3308. */
  3309. $wgBlockCIDRLimit = array(
  3310. 'IPv4' => 16, # Blocks larger than a /16 (64k addresses) will not be allowed
  3311. 'IPv6' => 19,
  3312. );
  3313. /**
  3314. * If true, blocked users will not be allowed to login. When using this with
  3315. * a public wiki, the effect of logging out blocked users may actually be
  3316. * avers: unless the user's address is also blocked (e.g. auto-block),
  3317. * logging the user out will again allow reading and editing, just as for
  3318. * anonymous visitors.
  3319. */
  3320. $wgBlockDisablesLogin = false;
  3321. /**
  3322. * Pages anonymous user may see, set as an array of pages titles.
  3323. *
  3324. * @par Example:
  3325. * @code
  3326. * $wgWhitelistRead = array ( "Main Page", "Wikipedia:Help");
  3327. * @endcode
  3328. *
  3329. * Special:Userlogin and Special:ChangePassword are always whitelisted.
  3330. *
  3331. * @note This will only work if $wgGroupPermissions['*']['read'] is false --
  3332. * see below. Otherwise, ALL pages are accessible, regardless of this setting.
  3333. *
  3334. * @note Also that this will only protect _pages in the wiki_. Uploaded files
  3335. * will remain readable. You can use img_auth.php to protect uploaded files,
  3336. * see http://www.mediawiki.org/wiki/Manual:Image_Authorization
  3337. */
  3338. $wgWhitelistRead = false;
  3339. /**
  3340. * Should editors be required to have a validated e-mail
  3341. * address before being allowed to edit?
  3342. */
  3343. $wgEmailConfirmToEdit = false;
  3344. /**
  3345. * Permission keys given to users in each group.
  3346. *
  3347. * This is an array where the keys are all groups and each value is an
  3348. * array of the format (right => boolean).
  3349. *
  3350. * The second format is used to support per-namespace permissions.
  3351. * Note that this feature does not fully work for all permission types.
  3352. *
  3353. * All users are implicitly in the '*' group including anonymous visitors;
  3354. * logged-in users are all implicitly in the 'user' group. These will be
  3355. * combined with the permissions of all groups that a given user is listed
  3356. * in in the user_groups table.
  3357. *
  3358. * Note: Don't set $wgGroupPermissions = array(); unless you know what you're
  3359. * doing! This will wipe all permissions, and may mean that your users are
  3360. * unable to perform certain essential tasks or access new functionality
  3361. * when new permissions are introduced and default grants established.
  3362. *
  3363. * Functionality to make pages inaccessible has not been extensively tested
  3364. * for security. Use at your own risk!
  3365. *
  3366. * This replaces $wgWhitelistAccount and $wgWhitelistEdit
  3367. */
  3368. $wgGroupPermissions = array();
  3369. /** @cond file_level_code */
  3370. // Implicit group for all visitors
  3371. $wgGroupPermissions['*']['createaccount'] = true;
  3372. $wgGroupPermissions['*']['read'] = true;
  3373. $wgGroupPermissions['*']['edit'] = true;
  3374. $wgGroupPermissions['*']['createpage'] = true;
  3375. $wgGroupPermissions['*']['createtalk'] = true;
  3376. $wgGroupPermissions['*']['writeapi'] = true;
  3377. //$wgGroupPermissions['*']['patrolmarks'] = false; // let anons see what was patrolled
  3378. // Implicit group for all logged-in accounts
  3379. $wgGroupPermissions['user']['move'] = true;
  3380. $wgGroupPermissions['user']['move-subpages'] = true;
  3381. $wgGroupPermissions['user']['move-rootuserpages'] = true; // can move root userpages
  3382. $wgGroupPermissions['user']['movefile'] = true;
  3383. $wgGroupPermissions['user']['read'] = true;
  3384. $wgGroupPermissions['user']['edit'] = true;
  3385. $wgGroupPermissions['user']['createpage'] = true;
  3386. $wgGroupPermissions['user']['createtalk'] = true;
  3387. $wgGroupPermissions['user']['writeapi'] = true;
  3388. $wgGroupPermissions['user']['upload'] = true;
  3389. $wgGroupPermissions['user']['reupload'] = true;
  3390. $wgGroupPermissions['user']['reupload-shared'] = true;
  3391. $wgGroupPermissions['user']['minoredit'] = true;
  3392. $wgGroupPermissions['user']['purge'] = true; // can use ?action=purge without clicking "ok"
  3393. $wgGroupPermissions['user']['sendemail'] = true;
  3394. // Implicit group for accounts that pass $wgAutoConfirmAge
  3395. $wgGroupPermissions['autoconfirmed']['autoconfirmed'] = true;
  3396. // Users with bot privilege can have their edits hidden
  3397. // from various log pages by default
  3398. $wgGroupPermissions['bot']['bot'] = true;
  3399. $wgGroupPermissions['bot']['autoconfirmed'] = true;
  3400. $wgGroupPermissions['bot']['nominornewtalk'] = true;
  3401. $wgGroupPermissions['bot']['autopatrol'] = true;
  3402. $wgGroupPermissions['bot']['suppressredirect'] = true;
  3403. $wgGroupPermissions['bot']['apihighlimits'] = true;
  3404. $wgGroupPermissions['bot']['writeapi'] = true;
  3405. #$wgGroupPermissions['bot']['editprotected'] = true; // can edit all protected pages without cascade protection enabled
  3406. // Most extra permission abilities go to this group
  3407. $wgGroupPermissions['sysop']['block'] = true;
  3408. $wgGroupPermissions['sysop']['createaccount'] = true;
  3409. $wgGroupPermissions['sysop']['delete'] = true;
  3410. $wgGroupPermissions['sysop']['bigdelete'] = true; // can be separately configured for pages with > $wgDeleteRevisionsLimit revs
  3411. $wgGroupPermissions['sysop']['deletedhistory'] = true; // can view deleted history entries, but not see or restore the text
  3412. $wgGroupPermissions['sysop']['deletedtext'] = true; // can view deleted revision text
  3413. $wgGroupPermissions['sysop']['undelete'] = true;
  3414. $wgGroupPermissions['sysop']['editinterface'] = true;
  3415. $wgGroupPermissions['sysop']['editusercss'] = true;
  3416. $wgGroupPermissions['sysop']['edituserjs'] = true;
  3417. $wgGroupPermissions['sysop']['import'] = true;
  3418. $wgGroupPermissions['sysop']['importupload'] = true;
  3419. $wgGroupPermissions['sysop']['move'] = true;
  3420. $wgGroupPermissions['sysop']['move-subpages'] = true;
  3421. $wgGroupPermissions['sysop']['move-rootuserpages'] = true;
  3422. $wgGroupPermissions['sysop']['patrol'] = true;
  3423. $wgGroupPermissions['sysop']['autopatrol'] = true;
  3424. $wgGroupPermissions['sysop']['protect'] = true;
  3425. $wgGroupPermissions['sysop']['proxyunbannable'] = true;
  3426. $wgGroupPermissions['sysop']['rollback'] = true;
  3427. $wgGroupPermissions['sysop']['upload'] = true;
  3428. $wgGroupPermissions['sysop']['reupload'] = true;
  3429. $wgGroupPermissions['sysop']['reupload-shared'] = true;
  3430. $wgGroupPermissions['sysop']['unwatchedpages'] = true;
  3431. $wgGroupPermissions['sysop']['autoconfirmed'] = true;
  3432. $wgGroupPermissions['sysop']['ipblock-exempt'] = true;
  3433. $wgGroupPermissions['sysop']['blockemail'] = true;
  3434. $wgGroupPermissions['sysop']['markbotedits'] = true;
  3435. $wgGroupPermissions['sysop']['apihighlimits'] = true;
  3436. $wgGroupPermissions['sysop']['browsearchive'] = true;
  3437. $wgGroupPermissions['sysop']['noratelimit'] = true;
  3438. $wgGroupPermissions['sysop']['movefile'] = true;
  3439. $wgGroupPermissions['sysop']['unblockself'] = true;
  3440. $wgGroupPermissions['sysop']['suppressredirect'] = true;
  3441. #$wgGroupPermissions['sysop']['upload_by_url'] = true;
  3442. #$wgGroupPermissions['sysop']['mergehistory'] = true;
  3443. // Permission to change users' group assignments
  3444. $wgGroupPermissions['bureaucrat']['userrights'] = true;
  3445. $wgGroupPermissions['bureaucrat']['noratelimit'] = true;
  3446. // Permission to change users' groups assignments across wikis
  3447. #$wgGroupPermissions['bureaucrat']['userrights-interwiki'] = true;
  3448. // Permission to export pages including linked pages regardless of $wgExportMaxLinkDepth
  3449. #$wgGroupPermissions['bureaucrat']['override-export-depth'] = true;
  3450. #$wgGroupPermissions['sysop']['deletelogentry'] = true;
  3451. #$wgGroupPermissions['sysop']['deleterevision'] = true;
  3452. // To hide usernames from users and Sysops
  3453. #$wgGroupPermissions['suppress']['hideuser'] = true;
  3454. // To hide revisions/log items from users and Sysops
  3455. #$wgGroupPermissions['suppress']['suppressrevision'] = true;
  3456. // For private suppression log access
  3457. #$wgGroupPermissions['suppress']['suppressionlog'] = true;
  3458. /**
  3459. * The developer group is deprecated, but can be activated if need be
  3460. * to use the 'lockdb' and 'unlockdb' special pages. Those require
  3461. * that a lock file be defined and creatable/removable by the web
  3462. * server.
  3463. */
  3464. # $wgGroupPermissions['developer']['siteadmin'] = true;
  3465. /** @endcond */
  3466. /**
  3467. * Permission keys revoked from users in each group.
  3468. *
  3469. * This acts the same way as wgGroupPermissions above, except that
  3470. * if the user is in a group here, the permission will be removed from them.
  3471. *
  3472. * Improperly setting this could mean that your users will be unable to perform
  3473. * certain essential tasks, so use at your own risk!
  3474. */
  3475. $wgRevokePermissions = array();
  3476. /**
  3477. * Implicit groups, aren't shown on Special:Listusers or somewhere else
  3478. */
  3479. $wgImplicitGroups = array( '*', 'user', 'autoconfirmed' );
  3480. /**
  3481. * A map of group names that the user is in, to group names that those users
  3482. * are allowed to add or revoke.
  3483. *
  3484. * Setting the list of groups to add or revoke to true is equivalent to "any
  3485. * group".
  3486. *
  3487. * @par Example:
  3488. * To allow sysops to add themselves to the "bot" group:
  3489. * @code
  3490. * $wgGroupsAddToSelf = array( 'sysop' => array( 'bot' ) );
  3491. * @endcode
  3492. *
  3493. * @par Example:
  3494. * Implicit groups may be used for the source group, for instance:
  3495. * @code
  3496. * $wgGroupsRemoveFromSelf = array( '*' => true );
  3497. * @endcode
  3498. * This allows users in the '*' group (i.e. any user) to remove themselves from
  3499. * any group that they happen to be in.
  3500. *
  3501. */
  3502. $wgGroupsAddToSelf = array();
  3503. /** @see $wgGroupsAddToSelf */
  3504. $wgGroupsRemoveFromSelf = array();
  3505. /**
  3506. * Set of available actions that can be restricted via action=protect
  3507. * You probably shouldn't change this.
  3508. * Translated through restriction-* messages.
  3509. * Title::getRestrictionTypes() will remove restrictions that are not
  3510. * applicable to a specific title (create and upload)
  3511. */
  3512. $wgRestrictionTypes = array( 'create', 'edit', 'move', 'upload' );
  3513. /**
  3514. * Rights which can be required for each protection level (via action=protect)
  3515. *
  3516. * You can add a new protection level that requires a specific
  3517. * permission by manipulating this array. The ordering of elements
  3518. * dictates the order on the protection form's lists.
  3519. *
  3520. * - '' will be ignored (i.e. unprotected)
  3521. * - 'sysop' is quietly rewritten to 'protect' for backwards compatibility
  3522. */
  3523. $wgRestrictionLevels = array( '', 'autoconfirmed', 'sysop' );
  3524. /**
  3525. * Set the minimum permissions required to edit pages in each
  3526. * namespace. If you list more than one permission, a user must
  3527. * have all of them to edit pages in that namespace.
  3528. *
  3529. * @note NS_MEDIAWIKI is implicitly restricted to 'editinterface'.
  3530. */
  3531. $wgNamespaceProtection = array();
  3532. /**
  3533. * Pages in namespaces in this array can not be used as templates.
  3534. *
  3535. * Elements MUST be numeric namespace ids, you can safely use the MediaWiki
  3536. * namespaces constants (NS_USER, NS_MAIN...).
  3537. *
  3538. * Among other things, this may be useful to enforce read-restrictions
  3539. * which may otherwise be bypassed by using the template machanism.
  3540. */
  3541. $wgNonincludableNamespaces = array();
  3542. /**
  3543. * Number of seconds an account is required to age before it's given the
  3544. * implicit 'autoconfirm' group membership. This can be used to limit
  3545. * privileges of new accounts.
  3546. *
  3547. * Accounts created by earlier versions of the software may not have a
  3548. * recorded creation date, and will always be considered to pass the age test.
  3549. *
  3550. * When left at 0, all registered accounts will pass.
  3551. *
  3552. * @par Example:
  3553. * Set automatic confirmation to 10 minutes (which is 600 seconds):
  3554. * @code
  3555. * $wgAutoConfirmAge = 600; // ten minutes
  3556. * @endcode
  3557. * Set age to one day:
  3558. * @code
  3559. * $wgAutoConfirmAge = 3600*24; // one day
  3560. * @endcode
  3561. */
  3562. $wgAutoConfirmAge = 0;
  3563. /**
  3564. * Number of edits an account requires before it is autoconfirmed.
  3565. * Passing both this AND the time requirement is needed. Example:
  3566. *
  3567. * @par Example:
  3568. * @code
  3569. * $wgAutoConfirmCount = 50;
  3570. * @endcode
  3571. */
  3572. $wgAutoConfirmCount = 0;
  3573. /**
  3574. * Automatically add a usergroup to any user who matches certain conditions.
  3575. *
  3576. * @todo Redocument $wgAutopromote
  3577. *
  3578. * The format is
  3579. * array( '&' or '|' or '^' or '!', cond1, cond2, ... )
  3580. * where cond1, cond2, ... are themselves conditions; *OR*
  3581. * APCOND_EMAILCONFIRMED, *OR*
  3582. * array( APCOND_EMAILCONFIRMED ), *OR*
  3583. * array( APCOND_EDITCOUNT, number of edits ), *OR*
  3584. * array( APCOND_AGE, seconds since registration ), *OR*
  3585. * array( APCOND_INGROUPS, group1, group2, ... ), *OR*
  3586. * array( APCOND_ISIP, ip ), *OR*
  3587. * array( APCOND_IPINRANGE, range ), *OR*
  3588. * array( APCOND_AGE_FROM_EDIT, seconds since first edit ), *OR*
  3589. * array( APCOND_BLOCKED ), *OR*
  3590. * array( APCOND_ISBOT ), *OR*
  3591. * similar constructs defined by extensions.
  3592. *
  3593. * If $wgEmailAuthentication is off, APCOND_EMAILCONFIRMED will be true for any
  3594. * user who has provided an e-mail address.
  3595. */
  3596. $wgAutopromote = array(
  3597. 'autoconfirmed' => array( '&',
  3598. array( APCOND_EDITCOUNT, &$wgAutoConfirmCount ),
  3599. array( APCOND_AGE, &$wgAutoConfirmAge ),
  3600. ),
  3601. );
  3602. /**
  3603. * Automatically add a usergroup to any user who matches certain conditions.
  3604. *
  3605. * Does not add the user to the group again if it has been removed.
  3606. * Also, does not remove the group if the user no longer meets the criteria.
  3607. *
  3608. * The format is:
  3609. * @code
  3610. * array( event => criteria, ... )
  3611. * @endcode
  3612. * Where event is either:
  3613. * - 'onEdit' (when user edits)
  3614. * - 'onView' (when user views the wiki)
  3615. *
  3616. * Criteria has the same format as $wgAutopromote
  3617. *
  3618. * @see $wgAutopromote
  3619. * @since 1.18
  3620. */
  3621. $wgAutopromoteOnce = array(
  3622. 'onEdit' => array(),
  3623. 'onView' => array()
  3624. );
  3625. /**
  3626. * Put user rights log entries for autopromotion in recent changes?
  3627. * @since 1.18
  3628. */
  3629. $wgAutopromoteOnceLogInRC = true;
  3630. /**
  3631. * $wgAddGroups and $wgRemoveGroups can be used to give finer control over who
  3632. * can assign which groups at Special:Userrights.
  3633. *
  3634. * @par Example:
  3635. * Bureaucrats can add any group:
  3636. * @code
  3637. * $wgAddGroups['bureaucrat'] = true;
  3638. * @endcode
  3639. * Bureaucrats can only remove bots and sysops:
  3640. * @code
  3641. * $wgRemoveGroups['bureaucrat'] = array( 'bot', 'sysop' );
  3642. * @endcode
  3643. * Sysops can make bots:
  3644. * @code
  3645. * $wgAddGroups['sysop'] = array( 'bot' );
  3646. * @endcode
  3647. * Sysops can disable other sysops in an emergency, and disable bots:
  3648. * @code
  3649. * $wgRemoveGroups['sysop'] = array( 'sysop', 'bot' );
  3650. * @endcode
  3651. */
  3652. $wgAddGroups = array();
  3653. /** @see $wgAddGroups */
  3654. $wgRemoveGroups = array();
  3655. /**
  3656. * A list of available rights, in addition to the ones defined by the core.
  3657. * For extensions only.
  3658. */
  3659. $wgAvailableRights = array();
  3660. /**
  3661. * Optional to restrict deletion of pages with higher revision counts
  3662. * to users with the 'bigdelete' permission. (Default given to sysops.)
  3663. */
  3664. $wgDeleteRevisionsLimit = 0;
  3665. /**
  3666. * Number of accounts each IP address may create, 0 to disable.
  3667. *
  3668. * @warning Requires memcached */
  3669. $wgAccountCreationThrottle = 0;
  3670. /**
  3671. * Edits matching these regular expressions in body text
  3672. * will be recognised as spam and rejected automatically.
  3673. *
  3674. * There's no administrator override on-wiki, so be careful what you set. :)
  3675. * May be an array of regexes or a single string for backwards compatibility.
  3676. *
  3677. * @see http://en.wikipedia.org/wiki/Regular_expression
  3678. *
  3679. * @note Each regex needs a beginning/end delimiter, eg: # or /
  3680. */
  3681. $wgSpamRegex = array();
  3682. /** Same as the above except for edit summaries */
  3683. $wgSummarySpamRegex = array();
  3684. /**
  3685. * Whether to use DNS blacklists in $wgDnsBlacklistUrls to check for open
  3686. * proxies
  3687. * @since 1.16
  3688. */
  3689. $wgEnableDnsBlacklist = false;
  3690. /**
  3691. * @deprecated since 1.17 Use $wgEnableDnsBlacklist instead, only kept for
  3692. * backward compatibility.
  3693. */
  3694. $wgEnableSorbs = false;
  3695. /**
  3696. * List of DNS blacklists to use, if $wgEnableDnsBlacklist is true.
  3697. *
  3698. * This is an array of either a URL or an array with the URL and a key (should
  3699. * the blacklist require a key).
  3700. *
  3701. * @par Example:
  3702. * @code
  3703. * $wgDnsBlacklistUrls = array(
  3704. * // String containing URL
  3705. * 'http.dnsbl.sorbs.net.',
  3706. * // Array with URL and key, for services that require a key
  3707. * array( 'dnsbl.httpbl.net.', 'mykey' ),
  3708. * // Array with just the URL. While this works, it is recommended that you
  3709. * // just use a string as shown above
  3710. * array( 'opm.tornevall.org.' )
  3711. * );
  3712. * @endcode
  3713. *
  3714. * @note You should end the domain name with a . to avoid searching your
  3715. * eventual domain search suffixes.
  3716. * @since 1.16
  3717. */
  3718. $wgDnsBlacklistUrls = array( 'http.dnsbl.sorbs.net.' );
  3719. /**
  3720. * @deprecated since 1.17 Use $wgDnsBlacklistUrls instead, only kept for
  3721. * backward compatibility.
  3722. */
  3723. $wgSorbsUrl = array();
  3724. /**
  3725. * Proxy whitelist, list of addresses that are assumed to be non-proxy despite
  3726. * what the other methods might say.
  3727. */
  3728. $wgProxyWhitelist = array();
  3729. /**
  3730. * Simple rate limiter options to brake edit floods.
  3731. *
  3732. * Maximum number actions allowed in the given number of seconds; after that
  3733. * the violating client receives HTTP 500 error pages until the period
  3734. * elapses.
  3735. *
  3736. * @par Example:
  3737. * To set a generic maximum of 4 hits in 60 seconds:
  3738. * @code
  3739. * $wgRateLimits = array( 4, 60 );
  3740. * @endcode
  3741. *
  3742. * You could also limit per action and then type of users. See the inline
  3743. * code for a template to use.
  3744. *
  3745. * This option set is experimental and likely to change.
  3746. *
  3747. * @warning Requires memcached.
  3748. */
  3749. $wgRateLimits = array(
  3750. 'edit' => array(
  3751. 'anon' => null, // for any and all anonymous edits (aggregate)
  3752. 'user' => null, // for each logged-in user
  3753. 'newbie' => null, // for each recent (autoconfirmed) account; overrides 'user'
  3754. 'ip' => null, // for each anon and recent account
  3755. 'subnet' => null, // ... with final octet removed
  3756. ),
  3757. 'move' => array(
  3758. 'user' => null,
  3759. 'newbie' => null,
  3760. 'ip' => null,
  3761. 'subnet' => null,
  3762. ),
  3763. 'mailpassword' => array(
  3764. 'anon' => null,
  3765. ),
  3766. 'emailuser' => array(
  3767. 'user' => null,
  3768. ),
  3769. );
  3770. /**
  3771. * Set to a filename to log rate limiter hits.
  3772. */
  3773. $wgRateLimitLog = null;
  3774. /**
  3775. * Array of IPs which should be excluded from rate limits.
  3776. * This may be useful for whitelisting NAT gateways for conferences, etc.
  3777. */
  3778. $wgRateLimitsExcludedIPs = array();
  3779. /**
  3780. * Log IP addresses in the recentchanges table; can be accessed only by
  3781. * extensions (e.g. CheckUser) or a DB admin
  3782. */
  3783. $wgPutIPinRC = true;
  3784. /**
  3785. * Integer defining default number of entries to show on
  3786. * special pages which are query-pages such as Special:Whatlinkshere.
  3787. */
  3788. $wgQueryPageDefaultLimit = 50;
  3789. /**
  3790. * Limit password attempts to X attempts per Y seconds per IP per account.
  3791. *
  3792. * @warning Requires memcached.
  3793. */
  3794. $wgPasswordAttemptThrottle = array( 'count' => 5, 'seconds' => 300 );
  3795. /** @} */ # end of user rights settings
  3796. /************************************************************************//**
  3797. * @name Proxy scanner settings
  3798. * @{
  3799. */
  3800. /**
  3801. * If you enable this, every editor's IP address will be scanned for open HTTP
  3802. * proxies.
  3803. *
  3804. * @warning Don't enable this. Many sysops will report "hostile TCP port scans"
  3805. * to your ISP and ask for your server to be shut down.
  3806. * You have been warned.
  3807. *
  3808. */
  3809. $wgBlockOpenProxies = false;
  3810. /** Port we want to scan for a proxy */
  3811. $wgProxyPorts = array( 80, 81, 1080, 3128, 6588, 8000, 8080, 8888, 65506 );
  3812. /** Script used to scan */
  3813. $wgProxyScriptPath = "$IP/maintenance/proxy_check.php";
  3814. /** */
  3815. $wgProxyMemcExpiry = 86400;
  3816. /** This should always be customised in LocalSettings.php */
  3817. $wgSecretKey = false;
  3818. /** big list of banned IP addresses, in the keys not the values */
  3819. $wgProxyList = array();
  3820. /** deprecated */
  3821. $wgProxyKey = false;
  3822. /** @} */ # end of proxy scanner settings
  3823. /************************************************************************//**
  3824. * @name Cookie settings
  3825. * @{
  3826. */
  3827. /**
  3828. * Default cookie expiration time. Setting to 0 makes all cookies session-only.
  3829. */
  3830. $wgCookieExpiration = 180*86400;
  3831. /**
  3832. * Set to set an explicit domain on the login cookies eg, "justthis.domain.org"
  3833. * or ".any.subdomain.net"
  3834. */
  3835. $wgCookieDomain = '';
  3836. /**
  3837. * Set this variable if you want to restrict cookies to a certain path within
  3838. * the domain specified by $wgCookieDomain.
  3839. */
  3840. $wgCookiePath = '/';
  3841. /**
  3842. * Whether the "secure" flag should be set on the cookie. This can be:
  3843. * - true: Set secure flag
  3844. * - false: Don't set secure flag
  3845. * - "detect": Set the secure flag if $wgServer is set to an HTTPS URL
  3846. */
  3847. $wgCookieSecure = 'detect';
  3848. /**
  3849. * By default, MediaWiki checks if the client supports cookies during the
  3850. * login process, so that it can display an informative error message if
  3851. * cookies are disabled. Set this to true if you want to disable this cookie
  3852. * check.
  3853. */
  3854. $wgDisableCookieCheck = false;
  3855. /**
  3856. * Cookies generated by MediaWiki have names starting with this prefix. Set it
  3857. * to a string to use a custom prefix. Setting it to false causes the database
  3858. * name to be used as a prefix.
  3859. */
  3860. $wgCookiePrefix = false;
  3861. /**
  3862. * Set authentication cookies to HttpOnly to prevent access by JavaScript,
  3863. * in browsers that support this feature. This can mitigates some classes of
  3864. * XSS attack.
  3865. */
  3866. $wgCookieHttpOnly = true;
  3867. /**
  3868. * If the requesting browser matches a regex in this blacklist, we won't
  3869. * send it cookies with HttpOnly mode, even if $wgCookieHttpOnly is on.
  3870. */
  3871. $wgHttpOnlyBlacklist = array(
  3872. // Internet Explorer for Mac; sometimes the cookies work, sometimes
  3873. // they don't. It's difficult to predict, as combinations of path
  3874. // and expiration options affect its parsing.
  3875. '/^Mozilla\/4\.0 \(compatible; MSIE \d+\.\d+; Mac_PowerPC\)/',
  3876. );
  3877. /** A list of cookies that vary the cache (for use by extensions) */
  3878. $wgCacheVaryCookies = array();
  3879. /** Override to customise the session name */
  3880. $wgSessionName = false;
  3881. /** @} */ # end of cookie settings }
  3882. /************************************************************************//**
  3883. * @name LaTeX (mathematical formulas)
  3884. * @{
  3885. */
  3886. /**
  3887. * To use inline TeX, you need to compile 'texvc' (in the 'math' subdirectory of
  3888. * the MediaWiki package and have latex, dvips, gs (ghostscript), andconvert
  3889. * (ImageMagick) installed and available in the PATH.
  3890. * Please see math/README for more information.
  3891. */
  3892. $wgUseTeX = false;
  3893. /* @} */ # end LaTeX }
  3894. /************************************************************************//**
  3895. * @name Profiling, testing and debugging
  3896. *
  3897. * To enable profiling, edit StartProfiler.php
  3898. *
  3899. * @{
  3900. */
  3901. /**
  3902. * Filename for debug logging. See http://www.mediawiki.org/wiki/How_to_debug
  3903. * The debug log file should be not be publicly accessible if it is used, as it
  3904. * may contain private data.
  3905. */
  3906. $wgDebugLogFile = '';
  3907. /**
  3908. * Prefix for debug log lines
  3909. */
  3910. $wgDebugLogPrefix = '';
  3911. /**
  3912. * If true, instead of redirecting, show a page with a link to the redirect
  3913. * destination. This allows for the inspection of PHP error messages, and easy
  3914. * resubmission of form data. For developer use only.
  3915. */
  3916. $wgDebugRedirects = false;
  3917. /**
  3918. * If true, log debugging data from action=raw and load.php.
  3919. * This is normally false to avoid overlapping debug entries due to gen=css
  3920. * and gen=js requests.
  3921. */
  3922. $wgDebugRawPage = false;
  3923. /**
  3924. * Send debug data to an HTML comment in the output.
  3925. *
  3926. * This may occasionally be useful when supporting a non-technical end-user.
  3927. * It's more secure than exposing the debug log file to the web, since the
  3928. * output only contains private data for the current user. But it's not ideal
  3929. * for development use since data is lost on fatal errors and redirects.
  3930. */
  3931. $wgDebugComments = false;
  3932. /**
  3933. * Extensive database transaction state debugging
  3934. *
  3935. * @since 1.20
  3936. */
  3937. $wgDebugDBTransactions = false;
  3938. /**
  3939. * Write SQL queries to the debug log
  3940. */
  3941. $wgDebugDumpSql = false;
  3942. /**
  3943. * Set to an array of log group keys to filenames.
  3944. * If set, wfDebugLog() output for that group will go to that file instead
  3945. * of the regular $wgDebugLogFile. Useful for enabling selective logging
  3946. * in production.
  3947. */
  3948. $wgDebugLogGroups = array();
  3949. /**
  3950. * Display debug data at the bottom of the main content area.
  3951. *
  3952. * Useful for developers and technical users trying to working on a closed wiki.
  3953. */
  3954. $wgShowDebug = false;
  3955. /**
  3956. * Prefix debug messages with relative timestamp. Very-poor man's profiler.
  3957. * Since 1.19 also includes memory usage.
  3958. */
  3959. $wgDebugTimestamps = false;
  3960. /**
  3961. * Print HTTP headers for every request in the debug information.
  3962. */
  3963. $wgDebugPrintHttpHeaders = true;
  3964. /**
  3965. * Show the contents of $wgHooks in Special:Version
  3966. */
  3967. $wgSpecialVersionShowHooks = false;
  3968. /**
  3969. * Whether to show "we're sorry, but there has been a database error" pages.
  3970. * Displaying errors aids in debugging, but may display information useful
  3971. * to an attacker.
  3972. */
  3973. $wgShowSQLErrors = false;
  3974. /**
  3975. * If set to true, uncaught exceptions will print a complete stack trace
  3976. * to output. This should only be used for debugging, as it may reveal
  3977. * private information in function parameters due to PHP's backtrace
  3978. * formatting.
  3979. */
  3980. $wgShowExceptionDetails = false;
  3981. /**
  3982. * If true, show a backtrace for database errors
  3983. */
  3984. $wgShowDBErrorBacktrace = false;
  3985. /**
  3986. * If true, send the exception backtrace to the error log
  3987. */
  3988. $wgLogExceptionBacktrace = true;
  3989. /**
  3990. * Expose backend server host names through the API and various HTML comments
  3991. */
  3992. $wgShowHostnames = false;
  3993. /**
  3994. * Override server hostname detection with a hardcoded value.
  3995. * Should be a string, default false.
  3996. * @since 1.20
  3997. */
  3998. $wgOverrideHostname = false;
  3999. /**
  4000. * If set to true MediaWiki will throw notices for some possible error
  4001. * conditions and for deprecated functions.
  4002. */
  4003. $wgDevelopmentWarnings = false;
  4004. /**
  4005. * Release limitation to wfDeprecated warnings, if set to a release number
  4006. * development warnings will not be generated for deprecations added in releases
  4007. * after the limit.
  4008. */
  4009. $wgDeprecationReleaseLimit = false;
  4010. /** Only record profiling info for pages that took longer than this */
  4011. $wgProfileLimit = 0.0;
  4012. /** Don't put non-profiling info into log file */
  4013. $wgProfileOnly = false;
  4014. /**
  4015. * Log sums from profiling into "profiling" table in db.
  4016. *
  4017. * You have to create a 'profiling' table in your database before using
  4018. * this feature, see maintenance/archives/patch-profiling.sql
  4019. *
  4020. * To enable profiling, edit StartProfiler.php
  4021. */
  4022. $wgProfileToDatabase = false;
  4023. /** If true, print a raw call tree instead of per-function report */
  4024. $wgProfileCallTree = false;
  4025. /** Should application server host be put into profiling table */
  4026. $wgProfilePerHost = false;
  4027. /**
  4028. * Host for UDP profiler.
  4029. *
  4030. * The host should be running a daemon which can be obtained from MediaWiki
  4031. * Subversion at: http://svn.wikimedia.org/svnroot/mediawiki/trunk/udpprofile
  4032. */
  4033. $wgUDPProfilerHost = '127.0.0.1';
  4034. /**
  4035. * Port for UDP profiler.
  4036. * @see $wgUDPProfilerHost
  4037. */
  4038. $wgUDPProfilerPort = '3811';
  4039. /** Detects non-matching wfProfileIn/wfProfileOut calls */
  4040. $wgDebugProfiling = false;
  4041. /** Output debug message on every wfProfileIn/wfProfileOut */
  4042. $wgDebugFunctionEntry = false;
  4043. /**
  4044. * Destination for wfIncrStats() data...
  4045. * 'cache' to go into the system cache, if enabled (memcached)
  4046. * 'udp' to be sent to the UDP profiler (see $wgUDPProfilerHost)
  4047. * false to disable
  4048. */
  4049. $wgStatsMethod = 'cache';
  4050. /**
  4051. * When $wgStatsMethod is 'udp', setting this to a string allows statistics to
  4052. * be aggregated over more than one wiki. The string will be used in place of
  4053. * the DB name in outgoing UDP packets. If this is set to false, the DB name
  4054. * will be used.
  4055. */
  4056. $wgAggregateStatsID = false;
  4057. /** Whereas to count the number of time an article is viewed.
  4058. * Does not work if pages are cached (for example with squid).
  4059. */
  4060. $wgDisableCounters = false;
  4061. /**
  4062. * Set this to an integer to only do synchronous site_stats updates
  4063. * one every *this many* updates. The other requests go into pending
  4064. * delta values in $wgMemc. Make sure that $wgMemc is a global cache.
  4065. * If set to -1, updates *only* go to $wgMemc (useful for daemons).
  4066. */
  4067. $wgSiteStatsAsyncFactor = false;
  4068. /**
  4069. * Parser test suite files to be run by parserTests.php when no specific
  4070. * filename is passed to it.
  4071. *
  4072. * Extensions may add their own tests to this array, or site-local tests
  4073. * may be added via LocalSettings.php
  4074. *
  4075. * Use full paths.
  4076. */
  4077. $wgParserTestFiles = array(
  4078. "$IP/tests/parser/parserTests.txt",
  4079. "$IP/tests/parser/extraParserTests.txt"
  4080. );
  4081. /**
  4082. * If configured, specifies target CodeReview installation to send test
  4083. * result data from 'parserTests.php --upload'
  4084. *
  4085. * Something like this:
  4086. * $wgParserTestRemote = array(
  4087. * 'api-url' => 'http://www.mediawiki.org/w/api.php',
  4088. * 'repo' => 'MediaWiki',
  4089. * 'suite' => 'ParserTests',
  4090. * 'path' => '/trunk/phase3', // not used client-side; for reference
  4091. * 'secret' => 'qmoicj3mc4mcklmqw', // Shared secret used in HMAC validation
  4092. * );
  4093. */
  4094. $wgParserTestRemote = false;
  4095. /**
  4096. * Allow running of javascript test suites via [[Special:JavaScriptTest]] (such as QUnit).
  4097. */
  4098. $wgEnableJavaScriptTest = false;
  4099. /**
  4100. * Configuration for javascript testing.
  4101. */
  4102. $wgJavaScriptTestConfig = array(
  4103. 'qunit' => array(
  4104. // Page where documentation can be found relevant to the QUnit test suite being ran.
  4105. // Used in the intro paragraph on [[Special:JavaScriptTest/qunit]] for the
  4106. // documentation link in the "javascripttest-qunit-intro" message.
  4107. 'documentation' => '//www.mediawiki.org/wiki/Manual:JavaScript_unit_testing',
  4108. // If you are submitting the QUnit test suite to a TestSwarm instance,
  4109. // point this to the "inject.js" script of that instance. This is was registers
  4110. // the QUnit hooks to extract the test results and push them back up into the
  4111. // TestSwarm database.
  4112. // @example 'http://localhost/testswarm/js/inject.js'
  4113. // @example '//integration.mediawiki.org/testswarm/js/inject.js'
  4114. 'testswarm-injectjs' => false,
  4115. ),
  4116. );
  4117. /**
  4118. * Overwrite the caching key prefix with custom value.
  4119. * @since 1.19
  4120. */
  4121. $wgCachePrefix = false;
  4122. /**
  4123. * Display the new debugging toolbar. This also enables profiling on database
  4124. * queries and other useful output.
  4125. * Will disable file cache.
  4126. *
  4127. * @since 1.19
  4128. */
  4129. $wgDebugToolbar = false;
  4130. /** @} */ # end of profiling, testing and debugging }
  4131. /************************************************************************//**
  4132. * @name Search
  4133. * @{
  4134. */
  4135. /**
  4136. * Set this to true to disable the full text search feature.
  4137. */
  4138. $wgDisableTextSearch = false;
  4139. /**
  4140. * Set to true to have nicer highligted text in search results,
  4141. * by default off due to execution overhead
  4142. */
  4143. $wgAdvancedSearchHighlighting = false;
  4144. /**
  4145. * Regexp to match word boundaries, defaults for non-CJK languages
  4146. * should be empty for CJK since the words are not separate
  4147. */
  4148. $wgSearchHighlightBoundaries = '[\p{Z}\p{P}\p{C}]';
  4149. /**
  4150. * Set to true to have the search engine count total
  4151. * search matches to present in the Special:Search UI.
  4152. * Not supported by every search engine shipped with MW.
  4153. *
  4154. * This could however be slow on larger wikis, and is pretty flaky
  4155. * with the current title vs content split. Recommend avoiding until
  4156. * that's been worked out cleanly; but this may aid in testing the
  4157. * search UI and API to confirm that the result count works.
  4158. */
  4159. $wgCountTotalSearchHits = false;
  4160. /**
  4161. * Template for OpenSearch suggestions, defaults to API action=opensearch
  4162. *
  4163. * Sites with heavy load would tipically have these point to a custom
  4164. * PHP wrapper to avoid firing up mediawiki for every keystroke
  4165. *
  4166. * Placeholders: {searchTerms}
  4167. *
  4168. */
  4169. $wgOpenSearchTemplate = false;
  4170. /**
  4171. * Enable OpenSearch suggestions requested by MediaWiki. Set this to
  4172. * false if you've disabled scripts that use api?action=opensearch and
  4173. * want reduce load caused by cached scripts still pulling suggestions.
  4174. * It will let the API fallback by responding with an empty array.
  4175. */
  4176. $wgEnableOpenSearchSuggest = true;
  4177. /**
  4178. * Expiry time for search suggestion responses
  4179. */
  4180. $wgSearchSuggestCacheExpiry = 1200;
  4181. /**
  4182. * If you've disabled search semi-permanently, this also disables updates to the
  4183. * table. If you ever re-enable, be sure to rebuild the search table.
  4184. */
  4185. $wgDisableSearchUpdate = false;
  4186. /**
  4187. * List of namespaces which are searched by default.
  4188. *
  4189. * @par Example:
  4190. * @code
  4191. * $wgNamespacesToBeSearchedDefault[NS_MAIN] = true;
  4192. * $wgNamespacesToBeSearchedDefault[NS_PROJECT] = true;
  4193. * @endcode
  4194. */
  4195. $wgNamespacesToBeSearchedDefault = array(
  4196. NS_MAIN => true,
  4197. );
  4198. /**
  4199. * Namespaces to be searched when user clicks the "Help" tab
  4200. * on Special:Search.
  4201. *
  4202. * Same format as $wgNamespacesToBeSearchedDefault.
  4203. */
  4204. $wgNamespacesToBeSearchedHelp = array(
  4205. NS_PROJECT => true,
  4206. NS_HELP => true,
  4207. );
  4208. /**
  4209. * If set to true the 'searcheverything' preference will be effective only for
  4210. * logged-in users.
  4211. * Useful for big wikis to maintain different search profiles for anonymous and
  4212. * logged-in users.
  4213. *
  4214. */
  4215. $wgSearchEverythingOnlyLoggedIn = false;
  4216. /**
  4217. * Disable the internal MySQL-based search, to allow it to be
  4218. * implemented by an extension instead.
  4219. */
  4220. $wgDisableInternalSearch = false;
  4221. /**
  4222. * Set this to a URL to forward search requests to some external location.
  4223. * If the URL includes '$1', this will be replaced with the URL-encoded
  4224. * search term.
  4225. *
  4226. * @par Example:
  4227. * To forward to Google you'd have something like:
  4228. * @code
  4229. * $wgSearchForwardUrl =
  4230. * 'http://www.google.com/search?q=$1' .
  4231. * '&domains=http://example.com' .
  4232. * '&sitesearch=http://example.com' .
  4233. * '&ie=utf-8&oe=utf-8';
  4234. * @endcode
  4235. */
  4236. $wgSearchForwardUrl = null;
  4237. /**
  4238. * Search form behavior.
  4239. * - true = use Go & Search buttons
  4240. * - false = use Go button & Advanced search link
  4241. */
  4242. $wgUseTwoButtonsSearchForm = true;
  4243. /**
  4244. * Array of namespaces to generate a Google sitemap for when the
  4245. * maintenance/generateSitemap.php script is run, or false if one is to be ge-
  4246. * nerated for all namespaces.
  4247. */
  4248. $wgSitemapNamespaces = false;
  4249. /**
  4250. * Custom namespace priorities for sitemaps. Setting this will allow you to
  4251. * set custom priorities to namsepaces when sitemaps are generated using the
  4252. * maintenance/generateSitemap.php script.
  4253. *
  4254. * This should be a map of namespace IDs to priority
  4255. * @par Example:
  4256. * @code
  4257. * $wgSitemapNamespacesPriorities = array(
  4258. * NS_USER => '0.9',
  4259. * NS_HELP => '0.0',
  4260. * );
  4261. * @endcode
  4262. */
  4263. $wgSitemapNamespacesPriorities = false;
  4264. /**
  4265. * If true, searches for IP addresses will be redirected to that IP's
  4266. * contributions page. E.g. searching for "1.2.3.4" will redirect to
  4267. * [[Special:Contributions/1.2.3.4]]
  4268. */
  4269. $wgEnableSearchContributorsByIP = true;
  4270. /** @} */ # end of search settings
  4271. /************************************************************************//**
  4272. * @name Edit user interface
  4273. * @{
  4274. */
  4275. /**
  4276. * Path to the GNU diff3 utility. If the file doesn't exist, edit conflicts will
  4277. * fall back to the old behaviour (no merging).
  4278. */
  4279. $wgDiff3 = '/usr/bin/diff3';
  4280. /**
  4281. * Path to the GNU diff utility.
  4282. */
  4283. $wgDiff = '/usr/bin/diff';
  4284. /**
  4285. * Which namespaces have special treatment where they should be preview-on-open
  4286. * Internaly only Category: pages apply, but using this extensions (e.g. Semantic MediaWiki)
  4287. * can specify namespaces of pages they have special treatment for
  4288. */
  4289. $wgPreviewOnOpenNamespaces = array(
  4290. NS_CATEGORY => true
  4291. );
  4292. /**
  4293. * Activate external editor interface for files and pages
  4294. * See http://www.mediawiki.org/wiki/Manual:External_editors
  4295. */
  4296. $wgUseExternalEditor = true;
  4297. /** Go button goes straight to the edit screen if the article doesn't exist. */
  4298. $wgGoToEdit = false;
  4299. /**
  4300. * Enable the UniversalEditButton for browsers that support it
  4301. * (currently only Firefox with an extension)
  4302. * See http://universaleditbutton.org for more background information
  4303. */
  4304. $wgUniversalEditButton = true;
  4305. /**
  4306. * If user doesn't specify any edit summary when making a an edit, MediaWiki
  4307. * will try to automatically create one. This feature can be disabled by set-
  4308. * ting this variable false.
  4309. */
  4310. $wgUseAutomaticEditSummaries = true;
  4311. /** @} */ # end edit UI }
  4312. /************************************************************************//**
  4313. * @name Maintenance
  4314. * See also $wgSiteNotice
  4315. * @{
  4316. */
  4317. /**
  4318. * @cond file_level_code
  4319. * Set $wgCommandLineMode if it's not set already, to avoid notices
  4320. */
  4321. if( !isset( $wgCommandLineMode ) ) {
  4322. $wgCommandLineMode = false;
  4323. }
  4324. /** @endcond */
  4325. /** For colorized maintenance script output, is your terminal background dark ? */
  4326. $wgCommandLineDarkBg = false;
  4327. /**
  4328. * Array for extensions to register their maintenance scripts with the
  4329. * system. The key is the name of the class and the value is the full
  4330. * path to the file
  4331. */
  4332. $wgMaintenanceScripts = array();
  4333. /**
  4334. * Set this to a string to put the wiki into read-only mode. The text will be
  4335. * used as an explanation to users.
  4336. *
  4337. * This prevents most write operations via the web interface. Cache updates may
  4338. * still be possible. To prevent database writes completely, use the read_only
  4339. * option in MySQL.
  4340. */
  4341. $wgReadOnly = null;
  4342. /**
  4343. * If this lock file exists (size > 0), the wiki will be forced into read-only mode.
  4344. * Its contents will be shown to users as part of the read-only warning
  4345. * message.
  4346. *
  4347. * Will default to "{$wgUploadDirectory}/lock_yBgMBwiR" in Setup.php
  4348. */
  4349. $wgReadOnlyFile = false;
  4350. /**
  4351. * When you run the web-based upgrade utility, it will tell you what to set
  4352. * this to in order to authorize the upgrade process. It will subsequently be
  4353. * used as a password, to authorize further upgrades.
  4354. *
  4355. * For security, do not set this to a guessable string. Use the value supplied
  4356. * by the install/upgrade process. To cause the upgrader to generate a new key,
  4357. * delete the old key from LocalSettings.php.
  4358. */
  4359. $wgUpgradeKey = false;
  4360. /**
  4361. * Map GIT repository URLs to viewer URLs to provide links in Special:Version
  4362. *
  4363. * Key is a pattern passed to preg_match() and preg_replace(),
  4364. * without the delimiters (which are #) and must match the whole URL.
  4365. * The value is the replacement for the key (it can contain $1, etc.)
  4366. * %h will be replaced by the short SHA-1 (7 first chars) and %H by the
  4367. * full SHA-1 of the HEAD revision.
  4368. *
  4369. * @since 1.20
  4370. */
  4371. $wgGitRepositoryViewers = array(
  4372. 'https://gerrit.wikimedia.org/r/p/(.*)' => 'https://gerrit.wikimedia.org/r/gitweb?p=$1;h=%H',
  4373. 'ssh://(?:[a-z0-9_]+@)?gerrit.wikimedia.org:29418/(.*)' => 'https://gerrit.wikimedia.org/r/gitweb?p=$1;h=%H',
  4374. );
  4375. /** @} */ # End of maintenance }
  4376. /************************************************************************//**
  4377. * @name Recent changes, new pages, watchlist and history
  4378. * @{
  4379. */
  4380. /**
  4381. * Recentchanges items are periodically purged; entries older than this many
  4382. * seconds will go.
  4383. * Default: 13 weeks = about three months
  4384. */
  4385. $wgRCMaxAge = 13 * 7 * 24 * 3600;
  4386. /**
  4387. * Filter $wgRCLinkDays by $wgRCMaxAge to avoid showing links for numbers
  4388. * higher than what will be stored. Note that this is disabled by default
  4389. * because we sometimes do have RC data which is beyond the limit for some
  4390. * reason, and some users may use the high numbers to display that data which
  4391. * is still there.
  4392. */
  4393. $wgRCFilterByAge = false;
  4394. /**
  4395. * List of Days and Limits options to list in the Special:Recentchanges and
  4396. * Special:Recentchangeslinked pages.
  4397. */
  4398. $wgRCLinkLimits = array( 50, 100, 250, 500 );
  4399. $wgRCLinkDays = array( 1, 3, 7, 14, 30 );
  4400. /**
  4401. * Send recent changes updates via UDP. The updates will be formatted for IRC.
  4402. * Set this to the IP address of the receiver.
  4403. */
  4404. $wgRC2UDPAddress = false;
  4405. /**
  4406. * Port number for RC updates
  4407. */
  4408. $wgRC2UDPPort = false;
  4409. /**
  4410. * Prefix to prepend to each UDP packet.
  4411. * This can be used to identify the wiki. A script is available called
  4412. * mxircecho.py which listens on a UDP port, and uses a prefix ending in a
  4413. * tab to identify the IRC channel to send the log line to.
  4414. */
  4415. $wgRC2UDPPrefix = '';
  4416. /**
  4417. * If this is set to true, $wgLocalInterwiki will be prepended to links in the
  4418. * IRC feed. If this is set to a string, that string will be used as the prefix.
  4419. */
  4420. $wgRC2UDPInterwikiPrefix = false;
  4421. /**
  4422. * Set to true to omit "bot" edits (by users with the bot permission) from the
  4423. * UDP feed.
  4424. */
  4425. $wgRC2UDPOmitBots = false;
  4426. /**
  4427. * Enable user search in Special:Newpages
  4428. * This is really a temporary hack around an index install bug on some Wikipedias.
  4429. * Kill it once fixed.
  4430. */
  4431. $wgEnableNewpagesUserFilter = true;
  4432. /** Use RC Patrolling to check for vandalism */
  4433. $wgUseRCPatrol = true;
  4434. /** Use new page patrolling to check new pages on Special:Newpages */
  4435. $wgUseNPPatrol = true;
  4436. /** Provide syndication feeds (RSS, Atom) for, e.g., Recentchanges, Newpages */
  4437. $wgFeed = true;
  4438. /** Set maximum number of results to return in syndication feeds (RSS, Atom) for
  4439. * eg Recentchanges, Newpages. */
  4440. $wgFeedLimit = 50;
  4441. /** _Minimum_ timeout for cached Recentchanges feed, in seconds.
  4442. * A cached version will continue to be served out even if changes
  4443. * are made, until this many seconds runs out since the last render.
  4444. *
  4445. * If set to 0, feed caching is disabled. Use this for debugging only;
  4446. * feed generation can be pretty slow with diffs.
  4447. */
  4448. $wgFeedCacheTimeout = 60;
  4449. /** When generating Recentchanges RSS/Atom feed, diffs will not be generated for
  4450. * pages larger than this size. */
  4451. $wgFeedDiffCutoff = 32768;
  4452. /** Override the site's default RSS/ATOM feed for recentchanges that appears on
  4453. * every page. Some sites might have a different feed they'd like to promote
  4454. * instead of the RC feed (maybe like a "Recent New Articles" or "Breaking news" one).
  4455. * Should be a format as key (either 'rss' or 'atom') and an URL to the feed
  4456. * as value.
  4457. * @par Example:
  4458. * Configure the 'atom' feed to http://example.com/somefeed.xml
  4459. * @code
  4460. * $wgSiteFeed['atom'] = "http://example.com/somefeed.xml";
  4461. * @endcode
  4462. */
  4463. $wgOverrideSiteFeed = array();
  4464. /**
  4465. * Available feeds objects.
  4466. * Should probably only be defined when a page is syndicated ie when
  4467. * $wgOut->isSyndicated() is true.
  4468. */
  4469. $wgFeedClasses = array(
  4470. 'rss' => 'RSSFeed',
  4471. 'atom' => 'AtomFeed',
  4472. );
  4473. /**
  4474. * Which feed types should we provide by default? This can include 'rss',
  4475. * 'atom', neither, or both.
  4476. */
  4477. $wgAdvertisedFeedTypes = array( 'atom' );
  4478. /** Show watching users in recent changes, watchlist and page history views */
  4479. $wgRCShowWatchingUsers = false; # UPO
  4480. /** Show watching users in Page views */
  4481. $wgPageShowWatchingUsers = false;
  4482. /** Show the amount of changed characters in recent changes */
  4483. $wgRCShowChangedSize = true;
  4484. /**
  4485. * If the difference between the character counts of the text
  4486. * before and after the edit is below that value, the value will be
  4487. * highlighted on the RC page.
  4488. */
  4489. $wgRCChangedSizeThreshold = 500;
  4490. /**
  4491. * Show "Updated (since my last visit)" marker in RC view, watchlist and history
  4492. * view for watched pages with new changes */
  4493. $wgShowUpdatedMarker = true;
  4494. /**
  4495. * Disable links to talk pages of anonymous users (IPs) in listings on special
  4496. * pages like page history, Special:Recentchanges, etc.
  4497. */
  4498. $wgDisableAnonTalk = false;
  4499. /**
  4500. * Enable filtering of categories in Recentchanges
  4501. */
  4502. $wgAllowCategorizedRecentChanges = false;
  4503. /**
  4504. * Allow filtering by change tag in recentchanges, history, etc
  4505. * Has no effect if no tags are defined in valid_tag.
  4506. */
  4507. $wgUseTagFilter = true;
  4508. /** @} */ # end RC/watchlist }
  4509. /************************************************************************//**
  4510. * @name Copyright and credits settings
  4511. * @{
  4512. */
  4513. /**
  4514. * Override for copyright metadata.
  4515. *
  4516. * This is the name of the page containing information about the wiki's copyright status,
  4517. * which will be added as a link in the footer if it is specified. It overrides
  4518. * $wgRightsUrl if both are specified.
  4519. */
  4520. $wgRightsPage = null;
  4521. /**
  4522. * Set this to specify an external URL containing details about the content license used on your wiki.
  4523. * If $wgRightsPage is set then this setting is ignored.
  4524. */
  4525. $wgRightsUrl = null;
  4526. /**
  4527. * If either $wgRightsUrl or $wgRightsPage is specified then this variable gives the text for the link.
  4528. * If using $wgRightsUrl then this value must be specified. If using $wgRightsPage then the name of the
  4529. * page will also be used as the link if this variable is not set.
  4530. */
  4531. $wgRightsText = null;
  4532. /**
  4533. * Override for copyright metadata.
  4534. */
  4535. $wgRightsIcon = null;
  4536. /**
  4537. * Set to an array of metadata terms. Else they will be loaded based on $wgRightsUrl
  4538. */
  4539. $wgLicenseTerms = false;
  4540. /**
  4541. * Set this to some HTML to override the rights icon with an arbitrary logo
  4542. * @deprecated since 1.18 Use $wgFooterIcons['copyright']['copyright']
  4543. */
  4544. $wgCopyrightIcon = null;
  4545. /** Set this to true if you want detailed copyright information forms on Upload. */
  4546. $wgUseCopyrightUpload = false;
  4547. /**
  4548. * Set this to the number of authors that you want to be credited below an
  4549. * article text. Set it to zero to hide the attribution block, and a negative
  4550. * number (like -1) to show all authors. Note that this will require 2-3 extra
  4551. * database hits, which can have a not insignificant impact on performance for
  4552. * large wikis.
  4553. */
  4554. $wgMaxCredits = 0;
  4555. /** If there are more than $wgMaxCredits authors, show $wgMaxCredits of them.
  4556. * Otherwise, link to a separate credits page. */
  4557. $wgShowCreditsIfMax = true;
  4558. /** @} */ # end of copyright and credits settings }
  4559. /************************************************************************//**
  4560. * @name Import / Export
  4561. * @{
  4562. */
  4563. /**
  4564. * List of interwiki prefixes for wikis we'll accept as sources for
  4565. * Special:Import (for sysops). Since complete page history can be imported,
  4566. * these should be 'trusted'.
  4567. *
  4568. * If a user has the 'import' permission but not the 'importupload' permission,
  4569. * they will only be able to run imports through this transwiki interface.
  4570. */
  4571. $wgImportSources = array();
  4572. /**
  4573. * Optional default target namespace for interwiki imports.
  4574. * Can use this to create an incoming "transwiki"-style queue.
  4575. * Set to numeric key, not the name.
  4576. *
  4577. * Users may override this in the Special:Import dialog.
  4578. */
  4579. $wgImportTargetNamespace = null;
  4580. /**
  4581. * If set to false, disables the full-history option on Special:Export.
  4582. * This is currently poorly optimized for long edit histories, so is
  4583. * disabled on Wikimedia's sites.
  4584. */
  4585. $wgExportAllowHistory = true;
  4586. /**
  4587. * If set nonzero, Special:Export requests for history of pages with
  4588. * more revisions than this will be rejected. On some big sites things
  4589. * could get bogged down by very very long pages.
  4590. */
  4591. $wgExportMaxHistory = 0;
  4592. /**
  4593. * Return distinct author list (when not returning full history)
  4594. */
  4595. $wgExportAllowListContributors = false;
  4596. /**
  4597. * If non-zero, Special:Export accepts a "pagelink-depth" parameter
  4598. * up to this specified level, which will cause it to include all
  4599. * pages linked to from the pages you specify. Since this number
  4600. * can become *insanely large* and could easily break your wiki,
  4601. * it's disabled by default for now.
  4602. *
  4603. * @warning There's a HARD CODED limit of 5 levels of recursion to prevent a
  4604. * crazy-big export from being done by someone setting the depth number too
  4605. * high. In other words, last resort safety net.
  4606. */
  4607. $wgExportMaxLinkDepth = 0;
  4608. /**
  4609. * Whether to allow the "export all pages in namespace" option
  4610. */
  4611. $wgExportFromNamespaces = false;
  4612. /**
  4613. * Whether to allow exporting the entire wiki into a single file
  4614. */
  4615. $wgExportAllowAll = false;
  4616. /** @} */ # end of import/export }
  4617. /*************************************************************************//**
  4618. * @name Extensions
  4619. * @{
  4620. */
  4621. /**
  4622. * A list of callback functions which are called once MediaWiki is fully
  4623. * initialised
  4624. */
  4625. $wgExtensionFunctions = array();
  4626. /**
  4627. * Extension messages files.
  4628. *
  4629. * Associative array mapping extension name to the filename where messages can be
  4630. * found. The file should contain variable assignments. Any of the variables
  4631. * present in languages/messages/MessagesEn.php may be defined, but $messages
  4632. * is the most common.
  4633. *
  4634. * Variables defined in extensions will override conflicting variables defined
  4635. * in the core.
  4636. *
  4637. * @par Example:
  4638. * @code
  4639. * $wgExtensionMessagesFiles['ConfirmEdit'] = __DIR__.'/ConfirmEdit.i18n.php';
  4640. * @endcode
  4641. */
  4642. $wgExtensionMessagesFiles = array();
  4643. /**
  4644. * Parser output hooks.
  4645. * This is an associative array where the key is an extension-defined tag
  4646. * (typically the extension name), and the value is a PHP callback.
  4647. * These will be called as an OutputPageParserOutput hook, if the relevant
  4648. * tag has been registered with the parser output object.
  4649. *
  4650. * Registration is done with $pout->addOutputHook( $tag, $data ).
  4651. *
  4652. * The callback has the form:
  4653. * @code
  4654. * function outputHook( $outputPage, $parserOutput, $data ) { ... }
  4655. * @endcode
  4656. */
  4657. $wgParserOutputHooks = array();
  4658. /**
  4659. * List of valid skin names.
  4660. * The key should be the name in all lower case, the value should be a properly
  4661. * cased name for the skin. This value will be prefixed with "Skin" to create the
  4662. * class name of the skin to load, and if the skin's class cannot be found through
  4663. * the autoloader it will be used to load a .php file by that name in the skins directory.
  4664. * The default skins will be added later, by Skin::getSkinNames(). Use
  4665. * Skin::getSkinNames() as an accessor if you wish to have access to the full list.
  4666. */
  4667. $wgValidSkinNames = array();
  4668. /**
  4669. * Special page list.
  4670. * See the top of SpecialPage.php for documentation.
  4671. */
  4672. $wgSpecialPages = array();
  4673. /**
  4674. * Array mapping class names to filenames, for autoloading.
  4675. */
  4676. $wgAutoloadClasses = array();
  4677. /**
  4678. * An array of extension types and inside that their names, versions, authors,
  4679. * urls, descriptions and pointers to localized description msgs. Note that
  4680. * the version, url, description and descriptionmsg key can be omitted.
  4681. *
  4682. * @code
  4683. * $wgExtensionCredits[$type][] = array(
  4684. * 'name' => 'Example extension',
  4685. * 'version' => 1.9,
  4686. * 'path' => __FILE__,
  4687. * 'author' => 'Foo Barstein',
  4688. * 'url' => 'http://wwww.example.com/Example%20Extension/',
  4689. * 'description' => 'An example extension',
  4690. * 'descriptionmsg' => 'exampleextension-desc',
  4691. * );
  4692. * @endcode
  4693. *
  4694. * Where $type is 'specialpage', 'parserhook', 'variable', 'media' or 'other'.
  4695. * Where 'descriptionmsg' can be an array with message key and parameters:
  4696. * 'descriptionmsg' => array( 'exampleextension-desc', param1, param2, ... ),
  4697. */
  4698. $wgExtensionCredits = array();
  4699. /**
  4700. * Authentication plugin.
  4701. * @var $wgAuth AuthPlugin
  4702. */
  4703. $wgAuth = null;
  4704. /**
  4705. * Global list of hooks.
  4706. *
  4707. * The key is one of the events made available by MediaWiki, you can find
  4708. * a description for most of them in docs/hooks.txt. The array is used
  4709. * internally by Hook:run().
  4710. *
  4711. * The value can be one of:
  4712. *
  4713. * - A function name:
  4714. * @code
  4715. * $wgHooks['event_name'][] = $function;
  4716. * @endcode
  4717. * - A function with some data:
  4718. * @code
  4719. * $wgHooks['event_name'][] = array($function, $data);
  4720. * @endcode
  4721. * - A an object method:
  4722. * @code
  4723. * $wgHooks['event_name'][] = array($object, 'method');
  4724. * @endcode
  4725. *
  4726. * @warning You should always append to an event array or you will end up
  4727. * deleting a previous registered hook.
  4728. *
  4729. * @todo Does it support PHP closures?
  4730. */
  4731. $wgHooks = array();
  4732. /**
  4733. * Maps jobs to their handling classes; extensions
  4734. * can add to this to provide custom jobs
  4735. */
  4736. $wgJobClasses = array(
  4737. 'refreshLinks' => 'RefreshLinksJob',
  4738. 'refreshLinks2' => 'RefreshLinksJob2',
  4739. 'htmlCacheUpdate' => 'HTMLCacheUpdateJob',
  4740. 'html_cache_update' => 'HTMLCacheUpdateJob', // backwards-compatible
  4741. 'sendMail' => 'EmaillingJob',
  4742. 'enotifNotify' => 'EnotifNotifyJob',
  4743. 'fixDoubleRedirect' => 'DoubleRedirectJob',
  4744. 'uploadFromUrl' => 'UploadFromUrlJob',
  4745. );
  4746. /**
  4747. * Jobs that must be explicitly requested, i.e. aren't run by job runners unless special flags are set.
  4748. *
  4749. * These can be:
  4750. * - Very long-running jobs.
  4751. * - Jobs that you would never want to run as part of a page rendering request.
  4752. * - Jobs that you want to run on specialized machines ( like transcoding, or a particular
  4753. * machine on your cluster has 'outside' web access you could restrict uploadFromUrl )
  4754. */
  4755. $wgJobTypesExcludedFromDefaultQueue = array();
  4756. /**
  4757. * Additional functions to be performed with updateSpecialPages.
  4758. * Expensive Querypages are already updated.
  4759. */
  4760. $wgSpecialPageCacheUpdates = array(
  4761. 'Statistics' => array( 'SiteStatsUpdate', 'cacheUpdate' )
  4762. );
  4763. /**
  4764. * Hooks that are used for outputting exceptions. Format is:
  4765. * $wgExceptionHooks[] = $funcname
  4766. * or:
  4767. * $wgExceptionHooks[] = array( $class, $funcname )
  4768. * Hooks should return strings or false
  4769. */
  4770. $wgExceptionHooks = array();
  4771. /**
  4772. * Page property link table invalidation lists. When a page property
  4773. * changes, this may require other link tables to be updated (eg
  4774. * adding __HIDDENCAT__ means the hiddencat tracking category will
  4775. * have been added, so the categorylinks table needs to be rebuilt).
  4776. * This array can be added to by extensions.
  4777. */
  4778. $wgPagePropLinkInvalidations = array(
  4779. 'hiddencat' => 'categorylinks',
  4780. );
  4781. /** @} */ # End extensions }
  4782. /*************************************************************************//**
  4783. * @name Categories
  4784. * @{
  4785. */
  4786. /**
  4787. * Use experimental, DMOZ-like category browser
  4788. */
  4789. $wgUseCategoryBrowser = false;
  4790. /**
  4791. * On category pages, show thumbnail gallery for images belonging to that
  4792. * category instead of listing them as articles.
  4793. */
  4794. $wgCategoryMagicGallery = true;
  4795. /**
  4796. * Paging limit for categories
  4797. */
  4798. $wgCategoryPagingLimit = 200;
  4799. /**
  4800. * Specify how category names should be sorted, when listed on a category page.
  4801. * A sorting scheme is also known as a collation.
  4802. *
  4803. * Available values are:
  4804. *
  4805. * - uppercase: Converts the category name to upper case, and sorts by that.
  4806. *
  4807. * - identity: Does no conversion. Sorts by binary value of the string.
  4808. *
  4809. * - uca-default: Provides access to the Unicode Collation Algorithm with
  4810. * the default element table. This is a compromise collation which sorts
  4811. * all languages in a mediocre way. However, it is better than "uppercase".
  4812. *
  4813. * To use the uca-default collation, you must have PHP's intl extension
  4814. * installed. See http://php.net/manual/en/intl.setup.php . The details of the
  4815. * resulting collation will depend on the version of ICU installed on the
  4816. * server.
  4817. *
  4818. * After you change this, you must run maintenance/updateCollation.php to fix
  4819. * the sort keys in the database.
  4820. *
  4821. * Extensions can define there own collations by subclassing Collation
  4822. * and using the Collation::factory hook.
  4823. */
  4824. $wgCategoryCollation = 'uppercase';
  4825. /** @} */ # End categories }
  4826. /*************************************************************************//**
  4827. * @name Logging
  4828. * @{
  4829. */
  4830. /**
  4831. * The logging system has two levels: an event type, which describes the
  4832. * general category and can be viewed as a named subset of all logs; and
  4833. * an action, which is a specific kind of event that can exist in that
  4834. * log type.
  4835. */
  4836. $wgLogTypes = array(
  4837. '',
  4838. 'block',
  4839. 'protect',
  4840. 'rights',
  4841. 'delete',
  4842. 'upload',
  4843. 'move',
  4844. 'import',
  4845. 'patrol',
  4846. 'merge',
  4847. 'suppress',
  4848. );
  4849. /**
  4850. * This restricts log access to those who have a certain right
  4851. * Users without this will not see it in the option menu and can not view it
  4852. * Restricted logs are not added to recent changes
  4853. * Logs should remain non-transcludable
  4854. * Format: logtype => permissiontype
  4855. */
  4856. $wgLogRestrictions = array(
  4857. 'suppress' => 'suppressionlog'
  4858. );
  4859. /**
  4860. * Show/hide links on Special:Log will be shown for these log types.
  4861. *
  4862. * This is associative array of log type => boolean "hide by default"
  4863. *
  4864. * See $wgLogTypes for a list of available log types.
  4865. *
  4866. * @par Example:
  4867. * @code
  4868. * $wgFilterLogTypes => array(
  4869. * 'move' => true,
  4870. * 'import' => false,
  4871. * );
  4872. * @endcode
  4873. *
  4874. * Will display show/hide links for the move and import logs. Move logs will be
  4875. * hidden by default unless the link is clicked. Import logs will be shown by
  4876. * default, and hidden when the link is clicked.
  4877. *
  4878. * A message of the form log-show-hide-[type] should be added, and will be used
  4879. * for the link text.
  4880. */
  4881. $wgFilterLogTypes = array(
  4882. 'patrol' => true
  4883. );
  4884. /**
  4885. * Lists the message key string for each log type. The localized messages
  4886. * will be listed in the user interface.
  4887. *
  4888. * Extensions with custom log types may add to this array.
  4889. *
  4890. * @since 1.19, if you follow the naming convention log-name-TYPE,
  4891. * where TYPE is your log type, yoy don't need to use this array.
  4892. */
  4893. $wgLogNames = array(
  4894. '' => 'all-logs-page',
  4895. 'block' => 'blocklogpage',
  4896. 'protect' => 'protectlogpage',
  4897. 'rights' => 'rightslog',
  4898. 'delete' => 'dellogpage',
  4899. 'upload' => 'uploadlogpage',
  4900. 'move' => 'movelogpage',
  4901. 'import' => 'importlogpage',
  4902. 'patrol' => 'patrol-log-page',
  4903. 'merge' => 'mergelog',
  4904. 'suppress' => 'suppressionlog',
  4905. );
  4906. /**
  4907. * Lists the message key string for descriptive text to be shown at the
  4908. * top of each log type.
  4909. *
  4910. * Extensions with custom log types may add to this array.
  4911. *
  4912. * @since 1.19, if you follow the naming convention log-description-TYPE,
  4913. * where TYPE is your log type, yoy don't need to use this array.
  4914. */
  4915. $wgLogHeaders = array(
  4916. '' => 'alllogstext',
  4917. 'block' => 'blocklogtext',
  4918. 'protect' => 'protectlogtext',
  4919. 'rights' => 'rightslogtext',
  4920. 'delete' => 'dellogpagetext',
  4921. 'upload' => 'uploadlogpagetext',
  4922. 'move' => 'movelogpagetext',
  4923. 'import' => 'importlogpagetext',
  4924. 'patrol' => 'patrol-log-header',
  4925. 'merge' => 'mergelogpagetext',
  4926. 'suppress' => 'suppressionlogtext',
  4927. );
  4928. /**
  4929. * Lists the message key string for formatting individual events of each
  4930. * type and action when listed in the logs.
  4931. *
  4932. * Extensions with custom log types may add to this array.
  4933. */
  4934. $wgLogActions = array(
  4935. 'block/block' => 'blocklogentry',
  4936. 'block/unblock' => 'unblocklogentry',
  4937. 'block/reblock' => 'reblock-logentry',
  4938. 'protect/protect' => 'protectedarticle',
  4939. 'protect/modify' => 'modifiedarticleprotection',
  4940. 'protect/unprotect' => 'unprotectedarticle',
  4941. 'protect/move_prot' => 'movedarticleprotection',
  4942. 'rights/rights' => 'rightslogentry',
  4943. 'rights/autopromote' => 'rightslogentry-autopromote',
  4944. 'upload/upload' => 'uploadedimage',
  4945. 'upload/overwrite' => 'overwroteimage',
  4946. 'upload/revert' => 'uploadedimage',
  4947. 'import/upload' => 'import-logentry-upload',
  4948. 'import/interwiki' => 'import-logentry-interwiki',
  4949. 'merge/merge' => 'pagemerge-logentry',
  4950. 'suppress/block' => 'blocklogentry',
  4951. 'suppress/reblock' => 'reblock-logentry',
  4952. );
  4953. /**
  4954. * The same as above, but here values are names of functions,
  4955. * not messages.
  4956. * @see LogPage::actionText
  4957. * @see LogFormatter
  4958. */
  4959. $wgLogActionsHandlers = array(
  4960. 'move/move' => 'MoveLogFormatter',
  4961. 'move/move_redir' => 'MoveLogFormatter',
  4962. 'delete/delete' => 'DeleteLogFormatter',
  4963. 'delete/restore' => 'DeleteLogFormatter',
  4964. 'delete/revision' => 'DeleteLogFormatter',
  4965. 'delete/event' => 'DeleteLogFormatter',
  4966. 'suppress/revision' => 'DeleteLogFormatter',
  4967. 'suppress/event' => 'DeleteLogFormatter',
  4968. 'suppress/delete' => 'DeleteLogFormatter',
  4969. 'patrol/patrol' => 'PatrolLogFormatter',
  4970. );
  4971. /**
  4972. * Maintain a log of newusers at Log/newusers?
  4973. */
  4974. $wgNewUserLog = true;
  4975. /** @} */ # end logging }
  4976. /*************************************************************************//**
  4977. * @name Special pages (general and miscellaneous)
  4978. * @{
  4979. */
  4980. /**
  4981. * Allow special page inclusions such as {{Special:Allpages}}
  4982. */
  4983. $wgAllowSpecialInclusion = true;
  4984. /**
  4985. * Set this to an array of special page names to prevent
  4986. * maintenance/updateSpecialPages.php from updating those pages.
  4987. */
  4988. $wgDisableQueryPageUpdate = false;
  4989. /**
  4990. * List of special pages, followed by what subtitle they should go under
  4991. * at Special:SpecialPages
  4992. */
  4993. $wgSpecialPageGroups = array(
  4994. 'DoubleRedirects' => 'maintenance',
  4995. 'BrokenRedirects' => 'maintenance',
  4996. 'Lonelypages' => 'maintenance',
  4997. 'Uncategorizedpages' => 'maintenance',
  4998. 'Uncategorizedcategories' => 'maintenance',
  4999. 'Uncategorizedimages' => 'maintenance',
  5000. 'Uncategorizedtemplates' => 'maintenance',
  5001. 'Unusedcategories' => 'maintenance',
  5002. 'Unusedimages' => 'maintenance',
  5003. 'Protectedpages' => 'maintenance',
  5004. 'Protectedtitles' => 'maintenance',
  5005. 'Unusedtemplates' => 'maintenance',
  5006. 'Withoutinterwiki' => 'maintenance',
  5007. 'Longpages' => 'maintenance',
  5008. 'Shortpages' => 'maintenance',
  5009. 'Ancientpages' => 'maintenance',
  5010. 'Deadendpages' => 'maintenance',
  5011. 'Wantedpages' => 'maintenance',
  5012. 'Wantedcategories' => 'maintenance',
  5013. 'Wantedfiles' => 'maintenance',
  5014. 'Wantedtemplates' => 'maintenance',
  5015. 'Unwatchedpages' => 'maintenance',
  5016. 'Fewestrevisions' => 'maintenance',
  5017. 'Userlogin' => 'login',
  5018. 'Userlogout' => 'login',
  5019. 'CreateAccount' => 'login',
  5020. 'Recentchanges' => 'changes',
  5021. 'Recentchangeslinked' => 'changes',
  5022. 'Watchlist' => 'changes',
  5023. 'Newimages' => 'changes',
  5024. 'Newpages' => 'changes',
  5025. 'Log' => 'changes',
  5026. 'Tags' => 'changes',
  5027. 'Upload' => 'media',
  5028. 'Listfiles' => 'media',
  5029. 'MIMEsearch' => 'media',
  5030. 'FileDuplicateSearch' => 'media',
  5031. 'Filepath' => 'media',
  5032. 'Listusers' => 'users',
  5033. 'Activeusers' => 'users',
  5034. 'Listgrouprights' => 'users',
  5035. 'BlockList' => 'users',
  5036. 'Contributions' => 'users',
  5037. 'Emailuser' => 'users',
  5038. 'Listadmins' => 'users',
  5039. 'Listbots' => 'users',
  5040. 'Userrights' => 'users',
  5041. 'Block' => 'users',
  5042. 'Unblock' => 'users',
  5043. 'Preferences' => 'users',
  5044. 'ChangeEmail' => 'users',
  5045. 'ChangePassword' => 'users',
  5046. 'DeletedContributions' => 'users',
  5047. 'PasswordReset' => 'users',
  5048. 'Mostlinked' => 'highuse',
  5049. 'Mostlinkedcategories' => 'highuse',
  5050. 'Mostlinkedtemplates' => 'highuse',
  5051. 'Mostcategories' => 'highuse',
  5052. 'Mostimages' => 'highuse',
  5053. 'Mostinterwikis' => 'highuse',
  5054. 'Mostrevisions' => 'highuse',
  5055. 'Allpages' => 'pages',
  5056. 'Prefixindex' => 'pages',
  5057. 'Listredirects' => 'pages',
  5058. 'Categories' => 'pages',
  5059. 'Disambiguations' => 'pages',
  5060. 'Randompage' => 'redirects',
  5061. 'Randomredirect' => 'redirects',
  5062. 'Mypage' => 'redirects',
  5063. 'Mytalk' => 'redirects',
  5064. 'Mycontributions' => 'redirects',
  5065. 'Search' => 'redirects',
  5066. 'LinkSearch' => 'redirects',
  5067. 'ComparePages' => 'pagetools',
  5068. 'Movepage' => 'pagetools',
  5069. 'MergeHistory' => 'pagetools',
  5070. 'Revisiondelete' => 'pagetools',
  5071. 'Undelete' => 'pagetools',
  5072. 'Export' => 'pagetools',
  5073. 'Import' => 'pagetools',
  5074. 'Whatlinkshere' => 'pagetools',
  5075. 'Statistics' => 'wiki',
  5076. 'Version' => 'wiki',
  5077. 'Lockdb' => 'wiki',
  5078. 'Unlockdb' => 'wiki',
  5079. 'Allmessages' => 'wiki',
  5080. 'Popularpages' => 'wiki',
  5081. 'Specialpages' => 'other',
  5082. 'Blockme' => 'other',
  5083. 'Booksources' => 'other',
  5084. 'JavaScriptTest' => 'other',
  5085. );
  5086. /** Whether or not to sort special pages in Special:Specialpages */
  5087. $wgSortSpecialPages = true;
  5088. /**
  5089. * On Special:Unusedimages, consider images "used", if they are put
  5090. * into a category. Default (false) is not to count those as used.
  5091. */
  5092. $wgCountCategorizedImagesAsUsed = false;
  5093. /**
  5094. * Maximum number of links to a redirect page listed on
  5095. * Special:Whatlinkshere/RedirectDestination
  5096. */
  5097. $wgMaxRedirectLinksRetrieved = 500;
  5098. /** @} */ # end special pages }
  5099. /*************************************************************************//**
  5100. * @name Actions
  5101. * @{
  5102. */
  5103. /**
  5104. * Array of allowed values for the "title=foo&action=<action>" parameter. Syntax is:
  5105. * 'foo' => 'ClassName' Load the specified class which subclasses Action
  5106. * 'foo' => true Load the class FooAction which subclasses Action
  5107. * If something is specified in the getActionOverrides()
  5108. * of the relevant Page object it will be used
  5109. * instead of the default class.
  5110. * 'foo' => false The action is disabled; show an error message
  5111. * Unsetting core actions will probably cause things to complain loudly.
  5112. */
  5113. $wgActions = array(
  5114. 'credits' => true,
  5115. 'delete' => true,
  5116. 'edit' => true,
  5117. 'history' => true,
  5118. 'info' => true,
  5119. 'markpatrolled' => true,
  5120. 'protect' => true,
  5121. 'purge' => true,
  5122. 'raw' => true,
  5123. 'render' => true,
  5124. 'revert' => true,
  5125. 'revisiondelete' => true,
  5126. 'rollback' => true,
  5127. 'submit' => true,
  5128. 'unprotect' => true,
  5129. 'unwatch' => true,
  5130. 'view' => true,
  5131. 'watch' => true,
  5132. );
  5133. /**
  5134. * Array of disabled article actions, e.g. view, edit, delete, etc.
  5135. * @deprecated since 1.18; just set $wgActions['action'] = false instead
  5136. */
  5137. $wgDisabledActions = array();
  5138. /** @} */ # end actions }
  5139. /*************************************************************************//**
  5140. * @name Robot (search engine crawler) policy
  5141. * See also $wgNoFollowLinks.
  5142. * @{
  5143. */
  5144. /**
  5145. * Default robot policy. The default policy is to encourage indexing and fol-
  5146. * lowing of links. It may be overridden on a per-namespace and/or per-page
  5147. * basis.
  5148. */
  5149. $wgDefaultRobotPolicy = 'index,follow';
  5150. /**
  5151. * Robot policies per namespaces. The default policy is given above, the array
  5152. * is made of namespace constants as defined in includes/Defines.php. You can-
  5153. * not specify a different default policy for NS_SPECIAL: it is always noindex,
  5154. * nofollow. This is because a number of special pages (e.g., ListPages) have
  5155. * many permutations of options that display the same data under redundant
  5156. * URLs, so search engine spiders risk getting lost in a maze of twisty special
  5157. * pages, all alike, and never reaching your actual content.
  5158. *
  5159. * @par Example:
  5160. * @code
  5161. * $wgNamespaceRobotPolicies = array( NS_TALK => 'noindex' );
  5162. * @endcode
  5163. */
  5164. $wgNamespaceRobotPolicies = array();
  5165. /**
  5166. * Robot policies per article. These override the per-namespace robot policies.
  5167. * Must be in the form of an array where the key part is a properly canonical-
  5168. * ised text form title and the value is a robot policy.
  5169. *
  5170. * @par Example:
  5171. * @code
  5172. * $wgArticleRobotPolicies = array(
  5173. * 'Main Page' => 'noindex,follow',
  5174. * 'User:Bob' => 'index,follow',
  5175. * );
  5176. * @endcode
  5177. *
  5178. * @par Example that DOES NOT WORK because the names are not canonical text
  5179. * forms:
  5180. * @code
  5181. * $wgArticleRobotPolicies = array(
  5182. * # Underscore, not space!
  5183. * 'Main_Page' => 'noindex,follow',
  5184. * # "Project", not the actual project name!
  5185. * 'Project:X' => 'index,follow',
  5186. * # Needs to be "Abc", not "abc" (unless $wgCapitalLinks is false for that namespace)!
  5187. * 'abc' => 'noindex,nofollow'
  5188. * );
  5189. * @endcode
  5190. */
  5191. $wgArticleRobotPolicies = array();
  5192. /**
  5193. * An array of namespace keys in which the __INDEX__/__NOINDEX__ magic words
  5194. * will not function, so users can't decide whether pages in that namespace are
  5195. * indexed by search engines. If set to null, default to $wgContentNamespaces.
  5196. *
  5197. * @par Example:
  5198. * @code
  5199. * $wgExemptFromUserRobotsControl = array( NS_MAIN, NS_TALK, NS_PROJECT );
  5200. * @endcode
  5201. */
  5202. $wgExemptFromUserRobotsControl = null;
  5203. /** @} */ # End robot policy }
  5204. /************************************************************************//**
  5205. * @name AJAX and API
  5206. * Note: The AJAX entry point which this section refers to is gradually being
  5207. * replaced by the API entry point, api.php. They are essentially equivalent.
  5208. * Both of them are used for dynamic client-side features, via XHR.
  5209. * @{
  5210. */
  5211. /**
  5212. * Enable the MediaWiki API for convenient access to
  5213. * machine-readable data via api.php
  5214. *
  5215. * See http://www.mediawiki.org/wiki/API
  5216. */
  5217. $wgEnableAPI = true;
  5218. /**
  5219. * Allow the API to be used to perform write operations
  5220. * (page edits, rollback, etc.) when an authorised user
  5221. * accesses it
  5222. */
  5223. $wgEnableWriteAPI = true;
  5224. /**
  5225. * API module extensions.
  5226. * Associative array mapping module name to class name.
  5227. * Extension modules may override the core modules.
  5228. * @todo Describe each of the variables, group them and add examples
  5229. */
  5230. $wgAPIModules = array();
  5231. $wgAPIMetaModules = array();
  5232. $wgAPIPropModules = array();
  5233. $wgAPIListModules = array();
  5234. /**
  5235. * Maximum amount of rows to scan in a DB query in the API
  5236. * The default value is generally fine
  5237. */
  5238. $wgAPIMaxDBRows = 5000;
  5239. /**
  5240. * The maximum size (in bytes) of an API result.
  5241. * @warning Do not set this lower than $wgMaxArticleSize*1024
  5242. */
  5243. $wgAPIMaxResultSize = 8388608;
  5244. /**
  5245. * The maximum number of uncached diffs that can be retrieved in one API
  5246. * request. Set this to 0 to disable API diffs altogether
  5247. */
  5248. $wgAPIMaxUncachedDiffs = 1;
  5249. /**
  5250. * Log file or URL (TCP or UDP) to log API requests to, or false to disable
  5251. * API request logging
  5252. */
  5253. $wgAPIRequestLog = false;
  5254. /**
  5255. * Set the timeout for the API help text cache. If set to 0, caching disabled
  5256. */
  5257. $wgAPICacheHelpTimeout = 60*60;
  5258. /**
  5259. * Enable AJAX framework
  5260. */
  5261. $wgUseAjax = true;
  5262. /**
  5263. * List of Ajax-callable functions.
  5264. * Extensions acting as Ajax callbacks must register here
  5265. */
  5266. $wgAjaxExportList = array();
  5267. /**
  5268. * Enable watching/unwatching pages using AJAX.
  5269. * Requires $wgUseAjax to be true too.
  5270. */
  5271. $wgAjaxWatch = true;
  5272. /**
  5273. * Enable AJAX check for file overwrite, pre-upload
  5274. */
  5275. $wgAjaxUploadDestCheck = true;
  5276. /**
  5277. * Enable previewing licences via AJAX. Also requires $wgEnableAPI to be true.
  5278. */
  5279. $wgAjaxLicensePreview = true;
  5280. /**
  5281. * Settings for incoming cross-site AJAX requests:
  5282. * Newer browsers support cross-site AJAX when the target resource allows requests
  5283. * from the origin domain by the Access-Control-Allow-Origin header.
  5284. * This is currently only used by the API (requests to api.php)
  5285. * $wgCrossSiteAJAXdomains can be set using a wildcard syntax:
  5286. *
  5287. * - '*' matches any number of characters
  5288. * - '?' matches any 1 character
  5289. *
  5290. * @par Example:
  5291. * @code
  5292. * $wgCrossSiteAJAXdomains = array(
  5293. * 'www.mediawiki.org',
  5294. * '*.wikipedia.org',
  5295. * '*.wikimedia.org',
  5296. * '*.wiktionary.org',
  5297. * );
  5298. * @endcode
  5299. */
  5300. $wgCrossSiteAJAXdomains = array();
  5301. /**
  5302. * Domains that should not be allowed to make AJAX requests,
  5303. * even if they match one of the domains allowed by $wgCrossSiteAJAXdomains
  5304. * Uses the same syntax as $wgCrossSiteAJAXdomains
  5305. */
  5306. $wgCrossSiteAJAXdomainExceptions = array();
  5307. /** @} */ # End AJAX and API }
  5308. /************************************************************************//**
  5309. * @name Shell and process control
  5310. * @{
  5311. */
  5312. /**
  5313. * Maximum amount of virtual memory available to shell processes under linux, in KB.
  5314. */
  5315. $wgMaxShellMemory = 102400;
  5316. /**
  5317. * Maximum file size created by shell processes under linux, in KB
  5318. * ImageMagick convert for example can be fairly hungry for scratch space
  5319. */
  5320. $wgMaxShellFileSize = 102400;
  5321. /**
  5322. * Maximum CPU time in seconds for shell processes under linux
  5323. */
  5324. $wgMaxShellTime = 180;
  5325. /**
  5326. * Executable path of the PHP cli binary (php/php5). Should be set up on install.
  5327. */
  5328. $wgPhpCli = '/usr/bin/php';
  5329. /**
  5330. * Locale for LC_CTYPE, to work around http://bugs.php.net/bug.php?id=45132
  5331. * For Unix-like operating systems, set this to to a locale that has a UTF-8
  5332. * character set. Only the character set is relevant.
  5333. */
  5334. $wgShellLocale = 'en_US.utf8';
  5335. /** @} */ # End shell }
  5336. /************************************************************************//**
  5337. * @name HTTP client
  5338. * @{
  5339. */
  5340. /**
  5341. * Timeout for HTTP requests done internally
  5342. */
  5343. $wgHTTPTimeout = 25;
  5344. /**
  5345. * Timeout for Asynchronous (background) HTTP requests
  5346. */
  5347. $wgAsyncHTTPTimeout = 25;
  5348. /**
  5349. * Proxy to use for CURL requests.
  5350. */
  5351. $wgHTTPProxy = false;
  5352. /** @} */ # End HTTP client }
  5353. /************************************************************************//**
  5354. * @name Job queue
  5355. * See also $wgEnotifUseJobQ.
  5356. * @{
  5357. */
  5358. /**
  5359. * Number of jobs to perform per request. May be less than one in which case
  5360. * jobs are performed probabalistically. If this is zero, jobs will not be done
  5361. * during ordinary apache requests. In this case, maintenance/runJobs.php should
  5362. * be run periodically.
  5363. */
  5364. $wgJobRunRate = 1;
  5365. /**
  5366. * Number of rows to update per job
  5367. */
  5368. $wgUpdateRowsPerJob = 500;
  5369. /**
  5370. * Number of rows to update per query
  5371. */
  5372. $wgUpdateRowsPerQuery = 100;
  5373. /** @} */ # End job queue }
  5374. /************************************************************************//**
  5375. * @name HipHop compilation
  5376. * @{
  5377. */
  5378. /**
  5379. * The build directory for HipHop compilation.
  5380. * Defaults to '$IP/maintenance/hiphop/build'.
  5381. */
  5382. $wgHipHopBuildDirectory = false;
  5383. /**
  5384. * The HipHop build type. Can be either "Debug" or "Release".
  5385. */
  5386. $wgHipHopBuildType = 'Debug';
  5387. /**
  5388. * Number of parallel processes to use during HipHop compilation, or "detect"
  5389. * to guess from system properties.
  5390. */
  5391. $wgHipHopCompilerProcs = 'detect';
  5392. /**
  5393. * Filesystem extensions directory. Defaults to $IP/../extensions.
  5394. *
  5395. * To compile extensions with HipHop, set $wgExtensionsDirectory correctly,
  5396. * and use code like:
  5397. * @code
  5398. * require( MWInit::extensionSetupPath( 'Extension/Extension.php' ) );
  5399. * @endcode
  5400. *
  5401. * to include the extension setup file from LocalSettings.php. It is not
  5402. * necessary to set this variable unless you use MWInit::extensionSetupPath().
  5403. */
  5404. $wgExtensionsDirectory = false;
  5405. /**
  5406. * A list of files that should be compiled into a HipHop build, in addition to
  5407. * those listed in $wgAutoloadClasses. Add to this array in an extension setup
  5408. * file in order to add files to the build.
  5409. *
  5410. * The files listed here must either be either absolute paths under $IP or
  5411. * under $wgExtensionsDirectory, or paths relative to the virtual source root
  5412. * "$IP/..", i.e. starting with "phase3" for core files, and "extensions" for
  5413. * extension files.
  5414. */
  5415. $wgCompiledFiles = array();
  5416. /** @} */ # End of HipHop compilation }
  5417. /************************************************************************//**
  5418. * @name Mobile support
  5419. * @{
  5420. */
  5421. /**
  5422. * Name of the class used for mobile device detection, must be inherited from
  5423. * IDeviceDetector.
  5424. */
  5425. $wgDeviceDetectionClass = 'DeviceDetection';
  5426. /** @} */ # End of Mobile support }
  5427. /************************************************************************//**
  5428. * @name Miscellaneous
  5429. * @{
  5430. */
  5431. /** Name of the external diff engine to use */
  5432. $wgExternalDiffEngine = false;
  5433. /**
  5434. * Disable redirects to special pages and interwiki redirects, which use a 302
  5435. * and have no "redirected from" link.
  5436. *
  5437. * @note This is only for articles with #REDIRECT in them. URL's containing a
  5438. * local interwiki prefix (or a non-canonical special page name) are still hard
  5439. * redirected regardless of this setting.
  5440. */
  5441. $wgDisableHardRedirects = false;
  5442. /**
  5443. * LinkHolderArray batch size
  5444. * For debugging
  5445. */
  5446. $wgLinkHolderBatchSize = 1000;
  5447. /**
  5448. * By default MediaWiki does not register links pointing to same server in
  5449. * externallinks dataset, use this value to override:
  5450. */
  5451. $wgRegisterInternalExternals = false;
  5452. /**
  5453. * Maximum number of pages to move at once when moving subpages with a page.
  5454. */
  5455. $wgMaximumMovedPages = 100;
  5456. /**
  5457. * Fix double redirects after a page move.
  5458. * Tends to conflict with page move vandalism, use only on a private wiki.
  5459. */
  5460. $wgFixDoubleRedirects = false;
  5461. /**
  5462. * Allow redirection to another page when a user logs in.
  5463. * To enable, set to a string like 'Main Page'
  5464. */
  5465. $wgRedirectOnLogin = null;
  5466. /**
  5467. * Configuration for processing pool control, for use in high-traffic wikis.
  5468. * An implementation is provided in the PoolCounter extension.
  5469. *
  5470. * This configuration array maps pool types to an associative array. The only
  5471. * defined key in the associative array is "class", which gives the class name.
  5472. * The remaining elements are passed through to the class as constructor
  5473. * parameters.
  5474. *
  5475. * @par Example:
  5476. * @code
  5477. * $wgPoolCounterConf = array( 'ArticleView' => array(
  5478. * 'class' => 'PoolCounter_Client',
  5479. * 'timeout' => 15, // wait timeout in seconds
  5480. * 'workers' => 5, // maximum number of active threads in each pool
  5481. * 'maxqueue' => 50, // maximum number of total threads in each pool
  5482. * ... any extension-specific options...
  5483. * );
  5484. * @endcode
  5485. */
  5486. $wgPoolCounterConf = null;
  5487. /**
  5488. * To disable file delete/restore temporarily
  5489. */
  5490. $wgUploadMaintenance = false;
  5491. /**
  5492. * Allows running of selenium tests via maintenance/tests/RunSeleniumTests.php
  5493. */
  5494. $wgEnableSelenium = false;
  5495. $wgSeleniumTestConfigs = array();
  5496. $wgSeleniumConfigFile = null;
  5497. $wgDBtestuser = ''; //db user that has permission to create and drop the test databases only
  5498. $wgDBtestpassword = '';
  5499. /**
  5500. * Whether the user must enter their password to change their e-mail address
  5501. *
  5502. * @since 1.20
  5503. */
  5504. $wgRequirePasswordforEmailChange = true;
  5505. /**
  5506. * For really cool vim folding this needs to be at the end:
  5507. * vim: foldmarker=@{,@} foldmethod=marker
  5508. * @}
  5509. */