* @global string $wgServer
*/
$wgServer = '';
+
+if( isset( $_SERVER['SERVER_NAME'] ) ) {
+ $wgServerName = $_SERVER['SERVER_NAME'];
+} elseif( isset( $_SERVER['HOSTNAME'] ) ) {
+ $wgServerName = $_SERVER['HOSTNAME'];
+} else {
+ # FIXME: Fall back on... something else?
+ $wgServerName = 'localhost';
+}
+
# check if server use https:
$wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
-if ( @$wgCommandLineMode ) {
- $wgServer = $wgProto.'://localhost';
-} else {
- $wgServer = $wgProto.'://' . $_SERVER['SERVER_NAME'];
- if( $_SERVER['SERVER_PORT'] != 80 ) $wgServer .= ":" . $_SERVER['SERVER_PORT'];
+$wgServer = $wgProto.'://' . $wgServerName;
+if( isset( $_SERVER['SERVER_PORT'] ) && $_SERVER['SERVER_PORT'] != 80 ) {
+ $wgServer .= ":" . $_SERVER['SERVER_PORT'];
}
unset($wgProto);
$wgArticlePath = "{$wgScript}?title=$1";
$wgUploadPath = "{$wgScriptPath}/upload";
$wgUploadDirectory = "{$IP}/upload";
+$wgHashedUploadDirectory = true;
$wgLogo = "{$wgUploadPath}/wiki.png";
$wgMathPath = "{$wgUploadPath}/math";
$wgMathDirectory = "{$wgUploadDirectory}/math";
$wgTmpDirectory = "{$wgUploadDirectory}/tmp";
+$wgUploadBaseUrl = "";
/**#@-*/
* Default to wikiadmin@SERVER_NAME
* @global string $wgEmergencyContact
*/
-$wgEmergencyContact = 'wikiadmin@' . getenv( 'SERVER_NAME' );
+$wgEmergencyContact = 'wikiadmin@' . $wgServerName;
+
/**
* Password reminder email address
* The address we should use as sender when a user is requesting his password
* Default to apache@SERVER_NAME
* @global string $wgPasswordSender
*/
-$wgPasswordSender = 'Wikipedia Mail <apache@' . getenv( 'SERVER_NAME' ) . '>';
+$wgPasswordSender = 'Wikipedia Mail <apache@' . $wgServerName . '>';
/**
* "mysql" for working code and "PostgreSQL" for development/broken code
*/
$wgDBtype = "mysql";
+/** Search type
+ * "MyISAM" for MySQL native full text search, "Tsearch2" for PostgreSQL
+ * based search engine
+ */
+$wgSearchType = "MyISAM";
/** Table name prefix */
$wgDBprefix = '';
+/** Database schema
+ * on some databases this allows separate
+ * logical namespace for application data
+ */
+$wgDBschema = 'mediawiki';
/**#@-*/
+
+
# Shared database for multiple wikis.
# Presently used for storing a user table for single sign-on
# The server for this database must be the same as for the main
*/
$wgLanguageCode = 'en';
-/**
- * Languages which the user may select to display the user interface
- * in instead of the default language. This option is currently
- * experimental and WILL FAIL FOR MANY COMMON TASKS AND PERHAPS
- * CORRUPT YOUR DATABASE WITH BOGUS DATA.
- * Set to eg array( 'en', 'fr', 'zh' ) etc
- */
-$wgUserLanguages = array();
-
/**
* Filename of a language file generated by dumpMessages.php
* @global string|false $wgLanguageFile (default:false)
$wgSiteSupportPage = ''; # A page where you users can receive donations
$wgReadOnlyFile = "{$wgUploadDirectory}/lock_yBgMBwiR";
+$wgUseData = false ;
# The debug log file should be not be publicly accessible if it is
# used, as it may contain private data.
$wgUserHtml = true;
# Allow raw, unchecked HTML in <html>...</html> sections.
-# THIS IS VERY DANGEROUS on a publically editable site.
-# Don't enable it unless you've restricted editing to trusted
-# users only.
+# THIS IS VERY DANGEROUS on a publically editable site, so
+# you can't enable it unless you've restricted editing to
+# trusted users only with $wgWhitelistEdit.
$wgRawHtml = false;
# $wgUseTidy: use tidy to make sure HTML output is sane.
array(1280,1024),
array(10000,10000) );
+
+# Navigation links for the user sidebar.
+# 'text' is the name of the MediaWiki message that contains the label of this link
+# 'href' is the name of the MediaWiki message that contains the link target of this link.
+# Link targets starting with http are considered remote links. Ones not starting with
+# http are considered as names of local wiki pages.
+$wgNavigationLinks = array (
+ array( 'text'=>'mainpage', 'href'=>'mainpage' ),
+ array( 'text'=>'portal', 'href'=>'portal-url' ),
+ array( 'text'=>'currentevents', 'href'=>'currentevents-url' ),
+ array( 'text'=>'recentchanges', 'href'=>'recentchanges-url' ),
+ array( 'text'=>'randompage', 'href'=>'randompage-url' ),
+ array( 'text'=>'help', 'href'=>'helppage' ),
+ array( 'text'=>'sitesupport', 'href'=>'sitesupport-url' ),
+);
+
+
} else {
die();
}