Index: branches/REL1_17/extensions/cldr/cldr.php |
— | — | @@ -1,7 +1,7 @@ |
2 | 2 | <?php |
3 | 3 | if (!defined('MEDIAWIKI')) die(); |
4 | 4 | /** |
5 | | - * An extension which provised localised language names for other extensions. |
| 5 | + * An extension which provides localised language names for other extensions. |
6 | 6 | * |
7 | 7 | * @file |
8 | 8 | * @ingroup Extensions |
Index: branches/REL1_17/extensions/cldr/LanguageNames.body.php |
— | — | @@ -12,8 +12,8 @@ |
13 | 13 | private static $cache = array(); |
14 | 14 | |
15 | 15 | const FALLBACK_NATIVE = 0; // Missing entries fallback to native name |
16 | | - const FALLBACK_NORMAL = 1; // Missing entries fallback trough fallback chain |
17 | | - const LIST_MW_SUPPORTED = 0; // Only names that has localisation in MediaWiki |
| 16 | + const FALLBACK_NORMAL = 1; // Missing entries fallback through the fallback chain |
| 17 | + const LIST_MW_SUPPORTED = 0; // Only names that have localisation in MediaWiki |
18 | 18 | const LIST_MW = 1; // All names that are in Names.php |
19 | 19 | const LIST_MW_AND_CLDR = 2; // Combination of Names.php and what is in cldr |
20 | 20 | |
— | — | @@ -59,6 +59,7 @@ |
60 | 60 | |
61 | 61 | private static function loadLanguage( $code ) { |
62 | 62 | if ( !isset(self::$cache[$code]) ) { |
| 63 | + wfProfileIn( __METHOD__.'-recache' ); |
63 | 64 | |
64 | 65 | /** Load override for wrong or missing entries in cldr */ |
65 | 66 | $override = dirname(__FILE__) . '/' . self::getOverrideFileName( $code ); |
— | — | @@ -84,6 +85,7 @@ |
85 | 86 | } else { |
86 | 87 | wfDebug( __METHOD__ . ": Unable to load language names for $filename\n" ); |
87 | 88 | } |
| 89 | + wfProfileOut( __METHOD__.'-recache' ); |
88 | 90 | } |
89 | 91 | |
90 | 92 | return isset( self::$cache[$code] ) ? self::$cache[$code] : array(); |
Property changes on: branches/REL1_17/extensions/cldr |
___________________________________________________________________ |
Added: svn:mergeinfo |
91 | 93 | Merged /trunk/extensions/cldr:r83817,84664 |
Index: branches/REL1_17/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.js |
— | — | @@ -167,7 +167,7 @@ |
168 | 168 | $(this).css( 'white-space', 'nowrap' ); |
169 | 169 | if ( wrapper.width() <= $(this).get(0).scrollWidth ) { |
170 | 170 | var thisWidth = $(this).data( 'thisWidth' ) ? $(this).data( 'thisWidth' ) : 0; |
171 | | - thisWidth = Math.max( $(this).get(0).scrollWidth, thisWidth ); |
| 171 | + thisWidth = Math.max( $(this).get(0).width, thisWidth ); |
172 | 172 | $(this).width( thisWidth ); |
173 | 173 | $(this).data( 'thisWidth', thisWidth ); |
174 | 174 | var wrapperWidth = $(this).data( 'wrapperWidth' ) ? $(this).data( 'wrapperWidth' ) : 0; |
Property changes on: branches/REL1_17/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.js |
___________________________________________________________________ |
Added: svn:mergeinfo |
175 | 175 | Merged /trunk/extensions/WikiEditor/modules/jquery.wikiEditor.dialogs.js:r82458,82554,82698,83816-83817,84921 |
Index: branches/REL1_17/extensions/FlaggedRevs/maintenance/fixBug28348.php |
— | — | @@ -0,0 +1,34 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +if ( getenv( 'MW_INSTALL_PATH' ) ) { |
| 5 | + $IP = getenv( 'MW_INSTALL_PATH' ); |
| 6 | +} else { |
| 7 | + $IP = dirname(__FILE__).'/../../..'; |
| 8 | +} |
| 9 | + |
| 10 | +$options = array( 'help', 'startrev' ); |
| 11 | +require "$IP/maintenance/commandLine.inc"; |
| 12 | +require dirname(__FILE__) . '/fixBug28348.inc'; |
| 13 | + |
| 14 | +if ( isset($options['help']) ) { |
| 15 | + echo <<<TEXT |
| 16 | +Purpose: |
| 17 | + Correct bad fi_img_timestamp rows due to bug 28348 |
| 18 | +Usage: |
| 19 | + php updateLinks.php --help |
| 20 | + php updateLinks.php [--startrev <ID>] |
| 21 | + |
| 22 | + --help : This help message |
| 23 | + --<ID> : The ID of the starting rev |
| 24 | + --<CALL> : One of (revs) |
| 25 | + |
| 26 | +TEXT; |
| 27 | + exit(0); |
| 28 | +} |
| 29 | + |
| 30 | +error_reporting( E_ALL ); |
| 31 | + |
| 32 | +$startRev = isset( $options['startrev'] ) ? |
| 33 | + (int)$options['startrev'] : null; |
| 34 | + |
| 35 | +update_images_bug_28348( $startRev ); |
Property changes on: branches/REL1_17/extensions/FlaggedRevs/maintenance/fixBug28348.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 36 | + native |
Index: branches/REL1_17/extensions/FlaggedRevs/maintenance/fixBug28348.inc |
— | — | @@ -0,0 +1,64 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +function update_images_bug_28348( $start = null ) { |
| 5 | + echo "Correcting fi_img_timestamp column in flaggedimages\n"; |
| 6 | + |
| 7 | + $BATCH_SIZE = 1000; |
| 8 | + |
| 9 | + $db = wfGetDB( DB_MASTER ); |
| 10 | + |
| 11 | + if( $start === null ) { |
| 12 | + $start = $db->selectField( 'flaggedimages', 'MIN(fi_rev_id)', false, __FUNCTION__ ); |
| 13 | + } |
| 14 | + $end = $db->selectField( 'flaggedimages', 'MAX(fi_rev_id)', false, __FUNCTION__ ); |
| 15 | + if( is_null( $start ) || is_null( $end ) ) { |
| 16 | + echo "...flaggedimages table seems to be empty.\n"; |
| 17 | + return; |
| 18 | + } |
| 19 | + # Do remaining chunk |
| 20 | + $end += $BATCH_SIZE - 1; |
| 21 | + $blockStart = $start; |
| 22 | + $blockEnd = $start + $BATCH_SIZE - 1; |
| 23 | + |
| 24 | + $count = $changed = 0; |
| 25 | + while( $blockEnd <= $end ) { |
| 26 | + echo "...doing fi_rev_id from $blockStart to $blockEnd\n"; |
| 27 | + $cond = "fi_rev_id BETWEEN $blockStart AND $blockEnd"; |
| 28 | + $res = $db->select( 'flaggedimages', '*', $cond, __FUNCTION__ ); |
| 29 | + |
| 30 | + $db->begin(); |
| 31 | + # Go through and clean up missing items, as well as correct fr_quality... |
| 32 | + foreach( $res as $row ) { |
| 33 | + $count++; |
| 34 | + $fi_img_timestamp = trim( $row->fi_img_timestamp ); // clear pad garbage |
| 35 | + if ( !$fi_img_timestamp ) { |
| 36 | + continue; // nothing to check |
| 37 | + } |
| 38 | + $time = wfTimestamp( TS_MW, $fi_img_timestamp ); |
| 39 | + $sha1 = $row->fi_img_sha1; |
| 40 | + # Check if the specified file exists... |
| 41 | + $file = RepoGroup::singleton()->findFileFromKey( $sha1, array( 'time' => $time ) ); |
| 42 | + if ( !$file ) { // doesn't exist? |
| 43 | + $time = wfTimestamp( TS_MW, wfTimestamp( TS_UNIX, $time ) + 1 ); |
| 44 | + # Check if the fi_img_timestamp value is off by 1 second... |
| 45 | + $file = RepoGroup::singleton()->findFileFromKey( $sha1, array( 'time' => $time ) ); |
| 46 | + if ( $file ) { |
| 47 | + echo "fixed file {$row->fi_name} reference in rev ID {$row->fi_rev_id}\n"; |
| 48 | + # Fix the fi_img_timestamp value... |
| 49 | + $dbw->update( 'flaggedimages', |
| 50 | + array( 'fi_img_timestamp' => $dbw->timestamp( $time ) ), |
| 51 | + array( 'fi_rev_id' => $row->fi_rev_id, 'fi_name' => $row->fi_name ), |
| 52 | + __METHOD__ |
| 53 | + ); |
| 54 | + $changed++; |
| 55 | + } |
| 56 | + } |
| 57 | + } |
| 58 | + $db->commit(); |
| 59 | + $db->freeResult( $res ); |
| 60 | + $blockStart += $BATCH_SIZE; |
| 61 | + $blockEnd += $BATCH_SIZE; |
| 62 | + wfWaitForSlaves( 5 ); |
| 63 | + } |
| 64 | + echo "fi_img_timestamp column fixes complete ... {$count} rows [{$changed} changed]\n"; |
| 65 | +} |
Property changes on: branches/REL1_17/extensions/FlaggedRevs/maintenance/fixBug28348.inc |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 66 | + native |
Property changes on: branches/REL1_17/extensions/FlaggedRevs/maintenance |
___________________________________________________________________ |
Added: svn:mergeinfo |
2 | 67 | Merged /branches/chad-pre-wmf-merge/extensions/FlaggedRevs/maintenance:r76925 |
3 | 68 | Merged /branches/wmf/1.17wmf1/extensions/FlaggedRevs/maintenance:r82225 |
4 | 69 | Merged /trunk/extensions/FlaggedRevs/maintenance:r78027,78042,78044,78051,78092,78140,78142,78163,78166,78213,78226,78293,78319,78346,78517,78520,79872-79873,80297,82226,82537,82917,82919,82923,83817,84365,84454,84598,85202 |