X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Finstaller%2FWebInstaller.php;h=4f31195e8495b6b7400b550b97d2efdbfb3308c4;hb=4190fe5b697d927427d8026177d479f582e933aa;hp=2274c9d9c87286ae598a6b04c7cb4802a80669f6;hpb=44f9460caf281bb61df87cce213c1a802eba5ac7;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/installer/WebInstaller.php b/includes/installer/WebInstaller.php index 2274c9d9c8..4f31195e84 100644 --- a/includes/installer/WebInstaller.php +++ b/includes/installer/WebInstaller.php @@ -2,6 +2,21 @@ /** * Core installer web interface. * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * * @file * @ingroup Deployment */ @@ -146,7 +161,11 @@ class WebInstaller extends Installer { 'Content-Disposition: attachment; filename="LocalSettings.php"' ); - $ls = new LocalSettingsGenerator( $this ); + $ls = InstallerOverrides::getLocalSettingsGenerator( $this ); + $rightsProfile = $this->rightsProfiles[$this->getVar( '_RightsProfile' )]; + foreach( $rightsProfile as $group => $rightsArr ) { + $ls->setGroupRights( $group, $rightsArr ); + } echo $ls->getText(); return $this->session; } @@ -243,6 +262,10 @@ class WebInstaller extends Installer { $this->currentPageName = $page->getName(); $this->startPageWrapper( $pageName ); + if( $page->isSlow() ) { + $this->disableTimeLimit(); + } + $result = $page->execute(); $this->endPageWrapper(); @@ -347,6 +370,7 @@ class WebInstaller extends Installer { /** * Show an error message in a box. Parameters are like wfMsg(). + * @param $msg */ public function showError( $msg /*...*/ ) { $args = func_get_args(); @@ -358,6 +382,8 @@ class WebInstaller extends Installer { /** * Temporary error handler for session start debugging. + * @param $errno + * @param $errstr string */ public function errorHandler( $errno, $errstr ) { $this->phpErrors[] = $errstr; @@ -422,6 +448,7 @@ class WebInstaller extends Installer { * * @param $name String * @param $default + * @return null */ public function getSession( $name, $default = null ) { if ( !isset( $this->session[$name] ) ) { @@ -461,7 +488,6 @@ class WebInstaller extends Installer { $this->setVar( '_UserLang', $wgLanguageCode ); } else { $wgLanguageCode = $this->getVar( 'wgLanguageCode' ); - $wgLang = Language::factory( $this->getVar( '_UserLang' ) ); $wgContLang = Language::factory( $wgLanguageCode ); } } @@ -474,7 +500,7 @@ class WebInstaller extends Installer { public function getAcceptLanguage() { global $wgLanguageCode, $wgRequest; - $mwLanguages = Language::getLanguageNames(); + $mwLanguages = Language::fetchLanguageNames(); $headerLanguages = array_keys( $wgRequest->getAcceptLang() ); foreach ( $headerLanguages as $lang ) { @@ -615,13 +641,14 @@ class WebInstaller extends Installer { $text = $this->parse( $text, true ); $icon = ( $icon == false ) ? '../skins/common/images/info-32.png' : '../skins/common/images/'.$icon; $alt = wfMsg( 'config-information' ); - return Xml::infoBox( $text, $icon, $alt, $class, false ); + return Html::infoBox( $text, $icon, $alt, $class, false ); } /** * Get small text indented help for a preceding form field. * Parameters like wfMsg(). * + * @param $msg * @return string */ public function getHelpBox( $msg /*, ... */ ) { @@ -629,13 +656,12 @@ class WebInstaller extends Installer { array_shift( $args ); $args = array_map( 'htmlspecialchars', $args ); $text = wfMsgReal( $msg, $args, false, false, false ); - $html = htmlspecialchars( $text ); $html = $this->parse( $text, true ); return "