PageRenderTime 102ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 1ms

/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

Large files files are truncated, but you can click here to view the full file

  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. /**…

Large files files are truncated, but you can click here to view the full file