r76456 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76455‎ | r76456 | r76457 >
Date:16:45, 10 November 2010
Author:maxsem
Status:ok (Comments)
Tags:
Comment:
Added a check for PCRE_UTF8 per report at Support desk
Modified paths:
  • /trunk/phase3/includes/installer/Installer.i18n.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -536,6 +536,13 @@
537537 $this->showMessage( 'config-pcre' );
538538 return false;
539539 }
 540+ wfSuppressWarnings();
 541+ $regexd = preg_replace( '/[\x{0400}-\x{04FF}]/u', '', '-АБВГД-' );
 542+ wfRestoreWarnings();
 543+ if ( $regexd != '--' ) {
 544+ $this->showMessage( 'config-pcre-no-utf8' );
 545+ return false;
 546+ }
540547 }
541548
542549 /**
Index: trunk/phase3/includes/installer/Installer.i18n.php
@@ -124,6 +124,8 @@
125125 If you're running Mandrake, install the php-xml package.",
126126 'config-pcre' => 'The PCRE support module appears to be missing.
127127 MediaWiki requires the Perl-compatible regular expression functions to work.',
 128+ 'config-pcre-no-utf8' => "'''Fatal''': PHP's PCRE module seems to be compiled without PCRE_UTF8 support.
 129+MediaWiki requires UTF-8 support to function correctly.",
128130 'config-memory-none' => 'PHP is configured with no <code>memory_limit</code>',
129131 'config-memory-ok' => "PHP's <code>memory_limit</code> is $1.
130132 OK.",

Follow-up revisions

RevisionCommit summaryAuthorDate
r82438Follow-up r76456: more thorough check for UTF-8 support. Now it checks whethe...maxsem07:27, 19 February 2011

Comments

#Comment by Hashar (talk | contribs)   20:04, 25 November 2010

marked ok. Maybe we could add a note about it in INSTALL ?

Status & tagging log