Fix regression caused by r62087 which failed to insert rows into the image table...
authorOverlordQ <overlordq@users.mediawiki.org>
Thu, 23 Sep 2010 02:59:07 +0000 (02:59 +0000)
committerOverlordQ <overlordq@users.mediawiki.org>
Thu, 23 Sep 2010 02:59:07 +0000 (02:59 +0000)
Also correct indefinite/infinite/infinity protection.

includes/Article.php
maintenance/importImages.php

index e02ca66..300c256 100644 (file)
@@ -2607,7 +2607,7 @@ class Article {
                                $protect_description = '';
                                foreach ( $limit as $action => $restrictions ) {
                                        if ( !isset( $expiry[$action] ) )
-                                               $expiry[$action] = 'infinite';
+                                               $expiry[$action] = Block::infinity();
 
                                        $encodedExpiry[$action] = Block::encodeExpiry( $expiry[$action], $dbw );
                                        if ( $restrictions != '' ) {
index 20597eb..4712325 100644 (file)
@@ -186,7 +186,7 @@ if ( isset( $options['protect'] ) && $options['protect'] == 1 )
                                }
 
                                if ( !$commentText ) {
-                                       $commentText = $comment;
+                                       $commentText = $comment ? $comment : 'Importing image file';
                                }
                        }