<div id="credit">
<center>
<a href="http://www.mediawiki.org/"><img
- src="../images/wiki.png" width="135" height="135" alt="" border="0" /></a>
+ src="../stylesheets/images/wiki.png" width="135" height="135" alt="" border="0" /></a>
</center>
<b><a href="http://www.mediawiki.org/">MediaWiki</a></b> is
<?php
$IP = ".."; # Just to suppress notices, not for anything useful
-include( "../includes/DefaultSettings.php" );
+define( "MEDIAWIKI", true );
+define( "MEDIAWIKI_INSTALL", true );
+require( "../includes/DefaultSettings.php" );
?>
<h1>MediaWiki <?php print $wgVersion ?> installation</h1>
}
-include( "../install-utils.inc" );
-include( "../maintenance/updaters.inc" );
+require( "../install-utils.inc" );
+require( "../maintenance/updaters.inc" );
+require( "../maintenance/convertLinks.inc" );
+require( "../maintenance/archives/moveCustomMessages.inc" );
+
class ConfigData {
function getEncoded( $data ) {
# Hackish
?>
+<p><i>Please include all of the lines below when reporting installation problems.</i></p>
<h2>Checking environment...</h2>
<ul>
$conf->RightsUrl = "http://www.gnu.org/copyleft/fdl.html";
$conf->RightsText = "GNU Free Documentation License 1.2";
$conf->RightsCode = "gfdl";
- $conf->RightsIcon = "{$conf->ScriptPath}/images/gnu-fdl.png";
+ $conf->RightsIcon = "{$conf->ScriptPath}/stylesheets/images/gnu-fdl.png";
} elseif( $conf->License == "none" ) {
$conf->RightsUrl = $conf->RightsText = $conf->RightsCode = $conf->RightsIcon = "";
} else {
/* Load up the settings and get installin' */
$local = writeLocalSettings( $conf );
$wgCommandLineMode = false;
+ chdir( ".." );
eval($local);
-
$wgDBadminuser = $wgDBuser;
$wgDBadminpassword = $wgDBpassword;
$wgCommandLineMode = true;
$wgUseDatabaseMessages = false; /* FIXME: For database failure */
- include_once( "Setup.php" );
- include_once( "../maintenance/InitialiseMessages.inc" );
+ require_once( "includes/Setup.php" );
+ chdir( "config" );
+
+ require_once( "../maintenance/InitialiseMessages.inc" );
$wgTitle = Title::newFromText( "Installation script" );
$wgDatabase = Database::newFromParams( $wgDBserver, "root", $conf->RootPW, "", 1 );
do_interwiki_update(); flush();
do_index_update(); flush();
do_linkscc_update(); flush();
+ do_linkscc_1_3_update(); flush();
do_hitcounter_update(); flush();
do_recentchanges_update(); flush();
+ convertLinks(); flush();
+ do_user_real_name_update(); flush();
+ do_querycache_update(); flush();
+ do_objectcache_update(); flush();
+ do_categorylinks_update(); flush();
+
+ if ( isTemplateInitialised() ) {
+ print "Template namespace already initialised\n";
+ } else {
+ moveCustomMessages( 1 ); flush();
+ moveCustomMessages( 2 ); flush();
+ moveCustomMessages( 3 ); flush();
+ }
+
initialiseMessages(); flush();
chdir( "config" );
$title = $titleobj->getDBkey();
$sql = "INSERT INTO cur (cur_namespace,cur_title,cur_text,cur_timestamp,inverse_timestamp,cur_touched) " .
"VALUES (0,'$title','" .
- wfStrencode( wfMsg( "mainpagetext" ) ) . "','$now','$won','$now')";
+ wfStrencode( wfMsg( "mainpagetext" ) . "\n\n" . wfMsg( "mainpagedocfooter" ) ) . "','$now','$won','$now')";
$wgDatabase->query( $sql, $fname );
print "<li><pre>";
$pretty = ($conf->prettyURLs ? "" : "# ");
$ugly = ($conf->prettyURLs ? "# " : "");
$rights = ($conf->RightsUrl) ? "" : "# ";
+
+ $file = @fopen( "/dev/random", "r" );
+ if ( $file ) {
+ $proxyKey = bin2hex( fread( $file, 32 ) );
+ fclose( $file );
+ } else {
+ $proxyKey = "";
+ for ( $i=0; $i<8; $i++ ) {
+ $proxyKey .= dechex(mt_rand(0, 0x7fffffff));
+ }
+ print "Warning: \$wgProxyKey is insecure\n";
+ }
+
+ # Add slashes to strings for double quoting
+ $slconf = array_map( "addslashes", get_object_vars( $conf ) );
-# $proxyKey = Parser::getRandomString() . Parser::getRandomString();
$sep = (DIRECTORY_SEPARATOR == "\\") ? ";" : ":";
return "
# If you make manual changes, please keep track in case you need to
# recreate them later.
-\$IP = \"{$conf->IP}\";
+\$IP = \"{$slconf['IP']}\";
ini_set( \"include_path\", \"\$IP/includes$sep\$IP/languages$sep\" . ini_get(\"include_path\") );
include_once( \"DefaultSettings.php\" );
{$zlib}if( !ini_get( 'zlib.output_compression' ) ) ob_start( 'ob_gzhandler' );
}
-\$wgSitename = \"{$conf->Sitename}\";
+\$wgSitename = \"{$slconf['Sitename']}\";
-\$wgScriptPath = \"{$conf->ScriptPath}\";
+\$wgScriptPath = \"{$slconf['ScriptPath']}\";
\$wgScript = \"\$wgScriptPath/index.php\";
\$wgRedirectScript = \"\$wgScriptPath/redirect.php\";
{$pretty}\$wgArticlePath = \"\$wgScript/\$1\";
{$ugly}\$wgArticlePath = \"\$wgScript?title=\$1\";
-\$wgStylePath = \"\$wgScriptPath/stylesheets\";
-\$wgStyleSheetDirectory = \"\$IP/stylesheets\";
+\$wgStylePath = \"\$wgScriptPath/stylesheets\";
+\$wgStyleDirectory = \"\$IP/stylesheets\";
+\$wgLogo = \"\$wgStylePath/images/wiki.png\";
\$wgUploadPath = \"\$wgScriptPath/images\";
-\$wgUploadDirectory = \"\$IP/images\";
-\$wgLogo = \"\$wgUploadPath/wiki.png\";
+\$wgUploadDirectory = \"\$IP/images\";
-\$wgEmergencyContact = \"{$conf->EmergencyContact}\";
-\$wgPasswordSender = \"{$conf->PasswordSender}\";
+\$wgEmergencyContact = \"{$slconf['EmergencyContact']}\";
+\$wgPasswordSender = \"{$slconf['PasswordSender']}\";
-\$wgDBserver = \"{$conf->DBserver}\";
-\$wgDBname = \"{$conf->DBname}\";
-\$wgDBuser = \"{$conf->DBuser}\";
-\$wgDBpassword = \"{$conf->DBpassword}\";
+\$wgDBserver = \"{$slconf['DBserver']}\";
+\$wgDBname = \"{$slconf['DBname']}\";
+\$wgDBuser = \"{$slconf['DBuser']}\";
+\$wgDBpassword = \"{$slconf['DBpassword']}\";
## To allow SQL queries through the wiki's Special:Askaql page,
## uncomment the next lines. THIS IS VERY INSECURE. If you want
\$wgMathDirectory = \"{\$wgUploadDirectory}/math\";
\$wgTmpDirectory = \"{\$wgUploadDirectory}/tmp\";
-\$wgUsePHPTal = true;
-if ( \$wgUsePHPTal ) {
- ini_set( \"include_path\", \"\$IP/PHPTAL-NP-0.7.0/libs$sep\" . ini_get(\"include_path\") );
-}
-
\$wgLocalInterwiki = \$wgSitename;
-\$wgLanguageCode = \"{$conf->LanguageCode}\";
-" . ($conf->Encoding ? "\$wgInputEncoding = \$wgOutputEncoding = \"{$conf->Encoding}\";" : "" ) . "
+\$wgLanguageCode = \"{$slconf['LanguageCode']}\";
+" . ($conf->Encoding ? "\$wgInputEncoding = \$wgOutputEncoding = \"{$slconf['Encoding']}\";" : "" ) . "
-#\$wgProxyKey = $proxyKey;
+\$wgProxyKey = \"$proxyKey\";
+
+## Default skin: you can change the default skin. Use the internal symbolic
+## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
+# \$wgDefaultSkin = 'monobook';
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
}
function importPost( $name, $default = "" ) {
- if( isset( $_REQUEST[$name] ) ) {
- return $_REQUEST[$name];
+ if( isset( $_POST[$name] ) ) {
+ $retval = $_POST[$name];
+ if ( get_magic_quotes_gpc() ) {
+ $retval = stripslashes( $retval );
+ }
} else {
- return $default;
+ $retval = $default;
}
+ return $retval;
}
function aField( &$conf, $field, $text, $type = "", $value = "" ) {
$wgLanguageCode = "xxx";
function wfLocalUrl( $x ) { return $x; }
function wfLocalUrlE( $x ) { return $x; }
- include( "../languages/Language.php" );
+ require( "../languages/Language.php" );
}
$codes = array();