r96849 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96848‎ | r96849 | r96850 >
Date:15:03, 12 September 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
REL1_18: r96509, r96522, r96606, r96643, r96645, r96655, r96659, r96687, r96762, r96764, r96829

Tree conflict on commonContext.css from r96762, manually merged into vector/screen.css and monobook/main.css based on r95837
Modified paths:
  • /branches/REL1_18/phase3/RELEASE-NOTES-1.18 (modified) (history)
  • /branches/REL1_18/phase3/includes/AuthPlugin.php (modified) (history)
  • /branches/REL1_18/phase3/includes/LocalisationCache.php (modified) (history)
  • /branches/REL1_18/phase3/includes/media/Bitmap.php (modified) (history)
  • /branches/REL1_18/phase3/includes/objectcache/BagOStuff.php (modified) (history)
  • /branches/REL1_18/phase3/includes/objectcache/MultiWriteBagOStuff.php (modified) (history)
  • /branches/REL1_18/phase3/includes/objectcache/SqlBagOStuff.php (modified) (history)
  • /branches/REL1_18/phase3/includes/parser/Preprocessor_DOM.php (modified) (history)
  • /branches/REL1_18/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)
  • /branches/REL1_18/phase3/includes/specials/SpecialPasswordReset.php (modified) (history)
  • /branches/REL1_18/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /branches/REL1_18/phase3/languages/messages/MessagesQqq.php (modified) (history)
  • /branches/REL1_18/phase3/maintenance/purgeParserCache.php (added) (history)
  • /branches/REL1_18/phase3/resources/jquery/jquery.tablesorter.js (modified) (history)
  • /branches/REL1_18/phase3/skins/chick/main.css (modified) (history)
  • /branches/REL1_18/phase3/skins/common/oldshared.css (modified) (history)
  • /branches/REL1_18/phase3/skins/common/shared.css (modified) (history)
  • /branches/REL1_18/phase3/skins/modern/main.css (modified) (history)
  • /branches/REL1_18/phase3/skins/monobook/main.css (modified) (history)
  • /branches/REL1_18/phase3/skins/vector/screen.css (modified) (history)
  • /branches/REL1_18/phase3/tests/phpunit/includes/media/BitmapScalingTest.php (modified) (history)
  • /branches/REL1_18/phase3/tests/phpunit/includes/media/ExifRotationTest.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/maintenance/purgeParserCache.php
@@ -0,0 +1,43 @@
 2+<?php
 3+
 4+require( dirname( __FILE__ ) . '/Maintenance.php' );
 5+
 6+class PurgeParserCache extends Maintenance {
 7+ function __construct() {
 8+ parent::__construct();
 9+ $this->addDescription( "Remove old objects from the parser cache. " .
 10+ "This only works when the parser cache is in an SQL database." );
 11+ $this->addOption( 'expiredate', 'Delete objects expiring before this date.', false, true );
 12+ $this->addOption( 'age',
 13+ 'Delete objects created more than this many seconds ago, assuming $wgParserCacheExpireTime '.
 14+ 'has been consistent.',
 15+ false, true );
 16+ }
 17+
 18+ function execute() {
 19+ $inputDate = $this->getOption( 'expiredate' );
 20+ $inputAge = $this->getOption( 'age' );
 21+ if ( $inputDate !== null ) {
 22+ $date = wfTimestamp( TS_MW, strtotime( $inputDate ) );
 23+ } elseif ( $inputAge !== null ) {
 24+ global $wgParserCacheExpireTime;
 25+ $date = wfTimestamp( TS_MW, time() + $wgParserCacheExpireTime - intval( $inputAge ) );
 26+ } else {
 27+ echo "Must specify either --expiredate or --age\n";
 28+ exit( 1 );
 29+ }
 30+
 31+ $english = Language::factory( 'en' );
 32+ echo "Deleting objects expiring before " . $english->timeanddate( $date ) . "\n";
 33+
 34+ $pc = wfGetParserCacheStorage();
 35+ $success = $pc->deleteObjectsExpiringBefore( $date );
 36+ if ( !$success ) {
 37+ echo "Cannot purge this kind of parser cache.\n";
 38+ exit( 1 );
 39+ }
 40+ echo "Done\n";
 41+ }
 42+}
 43+$maintClass = 'PurgeParserCache';
 44+require_once( RUN_MAINTENANCE_IF_MAIN );
Property changes on: branches/REL1_18/phase3/maintenance/purgeParserCache.php
___________________________________________________________________
Added: svn:eol-style
145 + native
Index: branches/REL1_18/phase3/skins/chick/main.css
@@ -245,7 +245,7 @@
246246 padding:5px;
247247 font-size: 95%;
248248 }
249 -#toc ul { margin-left: 2em; }
 249+#toc ul { margin: 0 2em; }
250250 #toc .toctoggle { font-size: 94%; }
251251 #toc .editsection {
252252 margin-top: 0.7em;
Index: branches/REL1_18/phase3/skins/monobook/main.css
@@ -349,7 +349,7 @@
350350 list-style-type: none;
351351 list-style-image: none;
352352 margin-left: 0;
353 - padding-left: 0;
 353+ padding: 0;
354354 text-align: left;
355355 }
356356 #toc ul ul,
Index: branches/REL1_18/phase3/skins/modern/main.css
@@ -587,7 +587,7 @@
588588 list-style-type: none;
589589 list-style-image: none;
590590 margin: 0 1em 0 1em;
591 - padding-left: 0;
 591+ padding: 0;
592592 text-align: left;
593593 }
594594
Index: branches/REL1_18/phase3/skins/common/oldshared.css
@@ -147,8 +147,7 @@
148148 .toc ul {
149149 list-style-type: none;
150150 list-style-image: none;
151 - margin-left: 0;
152 - padding-left: 0;
 151+ padding: 0;
153152 text-align: left;
154153 }
155154 #toc ul ul,
Index: branches/REL1_18/phase3/skins/common/shared.css
@@ -577,6 +577,32 @@
578578 margin: 0;
579579 }
580580
 581+/* Correct directionality when page dir is different from site/user dir */
 582+.mw-content-ltr ul,
 583+.mw-content-rtl .mw-content-ltr ul {
 584+ /* @noflip */
 585+ margin: 0.3em 0 0 1.5em;
 586+ padding: 0;
 587+}
 588+.mw-content-rtl ul,
 589+.mw-content-ltr .mw-content-rtl ul {
 590+ /* @noflip */
 591+ margin: 0.3em 1.5em 0 0;
 592+ padding: 0;
 593+}
 594+.mw-content-ltr ol,
 595+.mw-content-rtl .mw-content-ltr ol {
 596+ /* @noflip */
 597+ margin: 0.3em 0 0 3.2em;
 598+ padding: 0;
 599+}
 600+.mw-content-rtl ol,
 601+.mw-content-ltr .mw-content-rtl ol {
 602+ /* @noflip */
 603+ margin: 0.3em 3.2em 0 0;
 604+ padding: 0;
 605+}
 606+
581607 /* Galleries */
582608 /* These display attributes look nonsensical, but are needed to support IE and FF2 */
583609 /* Don't forget to update commonPrint.css */
@@ -673,6 +699,7 @@
674700 list-style-type: arabic-indic;
675701 }
676702
 703+ol:lang(as) li,
677704 ol:lang(bn) li {
678705 list-style-type: -moz-bengali;
679706 list-style-type: bengali;
@@ -683,16 +710,18 @@
684711 list-style-type: oriya;
685712 }
686713
 714+#toc ul, .toc ul {
 715+ margin: .3em 0;
 716+}
 717+
687718 /* Correct directionality when page dir is different from site/user dir */
688719 /* @noflip */.mw-content-ltr .toc ul, .mw-content-ltr #toc ul,
689720 .mw-content-rtl .mw-content-ltr .toc ul, .mw-content-rtl .mw-content-ltr #toc ul {
690721 text-align: left;
691 - margin-left: 0;
692722 }
693723 /* @noflip */.mw-content-rtl .toc ul, .mw-content-rtl #toc ul,
694724 .mw-content-ltr .mw-content-rtl .toc ul, .mw-content-ltr .mw-content-rtl #toc ul {
695725 text-align: right;
696 - margin-right: 0;
697726 }
698727 /* @noflip */.mw-content-ltr .toc ul ul, .mw-content-ltr #toc ul ul,
699728 .mw-content-rtl .mw-content-ltr .toc ul ul, .mw-content-rtl .mw-content-ltr #toc ul ul {
Index: branches/REL1_18/phase3/skins/vector/screen.css
@@ -885,7 +885,7 @@
886886 list-style-type: none;
887887 list-style-image: none;
888888 margin-left: 0;
889 - padding-left: 0;
 889+ padding: 0;
890890 text-align: left;
891891 }
892892 #toc ul ul,
Index: branches/REL1_18/phase3/RELEASE-NOTES-1.18
@@ -441,6 +441,8 @@
442442 * Tracking categories are no longer shown in footer for special pages
443443 * (bug 30684) Fix bad escaping in mw.message for inexistent messages (i.e. <key>)
444444 * $wgOverrideSiteFeed no longer double escapes urls.
 445+* The preprocessor no longer fails with a PHP warning about XML_PARSE_HUGE when
 446+ processing complex pages using newer versions of libxml2.
445447 * (bug 30192) Thumbnails of archived files are now deleted
446448
447449 === API changes in 1.18 ===
Property changes on: branches/REL1_18/phase3/RELEASE-NOTES-1.18
___________________________________________________________________
Modified: svn:mergeinfo
448450 Merged /trunk/phase3/RELEASE-NOTES-1.18:r96509,96522,96606,96643,96645,96655,96659,96687,96762,96764,96829
Index: branches/REL1_18/phase3/tests/phpunit/includes/media/ExifRotationTest.php
@@ -7,6 +7,7 @@
88
99 function setUp() {
1010 parent::setUp();
 11+ $this->handler = new BitmapHandler();
1112 }
1213
1314 /**
@@ -14,17 +15,16 @@
1516 * @dataProvider providerFiles
1617 */
1718 function testMetadata( $name, $type, $info ) {
18 - $handler = new BitmapHandler();
1919 # Force client side resizing
2020 $params = array( 'width' => 10000, 'height' => 10000 );
2121 $file = UnregisteredLocalFile::newFromPath( dirname( __FILE__ ) . '/' . $name, $type );
2222
2323 # Normalize parameters
24 - $this->assertTrue( $handler->normaliseParams( $file, $params ) );
25 - $rotation = $handler->getRotation( $file );
 24+ $this->assertTrue( $this->handler->normaliseParams( $file, $params ) );
 25+ $rotation = $this->handler->getRotation( $file );
2626
2727 # Check if pre-rotation dimensions are still good
28 - list( $width, $height ) = $handler->extractPreRotationDimensions( $params, $rotation );
 28+ list( $width, $height ) = $this->handler->extractPreRotationDimensions( $params, $rotation );
2929 $this->assertEquals( $file->getWidth(), $width,
3030 "$name: pre-rotation width check, $rotation:$width" );
3131 $this->assertEquals( $file->getHeight(), $height,
@@ -72,8 +72,7 @@
7373 * @dataProvider provideBitmapExtractPreRotationDimensions
7474 */
7575 function testBitmapExtractPreRotationDimensions( $rotation, $expected ) {
76 - $handler = new BitmapHandler;
77 - $result = $handler->extractPreRotationDimensions( array(
 76+ $result = $this->handler->extractPreRotationDimensions( array(
7877 'physicalWidth' => self::TEST_WIDTH,
7978 'physicalHeight' => self::TEST_HEIGHT,
8079 ), $rotation );
@@ -100,5 +99,22 @@
101100 ),
102101 );
103102 }
 103+
 104+ function testWidthFlipping() {
 105+ $file = UnregisteredLocalFile::newFromPath( $this->filePath . 'portrait-rotated.jpg', 'image/jpeg' );
 106+ $params = array( 'width' => '50' );
 107+ $this->assertTrue( $this->handler->normaliseParams( $file, $params ) );
 108+
 109+ $this->assertEquals( 50, $params['height'] );
 110+ $this->assertEquals( round( (768/1024)*50 ), $params['width'], '', 0.1 );
 111+ }
 112+ function testWidthNotFlipping() {
 113+ $file = UnregisteredLocalFile::newFromPath( $this->filePath . 'landscape-plain.jpg', 'image/jpeg' );
 114+ $params = array( 'width' => '50' );
 115+ $this->assertTrue( $this->handler->normaliseParams( $file, $params ) );
 116+
 117+ $this->assertEquals( 50, $params['width'] );
 118+ $this->assertEquals( round( (768/1024)*50 ), $params['height'], '', 0.1 );
 119+ }
104120 }
105121
Index: branches/REL1_18/phase3/tests/phpunit/includes/media/BitmapScalingTest.php
@@ -1,13 +1,24 @@
22 <?php
33
44 class BitmapScalingTest extends MediaWikiTestCase {
 5+
 6+ function setUp() {
 7+ global $wgMaxImageArea;
 8+ $this->oldMaxImageArea = $wgMaxImageArea;
 9+ $wgMaxImageArea = 1.25e7; // 3500x3500
 10+ }
 11+ function tearDown() {
 12+ global $wgMaxImageArea;
 13+ $wgMaxImageArea = $this->oldMaxImageArea;
 14+ }
515 /**
616 * @dataProvider provideNormaliseParams
717 */
818 function testNormaliseParams( $fileDimensions, $expectedParams, $params, $msg ) {
919 $file = new FakeDimensionFile( $fileDimensions );
1020 $handler = new BitmapHandler;
11 - $handler->normaliseParams( $file, $params );
 21+ $valid = $handler->normaliseParams( $file, $params );
 22+ $this->assertTrue( $valid );
1223 $this->assertEquals( $expectedParams, $params, $msg );
1324 }
1425
@@ -77,11 +88,37 @@
7889 array( 'width' => 10, 'height' => 5 ),
7990 'Very high image with height set',
8091 ),
 92+ /* Max image area */
 93+ array(
 94+ array( 4000, 4000 ),
 95+ array(
 96+ 'width' => 5000, 'height' => 5000,
 97+ 'physicalWidth' => 4000, 'physicalHeight' => 4000,
 98+ 'page' => 1,
 99+ ),
 100+ array( 'width' => 5000 ),
 101+ 'Bigger than max image size but doesn\'t need scaling',
 102+ ),
81103 );
82104 }
 105+ function testTooBigImage() {
 106+ $file = new FakeDimensionFile( array( 4000, 4000 ) );
 107+ $handler = new BitmapHandler;
 108+ $params = array( 'width' => '3700' ); // Still bigger than max size.
 109+ $this->assertFalse( $handler->normaliseParams( $file, $params ) );
 110+ }
 111+ function testTooBigMustRenderImage() {
 112+ $file = new FakeDimensionFile( array( 4000, 4000 ) );
 113+ $file->mustRender = true;
 114+ $handler = new BitmapHandler;
 115+ $params = array( 'width' => '5000' ); // Still bigger than max size.
 116+ $this->assertFalse( $handler->normaliseParams( $file, $params ) );
 117+ }
83118 }
84119
85120 class FakeDimensionFile extends File {
 121+ public $mustRender = false;
 122+
86123 public function __construct( $dimensions ) {
87124 parent::__construct( Title::makeTitle( NS_FILE, 'Test' ), null );
88125
@@ -93,4 +130,7 @@
94131 public function getHeight( $page = 1 ) {
95132 return $this->dimensions[1];
96133 }
97 -}
\ No newline at end of file
 134+ public function mustRender() {
 135+ return $this->mustRender;
 136+ }
 137+}
Index: branches/REL1_18/phase3/includes/objectcache/BagOStuff.php
@@ -91,6 +91,16 @@
9292 return array();
9393 }
9494
 95+ /**
 96+ * Delete all objects expiring before a certain date.
 97+ *
 98+ * @return true on success, false if unimplemented
 99+ */
 100+ public function deleteObjectsExpiringBefore( $date ) {
 101+ // stub
 102+ return false;
 103+ }
 104+
95105 /* *** Emulated functions *** */
96106
97107 public function add( $key, $value, $exptime = 0 ) {
Index: branches/REL1_18/phase3/includes/objectcache/SqlBagOStuff.php
@@ -305,21 +305,29 @@
306306 }
307307
308308 public function expireAll() {
 309+ $this->deleteObjectsExpiringBefore( wfTimestampNow() );
 310+ }
 311+
 312+ /**
 313+ * Delete objects from the database which expire before a certain date.
 314+ */
 315+ public function deleteObjectsExpiringBefore( $timestamp ) {
309316 $db = $this->getDB();
310 - $now = $db->timestamp();
 317+ $dbTimestamp = $db->timestamp( $timestamp );
311318
312319 try {
313320 for ( $i = 0; $i < $this->shards; $i++ ) {
314321 $db->begin();
315322 $db->delete(
316323 $this->getTableByShard( $i ),
317 - array( 'exptime < ' . $db->addQuotes( $now ) ),
 324+ array( 'exptime < ' . $db->addQuotes( $dbTimestamp ) ),
318325 __METHOD__ );
319326 $db->commit();
320327 }
321328 } catch ( DBQueryError $e ) {
322329 $this->handleWriteError( $e );
323330 }
 331+ return true;
324332 }
325333
326334 public function deleteAll() {
Index: branches/REL1_18/phase3/includes/objectcache/MultiWriteBagOStuff.php
@@ -89,9 +89,25 @@
9090 array_shift( $args );
9191
9292 foreach ( $this->caches as $cache ) {
93 - $ret = $ret && call_user_func_array( array( $cache, $method ), $args );
 93+ if ( !call_user_func_array( array( $cache, $method ), $args ) ) {
 94+ $ret = false;
 95+ }
9496 }
9597 return $ret;
9698 }
9799
 100+ /**
 101+ * Delete objects expiring before a certain date.
 102+ *
 103+ * Succeed if any of the child caches succeed.
 104+ */
 105+ public function deleteObjectsExpiringBefore( $date ) {
 106+ $ret = false;
 107+ foreach ( $this->caches as $cache ) {
 108+ if ( $cache->deleteObjectsExpiringBefore( $date ) ) {
 109+ $ret = true;
 110+ }
 111+ }
 112+ return $ret;
 113+ }
98114 }
Index: branches/REL1_18/phase3/includes/LocalisationCache.php
@@ -609,6 +609,11 @@
610610 # Run hooks
611611 wfRunHooks( 'LocalisationCacheRecache', array( $this, $code, &$allData ) );
612612
 613+ if ( is_null( $allData['namespaceNames'] ) ) {
 614+ throw new MWException( __METHOD__.': Localisation data failed sanity check! ' .
 615+ 'Check that your languages/messages/MessagesEn.php file is intact.' );
 616+ }
 617+
613618 # Set the preload key
614619 $allData['preload'] = $this->buildPreload( $allData );
615620
Index: branches/REL1_18/phase3/includes/parser/Preprocessor_DOM.php
@@ -155,7 +155,8 @@
156156 if ( !$result ) {
157157 // Try running the XML through UtfNormal to get rid of invalid characters
158158 $xml = UtfNormal::cleanUp( $xml );
159 - $result = $dom->loadXML( $xml );
 159+ // 1 << 19 == XML_PARSE_HUGE, needed so newer versions of libxml2 don't barf when the XML is >256 levels deep
 160+ $result = $dom->loadXML( $xml, 1 << 19 );
160161 if ( !$result ) {
161162 throw new MWException( __METHOD__.' generated invalid XML' );
162163 }
Index: branches/REL1_18/phase3/includes/media/Bitmap.php
@@ -15,7 +15,9 @@
1616
1717 /**
1818 * @param $image File
19 - * @param $params
 19+ * @param $params array Transform parameters. Entries with the keys 'width'
 20+ * and 'height' are the respective screen width and height, while the keys
 21+ * 'physicalWidth' and 'physicalHeight' indicate the thumbnail dimensions.
2022 * @return bool
2123 */
2224 function normaliseParams( $image, &$params ) {
@@ -25,38 +27,36 @@
2628 }
2729
2830 $mimeType = $image->getMimeType();
 31+ # Obtain the source, pre-rotation dimensions
2932 $srcWidth = $image->getWidth( $params['page'] );
3033 $srcHeight = $image->getHeight( $params['page'] );
3134
32 - $swapDimensions = false;
 35+ # Don't make an image bigger than the source
 36+ if ( $params['physicalWidth'] >= $srcWidth ) {
 37+ $params['physicalWidth'] = $srcWidth;
 38+ $params['physicalHeight'] = $srcHeight;
 39+
 40+ # Skip scaling limit checks if no scaling is required
 41+ # due to requested size being bigger than source.
 42+ if ( !$image->mustRender() ) {
 43+ return true;
 44+ }
 45+ }
 46+
 47+
3348 if ( self::canRotate() ) {
3449 $rotation = $this->getRotation( $image );
3550 if ( $rotation == 90 || $rotation == 270 ) {
3651 wfDebug( __METHOD__ . ": Swapping width and height because the file will be rotated $rotation degrees\n" );
3752
38 - $swapDimensions = true;
3953 list( $params['width'], $params['height'] ) =
40 - array( $params['width'], $params['height'] );
 54+ array( $params['height'], $params['width'] );
4155 list( $params['physicalWidth'], $params['physicalHeight'] ) =
42 - array( $params['physicalWidth'], $params['physicalHeight'] );
 56+ array( $params['physicalHeight'], $params['physicalWidth'] );
4357 }
4458 }
4559
46 - # Don't make an image bigger than the source
47 - if ( $params['physicalWidth'] >= $srcWidth ) {
48 - if ( $swapDimensions ) {
49 - $params['physicalWidth'] = $srcHeight;
50 - $params['physicalHeight'] = $srcWidth;
51 - } else {
52 - $params['physicalWidth'] = $srcWidth;
53 - $params['physicalHeight'] = $srcHeight;
54 - }
55 - }
5660
57 - # Skip scaling limit checks if no scaling is required
58 - if ( !$image->mustRender() )
59 - return true;
60 -
6161 # Don't thumbnail an image so big that it will fill hard drives and send servers into swap
6262 # JPEG has the handy property of allowing thumbnailing without full decompression, so we make
6363 # an exception for it.
Index: branches/REL1_18/phase3/includes/AuthPlugin.php
@@ -262,6 +262,15 @@
263263 public function getUserInstance( User &$user ) {
264264 return new AuthPluginUser( $user );
265265 }
 266+
 267+ /**
 268+ * Get a list of domains (in HTMLForm options format) used.
 269+ *
 270+ * @return array
 271+ */
 272+ public function domainList() {
 273+ return array();
 274+ }
266275 }
267276
268277 class AuthPluginUser {
Index: branches/REL1_18/phase3/includes/specials/SpecialPasswordReset.php
@@ -44,7 +44,7 @@
4545 }
4646
4747 protected function getFormFields() {
48 - global $wgPasswordResetRoutes;
 48+ global $wgPasswordResetRoutes, $wgAuth;
4949 $a = array();
5050 if ( isset( $wgPasswordResetRoutes['username'] ) && $wgPasswordResetRoutes['username'] ) {
5151 $a['Username'] = array(
@@ -60,6 +60,15 @@
6161 );
6262 }
6363
 64+ if ( isset( $wgPasswordResetRoutes['domain'] ) && $wgPasswordResetRoutes['domain'] ) {
 65+ $domains = $wgAuth->domainList();
 66+ $a['Domain'] = array(
 67+ 'type' => 'select',
 68+ 'options' => $domains,
 69+ 'label-message' => 'passwordreset-domain',
 70+ );
 71+ }
 72+
6473 return $a;
6574 }
6675
@@ -76,6 +85,9 @@
7786 if ( isset( $wgPasswordResetRoutes['email'] ) && $wgPasswordResetRoutes['email'] ) {
7887 $i++;
7988 }
 89+ if ( isset( $wgPasswordResetRoutes['domain'] ) && $wgPasswordResetRoutes['domain'] ) {
 90+ $i++;
 91+ }
8092 return wfMessage( 'passwordreset-pretext', $i )->parseAsBlock();
8193 }
8294
@@ -87,7 +99,16 @@
88100 * @return Bool|Array
89101 */
90102 public function onSubmit( array $data ) {
 103+ global $wgAuth;
91104
 105+ if ( isset( $data['Domain'] ) ) {
 106+ if ( $wgAuth->validDomain( $data['Domain'] ) ) {
 107+ $wgAuth->setDomain( $data['Domain'] );
 108+ } else {
 109+ $wgAuth->setDomain( 'invaliddomain' );
 110+ }
 111+ }
 112+
92113 if ( isset( $data['Username'] ) && $data['Username'] !== '' ) {
93114 $method = 'username';
94115 $users = array( User::newFromName( $data['Username'] ) );
Index: branches/REL1_18/phase3/includes/specials/SpecialDeletedContributions.php
@@ -63,7 +63,7 @@
6464 'tables' => array( 'archive' ),
6565 'fields' => array(
6666 'ar_rev_id', 'ar_namespace', 'ar_title', 'ar_timestamp', 'ar_comment', 'ar_minor_edit',
67 - 'ar_user', 'ar_user_text', 'ar_deleted', 'ar_len'
 67+ 'ar_user', 'ar_user_text', 'ar_deleted'
6868 ),
6969 'conds' => $conds,
7070 'options' => array( 'USE INDEX' => $index )
@@ -74,7 +74,7 @@
7575 $condition = array();
7676
7777 $condition['ar_user_text'] = $this->target;
78 - $index = array( 'archive' => 'ar_usertext_timestamp' );
 78+ $index = 'usertext_timestamp';
7979
8080 return array( $index, $condition );
8181 }
@@ -235,8 +235,7 @@
236236 wfMsg( 'parentheses', $wgLang->pipeList( array( $last, $dellog, $reviewlink ) ) )
237237 );
238238
239 - $diffOut = Linker::formatRevisionSize( $row->ar_len );
240 - $ret = "{$del}{$link} {$tools} . . {$mflag} {$diffOut} {$pagelink} {$comment}";
 239+ $ret = "{$del}{$link} {$tools} . . {$mflag} {$pagelink} {$comment}";
241240
242241 # Denote if username is redacted for this edit
243242 if( $rev->isDeleted( Revision::DELETED_USER ) ) {
Index: branches/REL1_18/phase3/languages/messages/MessagesQqq.php
@@ -3300,7 +3300,9 @@
33013301
33023302 This field labels what the compression of the image is. It is commonly seen in Tiff images. It uses messages like {{msg-mw|exif-compression-1}} for the value. http://en.wikipedia.org/wiki/TIFF#TIFF_Compression_Tag has information about this field.',
33033303 'exif-photometricinterpretation' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].',
3304 -'exif-orientation' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].',
 3304+'exif-orientation' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].
 3305+
 3306+For specific information on the orientation tag, see http://sylvana.net/jpegcrop/exif_orientation.html',
33053307 'exif-samplesperpixel' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].',
33063308 'exif-planarconfiguration' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].',
33073309 'exif-ycbcrsubsampling' => 'Exif is a format for storing metadata in image files. See this [http://en.wikipedia.org/wiki/Exchangeable_image_file_format Wikipedia article] and the example at the bottom of [http://commons.wikimedia.org/wiki/File:Phalacrocorax-auritus-020.jpg this page on Commons]. The tags are explained [http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif.html briefly] and [http://www.kodak.com/global/plugins/acrobat/en/service/digCam/exifStandard2.pdf in further detail].',
Index: branches/REL1_18/phase3/languages/messages/MessagesEn.php
@@ -1176,6 +1176,7 @@
11771177 'passwordreset-disabled' => 'Password resets have been disabled on this wiki.',
11781178 'passwordreset-pretext' => '{{PLURAL:$1||Enter one of the pieces of data below}}',
11791179 'passwordreset-username' => 'Username:',
 1180+'passwordreset-domain' => 'Domain:',
11801181 'passwordreset-email' => 'E-mail address:',
11811182 'passwordreset-emailtitle' => 'Account details on {{SITENAME}}',
11821183 'passwordreset-emailtext-ip' => 'Someone (probably you, from IP address $1) requested a reminder of your
@@ -3957,9 +3958,9 @@
39583959 'exif-orientation-3' => 'Rotated 180°',
39593960 'exif-orientation-4' => 'Flipped vertically',
39603961 'exif-orientation-5' => 'Rotated 90° CCW and flipped vertically',
3961 -'exif-orientation-6' => 'Rotated 90° CW',
 3962+'exif-orientation-6' => 'Rotated 90° CCW',
39623963 'exif-orientation-7' => 'Rotated 90° CW and flipped vertically',
3963 -'exif-orientation-8' => 'Rotated 90° CCW',
 3964+'exif-orientation-8' => 'Rotated 90° CW',
39643965
39653966 'exif-planarconfiguration-1' => 'chunky format',
39663967 'exif-planarconfiguration-2' => 'planar format',
Index: branches/REL1_18/phase3/resources/jquery/jquery.tablesorter.js
@@ -75,10 +75,12 @@
7676 }
7777
7878 function getElementText( node ) {
79 - if ( node.hasAttribute && node.hasAttribute( 'data-sort-value' ) ) {
80 - return node.getAttribute( 'data-sort-value' );
 79+ var $node = $( node ),
 80+ data = $node.attr( 'data-sort-value' );
 81+ if ( data !== undefined ) {
 82+ return data;
8183 } else {
82 - return $( node ).text();
 84+ return $node.text();
8385 }
8486 }
8587

Follow-up revisions

RevisionCommit summaryAuthorDate
r96908MFT r94848 per Bawolff on r96849reedy21:17, 12 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r95837Remove the basic styles that vector coppied from monobook from both monobook ...dantman06:59, 31 August 2011
r96509Followup to r86108, r86854, r96384: table sorter fetch of 'data-sort-value' a...brion22:03, 7 September 2011
r96522Reverted r88023 per CRaaron23:41, 7 September 2011
r96606Adding support for domains in SpecialPasswordReset.php.laner19:54, 8 September 2011
r96643Some of the english translations for our exif-orientation-X messages were wro...bawolff02:13, 9 September 2011
r96645* Added a script to reduce disk space on a MySQL parser cache setup such as t...tstarling03:51, 9 September 2011
r96655Commit live hack: pass XML_PARSE_HUGE (code uses 1 << 19 because the constant...catrope11:28, 9 September 2011
r96659Replace localisation cache check removed in r91432 with another checkrobin12:49, 9 September 2011
r96687(bug 30640; follow-up r92279) Rotating images was making skewed images...bawolff20:13, 9 September 2011
r96762Do r93269 in a better way (also fixes some rare cases). Use 'margin/padding' ...robin00:13, 11 September 2011
r96764Fix standard skin, which doesn't style ul/ol. The margin added in shared.css ...robin00:57, 11 September 2011
r96829* (bug 30864) Use bengali numerals for <ol> for Assamesenikerabbit09:11, 12 September 2011

Comments

#Comment by Bawolff (talk | contribs)   20:46, 12 September 2011

This is complicated by r96687 expecting r94848 to be there, but r94848 wasn't backported, breaking unit tests. Either the tests backported here could be reverted out of 1.18 or r94848 needs to be backported (or at least part of ExifRotationTest.php needs to be).

Status & tagging log