From: Max Semenik Date: Sat, 26 Feb 2011 12:35:23 +0000 (+0000) Subject: (bug 1379) Installer directory conflicts with some hosts' configuration panel. X-Git-Tag: 1.31.0-rc.0~31762 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/?a=commitdiff_plain;h=1fdaf8db1749313230d600d7c7337a3722a2d1e9;p=lhc%2Fweb%2Fwiklou.git (bug 1379) Installer directory conflicts with some hosts' configuration panel. Renamed config/ to mw-config/, however left aliases for b/c. --- diff --git a/HISTORY b/HISTORY index dd0870ade0..3959ed54c6 100644 --- a/HISTORY +++ b/HISTORY @@ -451,6 +451,7 @@ LocalSettings.php. The specific bugs are listed below in the general notes. * (bug 18372) $wgFileExtensions will now override $wgFileBlacklist * (bug 25512) Subcategory list should not include category prefix for members. * (bug 20244) Installer does not validate SQLite database directory for stable path +* (bug 1379) Installer directory conflicts with some hosts' configuration panel. === API changes in 1.17 === * (bug 22738) Allow filtering by action type on query=logevent. diff --git a/INSTALL b/INSTALL index 33cc595e0a..ec0b7bb905 100644 --- a/INSTALL +++ b/INSTALL @@ -65,7 +65,7 @@ available to download from the installer. Download this now, there is not a way (yet) to get it after you exit the installer. Place it in the main wiki directory, and the wiki should now be working. -Once the wiki is set up, you should remove the config directory (though it will +Once the wiki is set up, you should remove the mw-config directory (though it will refuse to config again if the wiki is set up). ---- diff --git a/config/OBSOLETE b/config/OBSOLETE new file mode 100644 index 0000000000..108c16756b --- /dev/null +++ b/config/OBSOLETE @@ -0,0 +1,2 @@ +This is a back-compat directory for installer, which resides in mw-config/ now. +It will probably be remved in 1.19. \ No newline at end of file diff --git a/config/index.php b/config/index.php index c00a0d0135..948fe69fd0 100644 --- a/config/index.php +++ b/config/index.php @@ -1,50 +1 @@ -startSession() ) { - $installer->finish(); - exit; - } - - $fingerprint = $installer->getFingerprint(); - if ( isset( $_SESSION['installData'][$fingerprint] ) ) { - $session = $_SESSION['installData'][$fingerprint]; - } else { - $session = array(); - } - - if ( isset( $session['settings']['_UserLang'] ) ) { - $langCode = $session['settings']['_UserLang']; - } elseif ( !is_null( $wgRequest->getVal( 'UserLang' ) ) ) { - $langCode = $wgRequest->getVal( 'UserLang' ); - } else { - $langCode = 'en'; - } - $wgLang = Language::factory( $langCode ); - - $installer->setParserLanguage( $wgLang ); - - $wgMetaNamespace = $wgCanonicalNamespaceNames[NS_PROJECT]; - - $session = $installer->execute( $session ); - - $_SESSION['installData'][$fingerprint] = $session; - -} + complete the installation and download LocalSettings.php." ); + echo( "Please complete the installation and download LocalSettings.php." ); } else { - echo( "Please set up the wiki first." ); + echo( "Please set up the wiki first." ); } ?>

diff --git a/includes/templates/PHP4.php b/includes/templates/PHP4.php index 511ce7186e..69f7d55d2a 100644 --- a/includes/templates/PHP4.php +++ b/includes/templates/PHP4.php @@ -19,7 +19,7 @@ if( isset( $_SERVER['SCRIPT_NAME'] ) ) { } else { $scriptUrl = ''; } -if ( preg_match( '!^(.*)/config/[^/]*.php$!', $scriptUrl, $m ) ) { +if ( preg_match( '!^(.*)/(mw-)?config/[^/]*.php$!', $scriptUrl, $m ) ) { $baseUrl = $m[1]; } elseif ( preg_match( '!^(.*)/[^/]*.php$!', $scriptUrl, $m ) ) { $baseUrl = $m[1]; diff --git a/mw-config/index.php b/mw-config/index.php new file mode 100644 index 0000000000..c00a0d0135 --- /dev/null +++ b/mw-config/index.php @@ -0,0 +1,50 @@ +startSession() ) { + $installer->finish(); + exit; + } + + $fingerprint = $installer->getFingerprint(); + if ( isset( $_SESSION['installData'][$fingerprint] ) ) { + $session = $_SESSION['installData'][$fingerprint]; + } else { + $session = array(); + } + + if ( isset( $session['settings']['_UserLang'] ) ) { + $langCode = $session['settings']['_UserLang']; + } elseif ( !is_null( $wgRequest->getVal( 'UserLang' ) ) ) { + $langCode = $wgRequest->getVal( 'UserLang' ); + } else { + $langCode = 'en'; + } + $wgLang = Language::factory( $langCode ); + + $installer->setParserLanguage( $wgLang ); + + $wgMetaNamespace = $wgCanonicalNamespaceNames[NS_PROJECT]; + + $session = $installer->execute( $session ); + + $_SESSION['installData'][$fingerprint] = $session; + +} diff --git a/mw-config/index.php5 b/mw-config/index.php5 new file mode 100644 index 0000000000..8e6ceda94c --- /dev/null +++ b/mw-config/index.php5 @@ -0,0 +1,4 @@ +