r73587 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r73586‎ | r73587 | r73588 >
Date:02:59, 23 September 2010
Author:overlordq
Status:ok (Comments)
Tags:
Comment:
Fix regression caused by r62087 which failed to insert rows into the image table due to null comment.
Also correct indefinite/infinite/infinity protection.
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/maintenance/importImages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/importImages.php
@@ -186,7 +186,7 @@
187187 }
188188
189189 if ( !$commentText ) {
190 - $commentText = $comment;
 190+ $commentText = $comment ? $comment : 'Importing image file';
191191 }
192192 }
193193
Index: trunk/phase3/includes/Article.php
@@ -2607,7 +2607,7 @@
26082608 $protect_description = '';
26092609 foreach ( $limit as $action => $restrictions ) {
26102610 if ( !isset( $expiry[$action] ) )
2611 - $expiry[$action] = 'infinite';
 2611+ $expiry[$action] = Block::infinity();
26122612
26132613 $encodedExpiry[$action] = Block::encodeExpiry( $expiry[$action], $dbw );
26142614 if ( $restrictions != '' ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r73754Revert r73587 and fix r62087 regression by providing the default value in $co...platonides16:58, 25 September 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r62087Applied and tweaked smart-import patch from Mij, merging with 1.16....platonides16:10, 7 February 2010

Comments

#Comment by Platonides (talk | contribs)   17:01, 25 September 2010

importImages.php reverted in r73754 with a different fix, to also handle line 156.

Article.php revision ok.

Status & tagging log