Merge "BacklinkCache performance tweaks"
[lhc/web/wiklou.git] / maintenance / language / generateNormalizerData.php
index 33163d4..b638b63 100644 (file)
@@ -21,9 +21,9 @@
  * @ingroup MaintenanceLanguage
  */
 
-require_once( __DIR__ . '/../Maintenance.php' );
+require_once __DIR__ . '/../../includes/normal/UtfNormalUtil.php';
 
-require_once( __DIR__ . '/../../includes/normal/UtfNormalUtil.php' );
+require_once __DIR__ . '/../Maintenance.php';
 
 /**
  * Generates normalizer data files for Arabic and Malayalam.
@@ -44,7 +44,8 @@ class GenerateNormalizerData extends Maintenance {
                if ( !$this->hasOption( 'unicode-data-file' ) ) {
                        $this->dataFile = 'UnicodeData.txt';
                        if ( !file_exists( $this->dataFile ) ) {
-                               $this->error( "Unable to find UnicodeData.txt. Please specify its location with --unicode-data-file=<FILE>" );
+                               $this->error( "Unable to find UnicodeData.txt. Please specify " .
+                                       "its location with --unicode-data-file=<FILE>" );
                                exit( 1 );
                        }
                } else {
@@ -104,15 +105,15 @@ class GenerateNormalizerData extends Maintenance {
 
                        $code = base_convert( $data['Code'], 16, 10 );
                        if ( ( $code >= 0xFB50 && $code <= 0xFDFF ) # Arabic presentation forms A
-                               || ( $code >= 0xFE70 && $code <= 0xFEFF ) # Arabic presentation forms B
-                       {
+                               || ( $code >= 0xFE70 && $code <= 0xFEFF ) # Arabic presentation forms B
+                       {
                                if ( $data['Decomposition_Type_Mapping'] === '' ) {
                                        // No decomposition
                                        continue;
                                }
                                if ( !preg_match( '/^ *(<\w*>) +([0-9A-F ]*)$/',
-                                       $data['Decomposition_Type_Mapping'], $m ) )
-                               {
+                                       $data['Decomposition_Type_Mapping'], $m )
+                               {
                                        $this->error( "Can't parse Decomposition_Type/Mapping on line $lineNum" );
                                        $this->error( $line );
                                        continue;
@@ -156,4 +157,4 @@ class GenerateNormalizerData extends Maintenance {
 }
 
 $maintClass = 'GenerateNormalizerData';
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;