Revert "merged master"
[lhc/web/wiklou.git] / includes / installer / Installer.php
index 8140527..bac85cd 100644 (file)
@@ -308,7 +308,7 @@ abstract class Installer {
 
        /**
         * UI interface for displaying a short message
-        * The parameters are like parameters to wfMessage().
+        * The parameters are like parameters to wfMsg().
         * The messages will be in wikitext format, which will be converted to an
         * output format such as HTML or text before being sent to the user.
         * @param $msg
@@ -339,7 +339,7 @@ abstract class Installer {
 
                // Load the installer's i18n file.
                $wgExtensionMessagesFiles['MediawikiInstaller'] =
-                       __DIR__ . '/Installer.i18n.php';
+                       dirname( __FILE__ ) . '/Installer.i18n.php';
 
                // Having a user with id = 0 safeguards us from DB access via User::loadOptions().
                $wgUser = User::newFromId( 0 );
@@ -645,7 +645,7 @@ abstract class Installer {
                $allNames = array();
 
                foreach ( self::getDBTypes() as $name ) {
-                       $allNames[] = wfMessage( "config-type-$name" )->text();
+                       $allNames[] = wfMsg( "config-type-$name" );
                }
 
                // cache initially available databases to make sure that everything will be displayed correctly
@@ -788,10 +788,6 @@ abstract class Installer {
 
        /**
         * Environment check for the PCRE module.
-        *
-        * @note If this check were to fail, the parser would
-        *   probably throw an exception before the result
-        *   of this check is shown to the user.
         * @return bool
         */
        protected function envCheckPCRE() {
@@ -801,13 +797,8 @@ abstract class Installer {
                }
                wfSuppressWarnings();
                $regexd = preg_replace( '/[\x{0430}-\x{04FF}]/iu', '', '-АБВГД-' );
-               // Need to check for \p support too, as PCRE can be compiled
-               // with utf8 support, but not unicode property support.
-               // check that \p{Zs} (space separators) matches
-               // U+3000 (Ideographic space)
-               $regexprop = preg_replace( '/\p{Zs}/u', '', "-\xE3\x80\x80-" );
                wfRestoreWarnings();
-               if ( $regexd != '--' || $regexprop != '--' ) {
+               if ( $regexd != '--' ) {
                        $this->showError( 'config-pcre-no-utf8' );
                        return false;
                }
@@ -935,7 +926,7 @@ abstract class Installer {
         */
        protected function envCheckPath() {
                global $IP;
-               $IP = dirname( dirname( __DIR__ ) );
+               $IP = dirname( dirname( dirname( __FILE__ ) ) );
                $this->setVar( 'IP', $IP );
 
                $this->showMessage( 'config-using-uri', $this->getVar( 'wgServer' ), $this->getVar( 'wgScriptPath' ) );
@@ -1595,8 +1586,8 @@ abstract class Installer {
                try {
                        $page = WikiPage::factory( Title::newMainPage() );
                        $content = new WikitextContent (
-                               wfMessage( 'mainpagetext' )->inContentLanguage()->text() . "\n\n" .
-                               wfMessage( 'mainpagedocfooter' )->inContentLanguage()->text()
+                               wfMsgForContent( 'mainpagetext' ) . "\n\n" .
+                               wfMsgForContent( 'mainpagedocfooter' )
                        );
 
                        $page->doEditContent( $content,